13 #ifndef _ADI_BEEP_DEF_H_ 14 #define _ADI_BEEP_DEF_H_ 17 #include <drivers/beep/adi_beep.h> 23 #define ADI_BEEP_ALL_INTERRUPTS ( BITM_BEEP_CFG_SEQATENDIRQ \ 24 | BITM_BEEP_CFG_SEQNEARENDIRQ \ 25 | BITM_BEEP_CFG_BENDIRQ \ 26 | BITM_BEEP_CFG_BSTARTIRQ \ 27 | BITM_BEEP_CFG_AENDIRQ \ 28 | BITM_BEEP_CFG_ASTARTIRQ) 30 #define ADI_BEEP_TONE_DISABLE (BITM_BEEP_TONEA_DIS) 32 #define ADI_BEEP_TONE_FREQ_BITPOS (BITP_BEEP_TONEA_FREQ) 33 #define ADI_BEEP_TONE_DUR_BITPOS (BITP_BEEP_TONEA_DUR) 35 #define ADI_BEEP_TONE_FREQ_MASK (BITM_BEEP_TONEA_FREQ) 36 #define ADI_BEEP_TONE_DUR_MASK (BITM_BEEP_TONEA_DUR) 47 typedef uint8_t ADI_BEEP_STATE; 48 #define ADI_BEEP_STATE_UNINITIALIZED 0u 49 #define ADI_BEEP_STATE_INITIALIZED (1u << 1u) 50 #define ADI_BEEP_STATE_PLAYING (1u << 2u) 51 #define ADI_BEEP_STATE_BLOCKED (1u << 3u) 57 typedef struct _ADI_BEEP_DEV_DATA 59 volatile ADI_BEEP_STATE state;
62 #if ADI_BEEP_INCLUDE_PLAY_SEQUENCE == 1 64 volatile uint8_t nSeqIndex;
74 typedef struct _ADI_BEEP_DRIVER_STRUCT
76 ADI_BEEP_TypeDef *pReg;
77 ADI_BEEP_DEV_DATA *pData;
78 } ADI_BEEP_DRIVER_STRUCT;
88 } ADI_BEEP_STATIC_INIT;
91 typedef ADI_BEEP_DRIVER_STRUCT ADI_BEEP_DRIVER;