12 #include "hpm_butn_regs.h"
23 #define BUTN_EVENT_POWER_PRESSED (BUTN_BTN_STATUS_PBTN_SET(1))
24 #define BUTN_EVENT_POWER_PRESSED_HOLD_0_5_S (BUTN_BTN_STATUS_PBTN_SET(2))
25 #define BUTN_EVENT_POWER_PRESSED_HOLD_8_S (BUTN_BTN_STATUS_PBTN_SET(4))
26 #define BUTN_EVENT_POWER_PRESSED_HOLD_16_S (BUTN_BTN_STATUS_PBTN_SET(8))
28 #define BUTN_EVENT_WAKE_PRESSED (BUTN_BTN_STATUS_WBTN_SET(1))
29 #define BUTN_EVENT_WAKE_PRESSED_HOLD_0_5_S (BUTN_BTN_STATUS_WBTN_SET(2))
30 #define BUTN_EVENT_WAKE_PRESSED_HOLD_8_S (BUTN_BTN_STATUS_WBTN_SET(4))
31 #define BUTN_EVENT_WAKE_PRESSED_HOLD_16_S (BUTN_BTN_STATUS_WBTN_SET(8))
33 #define BUTN_EVENT_WAKE_POWER_PRESSED (BUTN_BTN_STATUS_DBTN_SET(1))
34 #define BUTN_EVENT_WAKE_POWER_PRESSED_HOLD_0_5_S (BUTN_BTN_STATUS_DBTN_SET(2))
35 #define BUTN_EVENT_WAKE_POWER_PRESSED_HOLD_8_S (BUTN_BTN_STATUS_DBTN_SET(4))
36 #define BUTN_EVENT_WAKE_POWER_PRESSED_HOLD_16_S (BUTN_BTN_STATUS_DBTN_SET(8))
38 #define BUTN_EVENT_POWER_CLICKED (BUTN_BTN_STATUS_PCLICK_SET(1))
39 #define BUTN_EVENT_POWER_CLICKED_X2 (BUTN_BTN_STATUS_PCLICK_SET(2))
40 #define BUTN_EVENT_POWER_CLICKED_X3 (BUTN_BTN_STATUS_PCLICK_SET(4))
42 #define BUTN_EVENT_POWER_CLICKED_WAKE_HELD (BUTN_BTN_STATUS_XPCLICK_SET(1))
43 #define BUTN_EVENT_POWER_CLICKED_X2_WAKE_HELD (BUTN_BTN_STATUS_XPCLICK_SET(2))
44 #define BUTN_EVENT_POWER_CLICKED_X3_WAKE_HELD (BUTN_BTN_STATUS_XPCLICK_SET(4))
46 #define BUTN_EVENT_WAKE_CLICKED (BUTN_BTN_STATUS_WCLICK_SET(1))
47 #define BUTN_EVENT_WAKE_CLICKED_X2 (BUTN_BTN_STATUS_WCLICK_SET(2))
48 #define BUTN_EVENT_WAKE_CLICKED_X3 (BUTN_BTN_STATUS_WCLICK_SET(4))
50 #define BUTN_EVENT_WAKE_CLICKED_POWER_HELD (BUTN_BTN_STATUS_XWCLICK_SET(1))
51 #define BUTN_EVENT_WAKE_CLICKED_X2_POWER_HELD (BUTN_BTN_STATUS_XWCLICK_SET(2))
52 #define BUTN_EVENT_WAKE_CLICKED_X3_POWER_HELD (BUTN_BTN_STATUS_XWCLICK_SET(4))
#define BUTN_LED_INTENSE_PLED_SET(x)
Definition: hpm_butn_regs.h:227
#define BUTN_LED_INTENSE_RLED_SET(x)
Definition: hpm_butn_regs.h:217
static void butn_enable_irq(BUTN_Type *ptr, uint32_t mask)
Enable interrupt with mask.
Definition: hpm_butn_drv.h:75
static void butn_set_intense(BUTN_Type *ptr, uint8_t intense)
Set intense of PLED and RLED/WLED.
Definition: hpm_butn_drv.h:97
static uint32_t butn_get_status(BUTN_Type *ptr)
Get status.
Definition: hpm_butn_drv.h:64
static void butn_disable_irq(BUTN_Type *ptr, uint32_t mask)
Disable interrupt with mask.
Definition: hpm_butn_drv.h:86
Definition: hpm_butn_regs.h:12
__RW uint32_t LED_INTENSE
Definition: hpm_butn_regs.h:15
__RW uint32_t BTN_STATUS
Definition: hpm_butn_regs.h:13
__RW uint32_t BTN_IRQ_MASK
Definition: hpm_butn_regs.h:14