speakup3 2.1.0.0
SpeakUp 3 Click Driver

API for configuring and manipulating SpeakUp 3 Click driver. More...

Topics

 SpeakUp 3 Device Settings
 Settings for registers of SpeakUp 3 Click driver.
 
 SpeakUp 3 MikroBUS Map
 MikroBUS pin mapping of SpeakUp 3 Click driver.
 

Functions

void speakup3_cfg_setup (speakup3_cfg_t *cfg)
 SpeakUp 3 configuration object setup function.
 
err_t speakup3_init (speakup3_t *ctx, speakup3_cfg_t *cfg)
 SpeakUp 3 initialization function.
 
err_t speakup3_generic_write (speakup3_t *ctx, char *data_in, uint16_t len)
 SpeakUp 3 data writing function.
 
err_t speakup3_generic_read (speakup3_t *ctx, char *data_out, uint16_t len)
 SpeakUp 3 data reading function.
 
err_t speakup3_wait_for_reply (speakup3_t *ctx, uint8_t *reply_ins, uint32_t wait_ms)
 SpeakUp 3 wait for reply function.
 

Detailed Description

API for configuring and manipulating SpeakUp 3 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ speakup3_cfg_setup()

void speakup3_cfg_setup ( speakup3_cfg_t * cfg)

SpeakUp 3 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See speakup3_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ speakup3_generic_read()

err_t speakup3_generic_read ( speakup3_t * ctx,
char * data_out,
uint16_t len )

SpeakUp 3 data reading function.

This function reads a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See speakup3_t object definition for detailed explanation.
[out]data_out: Output read data.
[in]len: Number of bytes to be read.
Returns
  • >0 - Number of data bytes read,
  • <=0 - Error/Empty Ring buffer. See #err_t definition for detailed explanation.
Note
None.

◆ speakup3_generic_write()

err_t speakup3_generic_write ( speakup3_t * ctx,
char * data_in,
uint16_t len )

SpeakUp 3 data writing function.

This function writes a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See speakup3_t object definition for detailed explanation.
[in]data_in: Data buffer for sending.
[in]len: Number of bytes for sending.
Returns
  • >=0 - Success,
  • <0 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ speakup3_init()

err_t speakup3_init ( speakup3_t * ctx,
speakup3_cfg_t * cfg )

SpeakUp 3 initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See speakup3_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See speakup3_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ speakup3_wait_for_reply()

err_t speakup3_wait_for_reply ( speakup3_t * ctx,
uint8_t * reply_ins,
uint32_t wait_ms )

SpeakUp 3 wait for reply function.

This function waits up to wait_ms for a reply to the voice command.

Parameters
[in]ctx: Click context object. See speakup3_t object definition for detailed explanation.
[out]reply_ins: Reply instruction code.
[in]wait_ms: Wait period in milliseconds.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.