|
Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
|
mikrosdk interface More...
#include "buzz2_click.h"#include "cascoda-bm/cascoda_sensorif.h"#include "cascoda-bm/cascoda_wait.h"#include "cascoda-util/cascoda_tasklet.h"#include "cascoda-util/cascoda_time.h"
Functions | |
| 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. More... | |
| uint8_t | MIKROSDK_BUZZ2_Initialise (void) |
| Buzz2 Initialisation function. More... | |
mikrosdk interface
| uint8_t MIKROSDK_BUZZ2_Initialise | ( | void | ) |
Buzz2 Initialisation function.
| 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.
| 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. |