ADuCM4x50 Device Drivers API Reference Manual  Release 4.0.0.0
adi_beep_config.h
1 
15 #ifndef ADI_BEEP_CONFIG_H
16 #define ADI_BEEP_CONFIG_H
17 #include <adi_global_config.h>
18 
19 #ifdef __ICCARM__
20 /* IAR MISRA C 2004 error suppressions.
21  *
22  * Pm009 (rule 5.1): identifiers shall not rely on significance of more than 31 characters.
23  * IAR compiler supports longer identifiers.
24  */
25 #pragma diag_suppress=Pm009
26 #endif /* __ICCARM__ */
27 
33 /************* BEEP Driver configurations ***************/
40 #define ADI_BEEP_INCLUDE_PLAY_SEQUENCE 1
41 
42 /************* BEEP controller static configurations ***************/
43 
47 #define ADI_BEEP_CFG_BEEPER_DISABLE 0
48 
52 #define ADI_BEEP_CFG_SEQUENCE_REPEAT_VALUE 5
53 
54 
55 /* TONEA CONTROL REGISTER */
56 
60 #define ADI_BEEP_TONEA_DISABLE 0
61 
65 #define ADI_BEEP_TONEA_FREQUENCY 20
66 
70 #define ADI_BEEP_TONEA_DURATION 2
71 
72 
73 
74 /* TONEB CONTROL REGISTER */
75 
79 #define ADI_BEEP_TONEB_DISABLE 0
80 
84 #define ADI_BEEP_TONEB_FREQUENCY 50
85 
89 #define ADI_BEEP_TONEB_DURATION 2
90 
91 
92 
93 #ifdef __ICCARM__
94 /*
95 * Pm085 (rule 19.11): identifiers in pre-processor directives should be defined before use
96 * The macros in the the following #if directives are defined to enum constants by default.
97 */
98 #pragma diag_suppress=Pm085
99 #endif /* __ICCARM__ */
100 
101 #if (ADI_BEEP_TONEA_DISABLE > 1)
102 #error "Invalid configuration"
103 #endif
104 
105 #if ( ADI_BEEP_TONEA_FREQUENCY > 127 )
106 #error "Invalid configuration"
107 #endif
108 
109 #if ( ADI_BEEP_TONEA_DURATION > 255 )
110 #error "Invalid configuration"
111 #endif
112 
113 #if (ADI_BEEP_TONEB_DISABLE > 1)
114 #error "Invalid configuration"
115 #endif
116 
117 #if ( ADI_BEEP_TONEB_FREQUENCY > 127 )
118 #error "Invalid configuration"
119 #endif
120 
121 #if ( ADI_BEEP_TONEB_DURATION > 255 )
122 #error "Invalid configuration"
123 #endif
124 
125 #ifdef __ICCARM__
126 #pragma diag_default=Pm009,Pm085
127 #endif /* __ICCARM__ */
128 
131 #endif /* ADI_BEEP_CONFIG_H */