android buttons definition

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

android buttons definition

跳至解决方案
1,317 次查看
jfsimon
Contributor III

Hi,

I understand android buttons can be hooked to any PAD on the i.mx6 CPUs.

For example on the sabrelite,  i can see android buttons are defined in u-boot like the followoing:

board/freescale/mx6qsabrelite/mx6qsabrelite.c:

........

static struct button_key const buttons[] = {

        {"back",        IMX_GPIO_NR(2, 2),      'B'},

        {"home",        IMX_GPIO_NR(2, 4),      'H'},

        {"menu",        IMX_GPIO_NR(2, 1),      'M'},

        {"search",      IMX_GPIO_NR(2, 3),      'S'},

        {"volup",       IMX_GPIO_NR(7, 13),     'V'},

        {"voldown",     IMX_GPIO_NR(4, 5),      'v'},

};

........

My question is how android is made aware of this PAD to buttons mapping?

Thanks a lot

-jfs

标签 (2)
0 项奖励
回复
1 解答
1,102 次查看
daiane_angolini
NXP Employee
NXP Employee

Take a look on kernel image, on board file

it should be something like:

<kernel>/arch/arm/mach-mx6/board-imx6sabrelite.c

You will see kernel defines buttons as well

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,103 次查看
daiane_angolini
NXP Employee
NXP Employee

Take a look on kernel image, on board file

it should be something like:

<kernel>/arch/arm/mach-mx6/board-imx6sabrelite.c

You will see kernel defines buttons as well

0 项奖励
回复