You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
706 B

6 months ago
/** \file gpio_switch.h */
#if !defined(GPIO_SWITCH_H__7A08A6AB_4529_4D95_A81A_08ECA85DC521__INCLUDED_)
#define GPIO_SWITCH_H__7A08A6AB_4529_4D95_A81A_08ECA85DC521__INCLUDED_
#include "define.h"
#include "board_config.h"
typedef enum
{
KEY_PUSH_SW1,
5 months ago
KEY_PUSH_SW2,
KEY_PUSH_SW3,
KEY_PUSH_SW4,
6 months ago
KEY_PUSH_SW_MAX
}KEY_LIST;
5 months ago
typedef void (*GPIO_SW_CALLBACK_FN) (KEY_LIST key);
6 months ago
void Gpio_Switch_Port_Initialization(void);
void Gpio_Swtich_Set_PushCount(KEY_LIST key, uint32_t Push_Count, uint32_t LongPush_Count);
void Gpio_Swtich_Set_Callback(KEY_LIST key, GPIO_SW_CALLBACK_FN Push_Callback, GPIO_SW_CALLBACK_FN LongPush_Callback, GPIO_SW_CALLBACK_FN Release_Callback);
#endif