首页 > 代码库 > am335x_y蜂鸣器驱动

am335x_y蜂鸣器驱动

修改文件:
1、板级文件/arch/arm/mach-omap2/board-am335xevm.c

static struct platform_device buzzer_device= {
.name = "buzzer",
.id = -1,
};

static void __init am335x_buzzer_init(void)
{
setup_pin_mux(buzzer_pin_mux);
platform_device_register(&buzzer_device);
}
static void __init am335x_evm_init(void)
{
...................
am335x_buzzer_init();
}
2、添加文件drivers/char/am335x_buzzer.c

 修改该目录下的Makefile,添加一行:obj-y += am335x_buzzer.o

am335x_y蜂鸣器驱动