-
Notifications
You must be signed in to change notification settings - Fork 703
Open
Description
unit8_t btn1_id = 0;
struct Button btn1;
uint8_t read_button_GPIO(uint8_t button_id)
{
// you can share the GPIO read function with multiple Buttons
switch(button_id)
{
case btn1_id:
return HAL_GPIO_ReadPin(B1_GPIO_Port, B1_Pin);
default:
return 0;
}
}哈?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels