mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
drivers/button: Let board_button_initialize return the button number
so the lower half driver don't need include the specific board.h Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: I2ff5c30049a5c5e8ee90baea56e9f4cb1a8a4f87
This commit is contained in:
committed by
Abdelatif Guettouche
parent
73fc43770a
commit
1b47aa1cb2
@@ -77,7 +77,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_BUTTONS
|
||||
void board_button_initialize(void)
|
||||
uint32_t board_button_initialize(void)
|
||||
{
|
||||
uint16_t reg16;
|
||||
|
||||
@@ -106,6 +106,8 @@ void board_button_initialize(void)
|
||||
reg16 = getreg16(STR71X_GPIO1_PC2);
|
||||
reg16 &= ~STR71X_BUTBUTTON_GPIO1;
|
||||
putreg16(reg16, STR71X_GPIO1_PC2);
|
||||
|
||||
return 2;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user