|
|
|
@ -18,7 +18,7 @@ static struct Button* head_handle = NULL;
|
|
|
|
* @param button_id: the button id.
|
|
|
|
* @param button_id: the button id.
|
|
|
|
* @retval None
|
|
|
|
* @retval None
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void button_init(struct Button* handle, uint8_t(*pin_level)(), uint8_t active_level, uint8_t button_id)
|
|
|
|
void button_init(struct Button* handle, uint8_t(*pin_level)(uint8_t), uint8_t active_level, uint8_t button_id)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
memset(handle, 0, sizeof(struct Button));
|
|
|
|
memset(handle, 0, sizeof(struct Button));
|
|
|
|
handle->event = (uint8_t)NONE_PRESS;
|
|
|
|
handle->event = (uint8_t)NONE_PRESS;
|
|
|
|
|