mikrosdk interface
More...
#include <stdint.h>
Go to the source code of this file.
◆ BUZZ2_NOTE_A2
#define BUZZ2_NOTE_A2 110 |
◆ BUZZ2_NOTE_A3
#define BUZZ2_NOTE_A3 220 |
◆ BUZZ2_NOTE_A4
#define BUZZ2_NOTE_A4 440 |
◆ BUZZ2_NOTE_A5
#define BUZZ2_NOTE_A5 880 |
◆ BUZZ2_NOTE_A6
#define BUZZ2_NOTE_A6 1760 |
◆ BUZZ2_NOTE_A7
#define BUZZ2_NOTE_A7 3520 |
◆ BUZZ2_NOTE_A8
#define BUZZ2_NOTE_A8 7040 |
◆ BUZZ2_NOTE_Ab2
#define BUZZ2_NOTE_Ab2 104 |
◆ BUZZ2_NOTE_Ab3
#define BUZZ2_NOTE_Ab3 208 |
◆ BUZZ2_NOTE_Ab4
#define BUZZ2_NOTE_Ab4 415 |
◆ BUZZ2_NOTE_Ab5
#define BUZZ2_NOTE_Ab5 831 |
◆ BUZZ2_NOTE_Ab6
#define BUZZ2_NOTE_Ab6 1661 |
◆ BUZZ2_NOTE_Ab7
#define BUZZ2_NOTE_Ab7 3322 |
◆ BUZZ2_NOTE_Ab8
#define BUZZ2_NOTE_Ab8 6645 |
◆ BUZZ2_NOTE_B2
#define BUZZ2_NOTE_B2 123 |
◆ BUZZ2_NOTE_B3
#define BUZZ2_NOTE_B3 247 |
◆ BUZZ2_NOTE_B4
#define BUZZ2_NOTE_B4 494 |
◆ BUZZ2_NOTE_B5
#define BUZZ2_NOTE_B5 988 |
◆ BUZZ2_NOTE_B6
#define BUZZ2_NOTE_B6 1976 |
◆ BUZZ2_NOTE_B7
#define BUZZ2_NOTE_B7 3951 |
◆ BUZZ2_NOTE_B8
#define BUZZ2_NOTE_B8 7902 |
◆ BUZZ2_NOTE_Bb2
#define BUZZ2_NOTE_Bb2 117 |
◆ BUZZ2_NOTE_Bb3
#define BUZZ2_NOTE_Bb3 233 |
◆ BUZZ2_NOTE_Bb4
#define BUZZ2_NOTE_Bb4 466 |
◆ BUZZ2_NOTE_Bb5
#define BUZZ2_NOTE_Bb5 932 |
◆ BUZZ2_NOTE_Bb6
#define BUZZ2_NOTE_Bb6 1865 |
◆ BUZZ2_NOTE_Bb7
#define BUZZ2_NOTE_Bb7 3729 |
◆ BUZZ2_NOTE_Bb8
#define BUZZ2_NOTE_Bb8 7459 |
◆ BUZZ2_NOTE_C2
Defines for music note frequencies, from Octave 2 to Octave 8.
◆ BUZZ2_NOTE_C3
#define BUZZ2_NOTE_C3 131 |
◆ BUZZ2_NOTE_C4
#define BUZZ2_NOTE_C4 262 |
◆ BUZZ2_NOTE_C5
#define BUZZ2_NOTE_C5 523 |
◆ BUZZ2_NOTE_C6
#define BUZZ2_NOTE_C6 1047 |
◆ BUZZ2_NOTE_C7
#define BUZZ2_NOTE_C7 2093 |
◆ BUZZ2_NOTE_C8
#define BUZZ2_NOTE_C8 4186 |
◆ BUZZ2_NOTE_D2
◆ BUZZ2_NOTE_D3
#define BUZZ2_NOTE_D3 147 |
◆ BUZZ2_NOTE_D4
#define BUZZ2_NOTE_D4 294 |
◆ BUZZ2_NOTE_D5
#define BUZZ2_NOTE_D5 587 |
◆ BUZZ2_NOTE_D6
#define BUZZ2_NOTE_D6 1175 |
◆ BUZZ2_NOTE_D7
#define BUZZ2_NOTE_D7 2349 |
◆ BUZZ2_NOTE_D8
#define BUZZ2_NOTE_D8 4699 |
◆ BUZZ2_NOTE_Db2
#define BUZZ2_NOTE_Db2 69 |
◆ BUZZ2_NOTE_Db3
#define BUZZ2_NOTE_Db3 139 |
◆ BUZZ2_NOTE_Db4
#define BUZZ2_NOTE_Db4 277 |
◆ BUZZ2_NOTE_Db5
#define BUZZ2_NOTE_Db5 554 |
◆ BUZZ2_NOTE_Db6
#define BUZZ2_NOTE_Db6 1109 |
◆ BUZZ2_NOTE_Db7
#define BUZZ2_NOTE_Db7 2217 |
◆ BUZZ2_NOTE_Db8
#define BUZZ2_NOTE_Db8 4435 |
◆ BUZZ2_NOTE_E2
◆ BUZZ2_NOTE_E3
#define BUZZ2_NOTE_E3 165 |
◆ BUZZ2_NOTE_E4
#define BUZZ2_NOTE_E4 330 |
◆ BUZZ2_NOTE_E5
#define BUZZ2_NOTE_E5 659 |
◆ BUZZ2_NOTE_E6
#define BUZZ2_NOTE_E6 1319 |
◆ BUZZ2_NOTE_E7
#define BUZZ2_NOTE_E7 2637 |
◆ BUZZ2_NOTE_E8
#define BUZZ2_NOTE_E8 5274 |
◆ BUZZ2_NOTE_Eb2
#define BUZZ2_NOTE_Eb2 78 |
◆ BUZZ2_NOTE_Eb3
#define BUZZ2_NOTE_Eb3 156 |
◆ BUZZ2_NOTE_Eb4
#define BUZZ2_NOTE_Eb4 311 |
◆ BUZZ2_NOTE_Eb5
#define BUZZ2_NOTE_Eb5 622 |
◆ BUZZ2_NOTE_Eb6
#define BUZZ2_NOTE_Eb6 1245 |
◆ BUZZ2_NOTE_Eb7
#define BUZZ2_NOTE_Eb7 2489 |
◆ BUZZ2_NOTE_Eb8
#define BUZZ2_NOTE_Eb8 4978 |
◆ BUZZ2_NOTE_F2
◆ BUZZ2_NOTE_F3
#define BUZZ2_NOTE_F3 175 |
◆ BUZZ2_NOTE_F4
#define BUZZ2_NOTE_F4 349 |
◆ BUZZ2_NOTE_F5
#define BUZZ2_NOTE_F5 698 |
◆ BUZZ2_NOTE_F6
#define BUZZ2_NOTE_F6 1397 |
◆ BUZZ2_NOTE_F7
#define BUZZ2_NOTE_F7 2794 |
◆ BUZZ2_NOTE_F8
#define BUZZ2_NOTE_F8 5588 |
◆ BUZZ2_NOTE_G2
◆ BUZZ2_NOTE_G3
#define BUZZ2_NOTE_G3 196 |
◆ BUZZ2_NOTE_G4
#define BUZZ2_NOTE_G4 392 |
◆ BUZZ2_NOTE_G5
#define BUZZ2_NOTE_G5 784 |
◆ BUZZ2_NOTE_G6
#define BUZZ2_NOTE_G6 1568 |
◆ BUZZ2_NOTE_G7
#define BUZZ2_NOTE_G7 3136 |
◆ BUZZ2_NOTE_Gb2
#define BUZZ2_NOTE_Gb2 93 |
◆ BUZZ2_NOTE_Gb3
#define BUZZ2_NOTE_Gb3 185 |
◆ BUZZ2_NOTE_Gb4
#define BUZZ2_NOTE_Gb4 370 |
◆ BUZZ2_NOTE_Gb5
#define BUZZ2_NOTE_Gb5 740 |
◆ BUZZ2_NOTE_Gb6
#define BUZZ2_NOTE_Gb6 1480 |
◆ BUZZ2_NOTE_Gb7
#define BUZZ2_NOTE_Gb7 2960 |
◆ BUZZ2_NOTE_Gb8
#define BUZZ2_NOTE_Gb8 5920 |
◆ BUZZ2_PWM_PIN
PWM pin define on the devboard.
◆ NoteFinishedCallback
typedef void(* NoteFinishedCallback) (void *context) |
◆ buzz2_status
Enum (buzz2 status)
Enumerator |
---|
BUZZ2_ST_OK | |
BUZZ2_ST_FAIL | |
◆ play_note_mode
Enum (mode for play note function)
Enumerator |
---|
BLOCKING | |
NON_BLOCKING | |
◆ MIKROSDK_BUZZ2_Initialise()
uint8_t MIKROSDK_BUZZ2_Initialise |
( |
void |
| ) |
|
Buzz2 Initialisation function.
- Returns
- uint8_t (buzz2 status)
◆ MIKROSDK_BUZZ2_play_note()
uint8_t MIKROSDK_BUZZ2_play_note |
( |
uint32_t |
freq, |
|
|
uint32_t |
volume, |
|
|
uint16_t |
duration, |
|
|
uint8_t |
mode, |
|
|
NoteFinishedCallback |
nfc |
|
) |
| |
Function that plays a note.
- Parameters
-
freq | Note frequency |
volume | Volume[%] of buzz2 (0 = off, 100 = max) |
duration | Duration[ms] of the note to be played (min = 0, max = 65535) |
mode | Mode of the function (BLOCKING/NON-BLOCKING) Blocking: Uses delay, can call this function successively, not recommended for KNX applications. If using BLOCKING mode, set nfc to NULL. Non-blocking: Schedules tasklet, can only call this function once within the specified duration. |
nfc | Optional callback to be called after the note stops playing, if mode == NON-BLOCKING. Set to NULL if using BLOCKING mode. If using NON-BLOCKING mode, you can also set it to NULL if you don't need any callback to be called once the note stops playing. |
- Returns
- uint8_t (buzz2 status)