Go to the documentation of this file.
35 #include "mikrosdk_version.h"
38 #if mikroSDK_GET_VERSION < 20800ul
39 #include "rcu_delays.h"
45 #include "drv_digital_out.h"
46 #include "drv_digital_in.h"
69 #define BUZZ_DEF_FREQ 5000
82 #define BUZZ_NOTE_C2 65
83 #define BUZZ_NOTE_Db2 69
84 #define BUZZ_NOTE_D2 73
85 #define BUZZ_NOTE_Eb2 78
86 #define BUZZ_NOTE_E2 82
87 #define BUZZ_NOTE_F2 87
88 #define BUZZ_NOTE_Gb2 93
89 #define BUZZ_NOTE_G2 98
90 #define BUZZ_NOTE_Ab2 104
91 #define BUZZ_NOTE_A2 110
92 #define BUZZ_NOTE_Bb2 117
93 #define BUZZ_NOTE_B2 123
94 #define BUZZ_NOTE_C3 131
95 #define BUZZ_NOTE_Db3 139
96 #define BUZZ_NOTE_D3 147
97 #define BUZZ_NOTE_Eb3 156
98 #define BUZZ_NOTE_E3 165
99 #define BUZZ_NOTE_F3 175
100 #define BUZZ_NOTE_Gb3 185
101 #define BUZZ_NOTE_G3 196
102 #define BUZZ_NOTE_Ab3 208
103 #define BUZZ_NOTE_A3 220
104 #define BUZZ_NOTE_AS3 233
105 #define BUZZ_NOTE_B3 247
106 #define BUZZ_NOTE_C4 262
107 #define BUZZ_NOTE_Db4 277
108 #define BUZZ_NOTE_D4 294
109 #define BUZZ_NOTE_Eb4 311
110 #define BUZZ_NOTE_E4 330
111 #define BUZZ_NOTE_F4 349
112 #define BUZZ_NOTE_Gb4 370
113 #define BUZZ_NOTE_G4 392
114 #define BUZZ_NOTE_Ab4 415
115 #define BUZZ_NOTE_A4 440
116 #define BUZZ_NOTE_Bb4 466
117 #define BUZZ_NOTE_B4 494
118 #define BUZZ_NOTE_C5 523
119 #define BUZZ_NOTE_Db5 554
120 #define BUZZ_NOTE_D5 587
121 #define BUZZ_NOTE_Eb5 622
122 #define BUZZ_NOTE_E5 659
123 #define BUZZ_NOTE_F5 698
124 #define BUZZ_NOTE_Gb5 740
125 #define BUZZ_NOTE_G5 784
126 #define BUZZ_NOTE_Ab5 831
127 #define BUZZ_NOTE_A5 880
128 #define BUZZ_NOTE_Bb5 932
129 #define BUZZ_NOTE_B5 988
130 #define BUZZ_NOTE_C6 1047
131 #define BUZZ_NOTE_Db6 1109
132 #define BUZZ_NOTE_D6 1175
133 #define BUZZ_NOTE_Eb6 1245
134 #define BUZZ_NOTE_E6 1319
135 #define BUZZ_NOTE_F6 1397
136 #define BUZZ_NOTE_Gb6 1480
137 #define BUZZ_NOTE_G6 1568
138 #define BUZZ_NOTE_Ab6 1661
139 #define BUZZ_NOTE_A6 1760
140 #define BUZZ_NOTE_Bb6 1865
141 #define BUZZ_NOTE_B6 1976
142 #define BUZZ_NOTE_C7 2093
143 #define BUZZ_NOTE_Db7 2217
144 #define BUZZ_NOTE_D7 2349
145 #define BUZZ_NOTE_Eb7 2489
146 #define BUZZ_NOTE_E7 2637
147 #define BUZZ_NOTE_F7 2794
148 #define BUZZ_NOTE_Gb7 2960
149 #define BUZZ_NOTE_G7 3136
150 #define BUZZ_NOTE_Ab7 3322
151 #define BUZZ_NOTE_A7 3520
152 #define BUZZ_NOTE_Bb7 3729
153 #define BUZZ_NOTE_B7 3951
154 #define BUZZ_NOTE_C8 4186
155 #define BUZZ_NOTE_Db8 4435
156 #define BUZZ_NOTE_D8 4699
157 #define BUZZ_NOTE_Eb8 4978
177 #define BUZZ_MAP_MIKROBUS( cfg, mikrobus ) \
178 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM )
BUZZ Click configuration object.
Definition: buzz.h:209
void buzz_cfg_setup(buzz_cfg_t *cfg)
BUZZ configuration object setup function.
buzz_return_value_t
BUZZ Click return value data.
Definition: buzz.h:225
BUZZ Click driver selector.
Definition: buzz.h:193
uint32_t pwm_freq
Definition: buzz.h:200
err_t buzz_pwm_start(buzz_t *ctx)
BUZZ start PWM module.
void buzz_play_sound(buzz_t *ctx, uint16_t freq, uint16_t level, uint16_t duration)
BUZZ Play sound function.
@ BUZZ_OK
Definition: buzz.h:226
err_t buzz_pwm_stop(buzz_t *ctx)
BUZZ stop PWM module.
err_t buzz_set_duty_cycle(buzz_t *ctx, float duty_cycle)
BUZZ sets PWM duty cycle.
pwm_t pwm
Definition: buzz.h:196
err_t buzz_init(buzz_t *ctx, buzz_cfg_t *cfg)
BUZZ initialization function.
@ BUZZ_ERROR
Definition: buzz.h:227
uint32_t dev_pwm_freq
Definition: buzz.h:216
pin_name_t pwm
Definition: buzz.h:212