recnplay2
2.1.0.0
|
API for configuring and manipulating Rec N Play 2 Click driver. More...
Modules | |
Rec N Play 2 MikroBUS Map | |
MikroBUS pin mapping of Rec N Play 2 Click driver. | |
Recnplay2_set | |
Functions | |
void | recnplay2_cfg_setup (recnplay2_cfg_t *cfg) |
Rec N Play 2 configuration object setup function. More... | |
err_t | recnplay2_init (recnplay2_t *ctx, recnplay2_cfg_t *cfg) |
Rec N Play 2 initialization function. More... | |
void | recnplay2_default_cfg (recnplay2_t *ctx) |
Rec N Play 2 default configuration function. More... | |
void | recnplay2_set_rec_pin (recnplay2_t *ctx, uint8_t pin_state) |
Rec N Play 2 REC pin setting function. More... | |
void | recnplay2_set_pe_pin (recnplay2_t *ctx, uint8_t pin_state) |
Rec N Play 2 Pe pin setting function. More... | |
void | recnplay2_set_pl_pin (recnplay2_t *ctx, uint8_t pin_state) |
Rec N Play 2 PL pin setting function. More... | |
err_t | recnplay2_record_sound (recnplay2_t *ctx, uint16_t rec_len) |
Rec N Play 2 record sound function. More... | |
err_t | recnplay2_play_sound (recnplay2_t *ctx, uint16_t play_len) |
Rec N Play 2 play recorded sounds function. More... | |
API for configuring and manipulating Rec N Play 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void recnplay2_cfg_setup | ( | recnplay2_cfg_t * | cfg | ) |
Rec N Play 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See recnplay2_cfg_t object definition for detailed explanation. |
void recnplay2_default_cfg | ( | recnplay2_t * | ctx | ) |
Rec N Play 2 default configuration function.
This function executes a default configuration of Rec N Play 2 click board.
[in] | ctx | : Click context object. See recnplay2_t object definition for detailed explanation. |
err_t recnplay2_init | ( | recnplay2_t * | ctx, |
recnplay2_cfg_t * | cfg | ||
) |
Rec N Play 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See recnplay2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See recnplay2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t recnplay2_play_sound | ( | recnplay2_t * | ctx, |
uint16_t | play_len | ||
) |
Rec N Play 2 play recorded sounds function.
This function is used to play recorded sounds with Rec N Play 2 click board.
[in] | ctx | : Click context object. See recnplay2_t object definition for detailed explanation. |
[in] | rec_len | : Playing time in mS. |
err_t recnplay2_record_sound | ( | recnplay2_t * | ctx, |
uint16_t | rec_len | ||
) |
Rec N Play 2 record sound function.
This function is used to record sound with Rec N Play 2 click board.
[in] | ctx | : Click context object. See recnplay2_t object definition for detailed explanation. |
[in] | rec_len | : Recording lenght in mS. |
void recnplay2_set_pe_pin | ( | recnplay2_t * | ctx, |
uint8_t | pin_state | ||
) |
Rec N Play 2 Pe pin setting function.
This function sets the PE pin on the selected level of Rec N Play 2 click board.
[in] | ctx | : Click context object. See recnplay2_t object definition for detailed explanation. |
[in] | pin_state | : Selected pin level. |
void recnplay2_set_pl_pin | ( | recnplay2_t * | ctx, |
uint8_t | pin_state | ||
) |
Rec N Play 2 PL pin setting function.
This function sets the PL pin on the selected level of Rec N Play 2 click board.
[in] | ctx | : Click context object. See recnplay2_t object definition for detailed explanation. |
[in] | pin_state | : Selected pin level. |
void recnplay2_set_rec_pin | ( | recnplay2_t * | ctx, |
uint8_t | pin_state | ||
) |
Rec N Play 2 REC pin setting function.
This function sets the REC pin on the selected level of Rec N Play 2 click board.
[in] | ctx | : Click context object. See recnplay2_t object definition for detailed explanation. |
[in] | pin_state | : Selected pin level. |