b102c  2.1.0.0
Modules | Functions
B102C Click Driver

API for configuring and manipulating B102C Click driver. More...

Modules

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

Functions

void b102c_cfg_setup (b102c_cfg_t *cfg)
 B102C configuration object setup function. More...
 
err_t b102c_init (b102c_t *ctx, b102c_cfg_t *cfg)
 B102C initialization function. More...
 
err_t b102c_default_cfg (b102c_t *ctx)
 B102C default configuration function. More...
 
err_t b102c_generic_write (b102c_t *ctx, uint8_t *data_in, uint16_t len)
 B102C data writing function. More...
 
err_t b102c_generic_read (b102c_t *ctx, uint8_t *data_out, uint16_t len)
 B102C data reading function. More...
 
void b102c_set_rst_pin (b102c_t *ctx, uint8_t pin_state)
 B102C set RST pin state function. More...
 
void b102c_hw_reset (b102c_t *ctx)
 B102C hardware reset function. More...
 
void b102c_send_cmd (b102c_t *ctx, uint8_t *cmd)
 B102C send command function. More...
 
void b102c_send_cmd_with_params (b102c_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf)
 B102C send command function with parameter. More...
 
void b102c_send_cmd_check (b102c_t *ctx, uint8_t *at_cmd_buf)
 B102C check the sent command. More...
 
void b102c_send_cmd_params_check (b102c_t *ctx, uint8_t *at_cmd_buf)
 B102C check the command parameters. More...
 

Detailed Description

API for configuring and manipulating B102C 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

◆ b102c_cfg_setup()

void b102c_cfg_setup ( b102c_cfg_t cfg)

B102C configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ b102c_default_cfg()

err_t b102c_default_cfg ( b102c_t ctx)

B102C default configuration function.

This function executes a default configuration of B102C click board.

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

◆ b102c_generic_read()

err_t b102c_generic_read ( b102c_t ctx,
uint8_t *  data_out,
uint16_t  len 
)

B102C data reading function.

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

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

◆ b102c_generic_write()

err_t b102c_generic_write ( b102c_t ctx,
uint8_t *  data_in,
uint16_t  len 
)

B102C data writing function.

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

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

◆ b102c_hw_reset()

void b102c_hw_reset ( b102c_t ctx)

B102C hardware reset function.

This function is used to perform a hardware reset of the B102C Click module.

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

◆ b102c_init()

err_t b102c_init ( b102c_t ctx,
b102c_cfg_t cfg 
)

B102C initialization function.

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

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

◆ b102c_send_cmd()

void b102c_send_cmd ( b102c_t ctx,
uint8_t *  cmd 
)

B102C send command function.

This function sends a specified command to the B102C Click module.

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

◆ b102c_send_cmd_check()

void b102c_send_cmd_check ( b102c_t ctx,
uint8_t *  at_cmd_buf 
)

B102C check the sent command.

This function checks the command that is sent.

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

◆ b102c_send_cmd_params_check()

void b102c_send_cmd_params_check ( b102c_t ctx,
uint8_t *  at_cmd_buf 
)

B102C check the command parameters.

This function checks the command that is sent.

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

◆ b102c_send_cmd_with_params()

void b102c_send_cmd_with_params ( b102c_t ctx,
uint8_t *  at_cmd_buf,
uint8_t *  param_buf 
)

B102C send command function with parameter.

This function sends a command with specified parameter to the click module.

Parameters
[in]ctx: Click context object. See b102c_t object definition for detailed explanation.
[in]at_cmd_bufCommand buffer.
[in]param_bufParameter buffer.
Returns
Nothing.
Note
None.

◆ b102c_set_rst_pin()

void b102c_set_rst_pin ( b102c_t ctx,
uint8_t  pin_state 
)

B102C set RST pin state function.

This function is used to set state of the RST pin of the B102C Click module.

Parameters
[in]ctx: Click context object. See b102c_t object definition for detailed explanation.
[in]pin_state: State of the RST pin.
Returns
Nothing.
Note
None.