ltecat1us 2.0.0.0
LTE Cat.1-US Click Driver

API for configuring and manipulating LTE Cat.1-US Click driver. More...

Topics

 LTE Cat.1-US Device Settings
 Settings for registers of LTE Cat.1-US Click driver.
 
 LTE Cat.1-US MikroBUS Map
 MikroBUS pin mapping of LTE Cat.1-US Click driver.
 

Functions

void ltecat1us_cfg_setup (ltecat1us_cfg_t *cfg)
 LTE Cat.1-US configuration object setup function.
 
err_t ltecat1us_init (ltecat1us_t *ctx, ltecat1us_cfg_t *cfg)
 LTE Cat.1-US initialization function.
 
void ltecat1us_generic_write (ltecat1us_t *ctx, char *data_buf, uint16_t len)
 LTE Cat.1-US data writing function.
 
err_t ltecat1us_generic_read (ltecat1us_t *ctx, char *data_buf, uint16_t max_len)
 LTE Cat.1-US data reading function.
 
void ltecat1us_power_on (ltecat1us_t *ctx)
 LTE Cat.1-US module power on.
 
void ltecat1us_set_rst (ltecat1us_t *ctx, uint8_t state)
 Sets state of the RST pin.
 
void ltecat1us_set_rts (ltecat1us_t *ctx, uint8_t state)
 Sets state of the RTS pin.
 
uint8_t ltecat1us_get_cts (ltecat1us_t *ctx)
 CTS Pin Get function.
 
void ltecat1us_send_cmd (ltecat1us_t *ctx, char *cmd)
 Send command function.
 
void ltecat1us_send_cmd_with_parameter (ltecat1us_t *ctx, char *at_cmd_buf, char *param_buf)
 Send command function with parameter.
 
void ltecat1us_send_cmd_check (ltecat1us_t *ctx, char *at_cmd_buf)
 Check the sent command.
 
void ltecat1us_send_cmd_parameter_check (ltecat1us_t *ctx, char *at_cmd_buf)
 Check the command parameters.
 
void ltecat1us_set_sim_apn (ltecat1us_t *ctx, char *sim_apn)
 Set sim card APN.
 
void ltecat1us_send_text_message (ltecat1us_t *ctx, char *phone_number, char *message_context)
 LTE Cat.1-US send text message.
 

Detailed Description

API for configuring and manipulating LTE Cat.1-US 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

◆ ltecat1us_cfg_setup()

void ltecat1us_cfg_setup ( ltecat1us_cfg_t * cfg)

LTE Cat.1-US configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ ltecat1us_generic_read()

err_t ltecat1us_generic_read ( ltecat1us_t * ctx,
char * data_buf,
uint16_t max_len )

LTE Cat.1-US data reading function.

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

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

◆ ltecat1us_generic_write()

void ltecat1us_generic_write ( ltecat1us_t * ctx,
char * data_buf,
uint16_t len )

LTE Cat.1-US data writing function.

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

Parameters
[in]ctx: Click context object. See ltecat1us_t object definition for detailed explanation.
[in]data_buf: Data buffer for sending.
[in]len: Number of bytes for sending.
Returns
Nothing.
Note
None.

◆ ltecat1us_get_cts()

uint8_t ltecat1us_get_cts ( ltecat1us_t * ctx)

CTS Pin Get function.

This function allows user to check state of the CTS pin.

Parameters
[in]ctx: Click context object. See ltecat1us_t object definition for detailed explanation.
Returns
  • 0 logical low.
  • 1 logical high.

◆ ltecat1us_init()

err_t ltecat1us_init ( ltecat1us_t * ctx,
ltecat1us_cfg_t * cfg )

LTE Cat.1-US initialization function.

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

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

◆ ltecat1us_power_on()

void ltecat1us_power_on ( ltecat1us_t * ctx)

LTE Cat.1-US module power on.

This function resets the chip on LTE Cat.1-US click.

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

◆ ltecat1us_send_cmd()

void ltecat1us_send_cmd ( ltecat1us_t * ctx,
char * cmd )

Send command function.

This function sends the specified command to the click module.

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

◆ ltecat1us_send_cmd_check()

void ltecat1us_send_cmd_check ( ltecat1us_t * ctx,
char * at_cmd_buf )

Check the sent command.

This function checks the command that is sent.

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

◆ ltecat1us_send_cmd_parameter_check()

void ltecat1us_send_cmd_parameter_check ( ltecat1us_t * ctx,
char * at_cmd_buf )

Check the command parameters.

This function checks the command that is sent.

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

◆ ltecat1us_send_cmd_with_parameter()

void ltecat1us_send_cmd_with_parameter ( ltecat1us_t * ctx,
char * at_cmd_buf,
char * param_buf )

Send command function with parameter.

This function sends commands to the click module.

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

◆ ltecat1us_send_text_message()

void ltecat1us_send_text_message ( ltecat1us_t * ctx,
char * phone_number,
char * message_context )

LTE Cat.1-US send text message.

This function sends text message to a phone number.

Parameters
[in]ctx: Click context object. See ltecat1us_t object definition for detailed explanation.
[in]phone_numberPhone number to message.
[in]message_contextMessage to be sent.
Returns
Nothing.

◆ ltecat1us_set_rst()

void ltecat1us_set_rst ( ltecat1us_t * ctx,
uint8_t state )

Sets state of the RST pin.

This function sets RST pin state.

Parameters
[in]ctx: Click context object. See ltecat1us_t object definition for detailed explanation.
[in]statePin state ( 1 or 0 ).
Returns
Nothing.

◆ ltecat1us_set_rts()

void ltecat1us_set_rts ( ltecat1us_t * ctx,
uint8_t state )

Sets state of the RTS pin.

This function sets RTS pin state.

Parameters
[in]ctx: Click context object. See ltecat1us_t object definition for detailed explanation.
[in]statePin state ( 1 or 0 ).
Returns
Nothing.

◆ ltecat1us_set_sim_apn()

void ltecat1us_set_sim_apn ( ltecat1us_t * ctx,
char * sim_apn )

Set sim card APN.

This function sets APN for sim card.

Parameters
[in]ctx: Click context object. See ltecat1us_t object definition for detailed explanation.
[in]sim_apnSIM card APN.
Returns
Nothing.