lteiot4 2.0.0.0
LTE IoT 4 Click Driver

API for configuring and manipulating LTE IoT 4 Click driver. More...

Topics

 LTE IoT 4 Device Settings
 Settings for registers of LTE IoT 4 Click driver.
 
 LTE IoT 4 MikroBUS Map
 MikroBUS pin mapping of LTE IoT 4 Click driver.
 

Functions

void lteiot4_cfg_setup (lteiot4_cfg_t *cfg)
 LTE IoT 4 configuration object setup function.
 
err_t lteiot4_init (lteiot4_t *ctx, lteiot4_cfg_t *cfg)
 LTE IoT 4 initialization function.
 
err_t lteiot4_default_cfg (lteiot4_t *ctx)
 LTE IoT 4 default configuration function.
 
err_t lteiot4_generic_write (lteiot4_t *ctx, char *data_buf, uint16_t len)
 LTE IoT 4 data writing function.
 
err_t lteiot4_generic_read (lteiot4_t *ctx, char *data_buf, uint16_t max_len)
 LTE IoT 4 data reading function.
 
void lteiot4_set_rst (lteiot4_t *ctx, uint8_t state)
 Sets state of the rst pin setting.
 
void lteiot4_send_cmd (lteiot4_t *ctx, char *cmd)
 Send command function.
 
void lteiot4_set_sim_apn (lteiot4_t *ctx, char *sim_apn)
 Set sim card APN.
 

Detailed Description

API for configuring and manipulating LTE IoT 4 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

◆ lteiot4_cfg_setup()

void lteiot4_cfg_setup ( lteiot4_cfg_t * cfg)

LTE IoT 4 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ lteiot4_default_cfg()

err_t lteiot4_default_cfg ( lteiot4_t * ctx)

LTE IoT 4 default configuration function.

This function executes a default configuration of LTE IoT 4 click board.

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

◆ lteiot4_generic_read()

err_t lteiot4_generic_read ( lteiot4_t * ctx,
char * data_buf,
uint16_t max_len )

LTE IoT 4 data reading function.

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

Parameters
[in]ctx: Click context object. See lteiot4_t object definition for detailed explanation.
[out]data_buf: Output read data.
[in]max_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.

◆ lteiot4_generic_write()

err_t lteiot4_generic_write ( lteiot4_t * ctx,
char * data_buf,
uint16_t len )

LTE IoT 4 data writing function.

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

Parameters
[in]ctx: Click context object. See lteiot4_t object definition for detailed explanation.
[in]data_buf: 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.

◆ lteiot4_init()

err_t lteiot4_init ( lteiot4_t * ctx,
lteiot4_cfg_t * cfg )

LTE IoT 4 initialization function.

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

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

◆ lteiot4_send_cmd()

void lteiot4_send_cmd ( lteiot4_t * ctx,
char * cmd )

Send command function.

This function sends the specified command to the click module.

Parameters
[in]ctx: Click context object. See lteiot4_t object definition for detailed explanation.
[in]cmdCommand variable.
Returns
Nothing.
Note
Example of cmd -> "AT+CFUN=1".

◆ lteiot4_set_rst()

void lteiot4_set_rst ( lteiot4_t * ctx,
uint8_t state )

Sets state of the rst pin setting.

This function sets rst pin output to state setting.

Parameters
[in]ctxClick context object. See lteiot4_t object definition for detailed explanation.
[in]stateOutput value setting.
  • 0 - digital out high,
  • 1 - digital out low.

◆ lteiot4_set_sim_apn()

void lteiot4_set_sim_apn ( lteiot4_t * ctx,
char * sim_apn )

Set sim card APN.

This function sets APN for sim card.

Parameters
[in]ctx: Click context object. See lteiot4_t object definition for detailed explanation.
[in]sim_apnSIM card APN.
Returns
Nothing.
Note
Example of sim_apn -> "vip.mobile".