Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
buzz2.c File Reference

mikrosdk interface More...

Include dependency graph for buzz2.c:

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...
 

Detailed Description

mikrosdk interface

Function Documentation

◆ 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
freqNote frequency
volumeVolume[%] of buzz2 (0 = off, 100 = max)
durationDuration[ms] of the note to be played (min = 0, max = 65535)
modeMode 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.
nfcOptional 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)