aiwb212f 2.1.0.0
Ai-WB2-12F Click Driver

API for configuring and manipulating Ai-WB2-12F Click driver. More...

Topics

 Ai-WB2-12F Device Settings
 Settings for registers of Ai-WB2-12F Click driver.
 
 Ai-WB2-12F MikroBUS Map
 MikroBUS pin mapping of Ai-WB2-12F Click driver.
 

Functions

void aiwb212f_cfg_setup (aiwb212f_cfg_t *cfg)
 Ai-WB2-12F configuration object setup function.
 
err_t aiwb212f_init (aiwb212f_t *ctx, aiwb212f_cfg_t *cfg)
 Ai-WB2-12F initialization function.
 
err_t aiwb212f_default_cfg (aiwb212f_t *ctx)
 Ai-WB2-12F default configuration function.
 
err_t aiwb212f_generic_write (aiwb212f_t *ctx, uint8_t *data_in, uint16_t len)
 Ai-WB2-12F data writing function.
 
err_t aiwb212f_generic_read (aiwb212f_t *ctx, uint8_t *data_out, uint16_t len)
 Ai-WB2-12F data reading function.
 
void aiwb212f_hw_reset (aiwb212f_t *ctx)
 Ai-WB2-12F hardware reset function.
 
void aiwb212f_send_cmd (aiwb212f_t *ctx, uint8_t *at_cmd_buf)
 Ai-WB2-12F send command function.
 
void aiwb212f_send_cmd_with_par (aiwb212f_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf)
 Ai-WB2-12F send command with parameter function.
 
void aiwb212f_send_cmd_check (aiwb212f_t *ctx, uint8_t *at_cmd_buf)
 Ai-WB2-12F send command check function.
 
void aiwb212f_set_gpio (aiwb212f_t *ctx, uint8_t *pin, uint8_t *state)
 Ai-WB2-12F set gpio pin state function.
 

Detailed Description

API for configuring and manipulating Ai-WB2-12F 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

◆ aiwb212f_cfg_setup()

void aiwb212f_cfg_setup ( aiwb212f_cfg_t * cfg)

Ai-WB2-12F configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ aiwb212f_default_cfg()

err_t aiwb212f_default_cfg ( aiwb212f_t * ctx)

Ai-WB2-12F default configuration function.

This function executes a default configuration of Ai-WB2-12F click board.

Parameters
[in]ctx: Click context object. See aiwb212f_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ aiwb212f_generic_read()

err_t aiwb212f_generic_read ( aiwb212f_t * ctx,
uint8_t * data_out,
uint16_t len )

Ai-WB2-12F data reading function.

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

Parameters
[in]ctx: Click context object. See aiwb212f_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.

◆ aiwb212f_generic_write()

err_t aiwb212f_generic_write ( aiwb212f_t * ctx,
uint8_t * data_in,
uint16_t len )

Ai-WB2-12F data writing function.

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

Parameters
[in]ctx: Click context object. See aiwb212f_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.

◆ aiwb212f_hw_reset()

void aiwb212f_hw_reset ( aiwb212f_t * ctx)

Ai-WB2-12F hardware reset function.

This function is used to perform a hardware reset of the device.

Parameters
[in]ctx: Click context object. See aiwb212f_t object definition for detailed explanation.
Returns
Nothing.
Note
None.

◆ aiwb212f_init()

err_t aiwb212f_init ( aiwb212f_t * ctx,
aiwb212f_cfg_t * cfg )

Ai-WB2-12F initialization function.

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

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

◆ aiwb212f_send_cmd()

void aiwb212f_send_cmd ( aiwb212f_t * ctx,
uint8_t * at_cmd_buf )

Ai-WB2-12F send command function.

This function is used to send a desired command.

Parameters
[in]ctx: Click context object. See aiwb212f_t object definition for detailed explanation.
[in]at_cmd_buf: Command string.
Returns
Nothing.
Note
None.

◆ aiwb212f_send_cmd_check()

void aiwb212f_send_cmd_check ( aiwb212f_t * ctx,
uint8_t * at_cmd_buf )

Ai-WB2-12F send command check function.

This function sends a desired command with the question mark for checking parameters.

Parameters
[in]ctx: Click context object. See aiwb212f_t object definition for detailed explanation.
[in]at_cmd_buf: Command string.
Returns
Nothing.
Note
None.

◆ aiwb212f_send_cmd_with_par()

void aiwb212f_send_cmd_with_par ( aiwb212f_t * ctx,
uint8_t * at_cmd_buf,
uint8_t * param_buf )

Ai-WB2-12F send command with parameter function.

This function sends a desired command with the parameter.

Parameters
[in]ctx: Click context object. See aiwb212f_t object definition for detailed explanation.
[in]at_cmd_buf: Command string.
[in]param_buf: Parameters string.
Returns
Nothing.
Note
None.

◆ aiwb212f_set_gpio()

void aiwb212f_set_gpio ( aiwb212f_t * ctx,
uint8_t * pin,
uint8_t * state )

Ai-WB2-12F set gpio pin state function.

This function sends a command to change state of the selected GPIO pin.

Parameters
[in]ctx: Click context object. See aiwb212f_t object definition for detailed explanation.
[in]pin: Selected pin.
[in]pin: Pin state.
Returns
Nothing.
Note
None.