46 #ifndef _ADI_BEEP_DEF_H_ 47 #define _ADI_BEEP_DEF_H_ 50 #include <drivers/beep/adi_beep.h> 56 #define ADI_BEEP_ALL_INTERRUPTS ( BITM_BEEP_CFG_SEQATENDIRQ \ 57 | BITM_BEEP_CFG_SEQNEARENDIRQ \ 58 | BITM_BEEP_CFG_BENDIRQ \ 59 | BITM_BEEP_CFG_BSTARTIRQ \ 60 | BITM_BEEP_CFG_AENDIRQ \ 61 | BITM_BEEP_CFG_ASTARTIRQ) 63 #define ADI_BEEP_TONE_DISABLE (BITM_BEEP_TONEA_DIS) 65 #define ADI_BEEP_TONE_FREQ_BITPOS (BITP_BEEP_TONEA_FREQ) 66 #define ADI_BEEP_TONE_DUR_BITPOS (BITP_BEEP_TONEA_DUR) 68 #define ADI_BEEP_TONE_FREQ_MASK (BITM_BEEP_TONEA_FREQ) 69 #define ADI_BEEP_TONE_DUR_MASK (BITM_BEEP_TONEA_DUR) 80 typedef uint8_t ADI_BEEP_STATE; 81 #define ADI_BEEP_STATE_UNINITIALIZED 0u 82 #define ADI_BEEP_STATE_INITIALIZED (1u << 1u) 83 #define ADI_BEEP_STATE_PLAYING (1u << 2u) 84 #define ADI_BEEP_STATE_BLOCKED (1u << 3u) 90 typedef struct _ADI_BEEP_DEV_DATA 92 volatile ADI_BEEP_STATE state;
95 #if ADI_BEEP_INCLUDE_PLAY_SEQUENCE == 1 97 volatile uint8_t nSeqIndex;
107 typedef struct _ADI_BEEP_DRIVER_STRUCT
109 ADI_BEEP_TypeDef *pReg;
110 ADI_BEEP_DEV_DATA *pData;
111 } ADI_BEEP_DRIVER_STRUCT;
121 } ADI_BEEP_STATIC_INIT;
124 typedef ADI_BEEP_DRIVER_STRUCT ADI_BEEP_DRIVER;