iotexpresslink2 2.1.0.0
IoT ExpressLink 2 Click Driver

API for configuring and manipulating IoT ExpressLink 2 Click driver. More...

Topics

 IoT ExpressLink 2 Device Settings
 Settings for registers of IoT ExpressLink 2 Click driver.
 
 IoT ExpressLink 2 MikroBUS Map
 MikroBUS pin mapping of IoT ExpressLink 2 Click driver.
 

Functions

void iotexpresslink2_cfg_setup (iotexpresslink2_cfg_t *cfg)
 IoT ExpressLink 2 configuration object setup function.
 
err_t iotexpresslink2_init (iotexpresslink2_t *ctx, iotexpresslink2_cfg_t *cfg)
 IoT ExpressLink 2 initialization function.
 
err_t iotexpresslink2_generic_write (iotexpresslink2_t *ctx, uint8_t *data_in, uint16_t len)
 IoT ExpressLink 2 data writing function.
 
err_t iotexpresslink2_generic_read (iotexpresslink2_t *ctx, uint8_t *data_out, uint16_t len)
 IoT ExpressLink 2 data reading function.
 
void iotexpresslink2_send_cmd (iotexpresslink2_t *ctx, uint8_t *cmd)
 IoT ExpressLink 2 send cmd function.
 
void iotexpresslink2_set_pwr_pin (iotexpresslink2_t *ctx, uint8_t state)
 IoT ExpressLink 2 set pwr pin function.
 
void iotexpresslink2_set_rst_pin (iotexpresslink2_t *ctx, uint8_t state)
 IoT ExpressLink 2 set rst pin function.
 
uint8_t iotexpresslink2_get_wake_pin (iotexpresslink2_t *ctx)
 IoT ExpressLink 2 get wake pin function.
 
uint8_t iotexpresslink2_get_event_pin (iotexpresslink2_t *ctx)
 IoT ExpressLink 2 get event pin function.
 
void iotexpresslink2_power_on (iotexpresslink2_t *ctx)
 IoT ExpressLink 2 power on function.
 
void iotexpresslink2_reset_device (iotexpresslink2_t *ctx)
 IoT ExpressLink 2 reset device function.
 

Detailed Description

API for configuring and manipulating IoT ExpressLink 2 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

◆ iotexpresslink2_cfg_setup()

void iotexpresslink2_cfg_setup ( iotexpresslink2_cfg_t * cfg)

IoT ExpressLink 2 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ iotexpresslink2_generic_read()

err_t iotexpresslink2_generic_read ( iotexpresslink2_t * ctx,
uint8_t * data_out,
uint16_t len )

IoT ExpressLink 2 data reading function.

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

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

◆ iotexpresslink2_generic_write()

err_t iotexpresslink2_generic_write ( iotexpresslink2_t * ctx,
uint8_t * data_in,
uint16_t len )

IoT ExpressLink 2 data writing function.

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

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

◆ iotexpresslink2_get_event_pin()

uint8_t iotexpresslink2_get_event_pin ( iotexpresslink2_t * ctx)

IoT ExpressLink 2 get event pin function.

This function returns the event pin logic state.

Parameters
[in]ctx: Click context object. See iotexpresslink2_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ iotexpresslink2_get_wake_pin()

uint8_t iotexpresslink2_get_wake_pin ( iotexpresslink2_t * ctx)

IoT ExpressLink 2 get wake pin function.

This function returns the wake pin logic state.

Parameters
[in]ctx: Click context object. See iotexpresslink2_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ iotexpresslink2_init()

err_t iotexpresslink2_init ( iotexpresslink2_t * ctx,
iotexpresslink2_cfg_t * cfg )

IoT ExpressLink 2 initialization function.

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

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

◆ iotexpresslink2_power_on()

void iotexpresslink2_power_on ( iotexpresslink2_t * ctx)

IoT ExpressLink 2 power on function.

This function performs the power on sequence.

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

◆ iotexpresslink2_reset_device()

void iotexpresslink2_reset_device ( iotexpresslink2_t * ctx)

IoT ExpressLink 2 reset device function.

This function resets the device by toggling the RST pin state.

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

◆ iotexpresslink2_send_cmd()

void iotexpresslink2_send_cmd ( iotexpresslink2_t * ctx,
uint8_t * cmd )

IoT ExpressLink 2 send cmd function.

This function send command string by using UART serial interface.

Parameters
[in]ctx: Click context object. See iotexpresslink2_t object definition for detailed explanation.
[in]cmd: Command string to send.
Returns
None.
Note
None.

◆ iotexpresslink2_set_pwr_pin()

void iotexpresslink2_set_pwr_pin ( iotexpresslink2_t * ctx,
uint8_t state )

IoT ExpressLink 2 set pwr pin function.

This function sets the PWR pin logic state.

Parameters
[in]ctx: Click context object. See iotexpresslink2_t object definition for detailed explanation.
[in]state: Pin logic state.
Returns
None.
Note
None.

◆ iotexpresslink2_set_rst_pin()

void iotexpresslink2_set_rst_pin ( iotexpresslink2_t * ctx,
uint8_t state )

IoT ExpressLink 2 set rst pin function.

This function sets the RST pin logic state.

Parameters
[in]ctx: Click context object. See iotexpresslink2_t object definition for detailed explanation.
[in]state: Pin logic state.
Returns
None.
Note
None.