nbiot5
2.0.0.0
|
API for configuring and manipulating NB IoT 5 Click driver. More...
Modules | |
NB IoT 5 Commands List | |
List of commands of NB IoT 5 Click driver. | |
NB IoT 5 Device Settings | |
Settings for registers of NB IoT 5 Click driver. | |
NB IoT 5 MikroBUS Map | |
MikroBUS pin mapping of NB IoT 5 Click driver. | |
Functions | |
void | nbiot5_cfg_setup (nbiot5_cfg_t *cfg) |
NB IoT 5 configuration object setup function. More... | |
err_t | nbiot5_init (nbiot5_t *ctx, nbiot5_cfg_t *cfg) |
NB IoT 5 initialization function. More... | |
err_t | nbiot5_default_cfg (nbiot5_t *ctx) |
NB IoT 5 default configuration function. More... | |
err_t | nbiot5_generic_write (nbiot5_t *ctx, char *data_buf, uint16_t len) |
NB IoT 5 data writing function. More... | |
err_t | nbiot5_generic_read (nbiot5_t *ctx, char *data_buf, uint16_t max_len) |
NB IoT 5 data reading function. More... | |
void | nbiot5_set_wkp (nbiot5_t *ctx, uint8_t state) |
Sets state of the wkp pin setting. More... | |
void | nbiot5_set_en (nbiot5_t *ctx, uint8_t state) |
Sets state of the en pin setting. More... | |
void | nbiot5_set_rst (nbiot5_t *ctx, uint8_t state) |
Sets state of the rst pin setting. More... | |
void | nbiot5_set_cs (nbiot5_t *ctx, uint8_t state) |
Sets state of the cs pin setting. More... | |
void | nbiot5_send_cmd (nbiot5_t *ctx, char *cmd) |
Send command function. More... | |
void | nbiot5_set_sim_apn (nbiot5_t *ctx, char *sim_apn) |
Set sim card APN. More... | |
void | nbiot5_send_text_message (nbiot5_t *ctx, char *phone_number, char *message_context) |
NB IoT 5 send text message. More... | |
API for configuring and manipulating NB IoT 5 Click driver.
void nbiot5_cfg_setup | ( | nbiot5_cfg_t * | cfg | ) |
NB IoT 5 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See nbiot5_cfg_t object definition for detailed explanation. |
err_t nbiot5_default_cfg | ( | nbiot5_t * | ctx | ) |
NB IoT 5 default configuration function.
This function executes a default configuration of NB IoT 5 click board.
[in] | ctx | : Click context object. See nbiot5_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t nbiot5_generic_read | ( | nbiot5_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len | ||
) |
NB IoT 5 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See nbiot5_t object definition for detailed explanation. |
[out] | data_buf | : Output read data. |
[in] | max_len | : Number of bytes to be read. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer.err_t nbiot5_generic_write | ( | nbiot5_t * | ctx, |
char * | data_buf, | ||
uint16_t | len | ||
) |
NB IoT 5 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See nbiot5_t object definition for detailed explanation. |
[in] | data_buf | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
>=0
- Success, <0
- Error.err_t nbiot5_init | ( | nbiot5_t * | ctx, |
nbiot5_cfg_t * | cfg | ||
) |
NB IoT 5 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See nbiot5_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See nbiot5_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void nbiot5_send_cmd | ( | nbiot5_t * | ctx, |
char * | cmd | ||
) |
Send command function.
This function sends the specified command to the click module.
[in] | ctx | : Click context object. See nbiot5_t object definition for detailed explanation. |
[in] | cmd | Command variable. |
void nbiot5_send_text_message | ( | nbiot5_t * | ctx, |
char * | phone_number, | ||
char * | message_context | ||
) |
NB IoT 5 send text message.
This function sends text message to a phone number.
[in] | ctx | : Click context object. See nbiot5_t object definition for detailed explanation. |
[in] | phone_number | Phone number to message. |
[in] | message_context | Message to be sent. |
void nbiot5_set_cs | ( | nbiot5_t * | ctx, |
uint8_t | state | ||
) |
Sets state of the cs pin setting.
This function sets cs pin output to state setting.
[in] | ctx | Click context object. See nbiot5_t object definition for detailed explanation. |
[in] | state | Output value setting.
|
void nbiot5_set_en | ( | nbiot5_t * | ctx, |
uint8_t | state | ||
) |
Sets state of the en pin setting.
This function sets en pin output to state setting.
[in] | ctx | Click context object. See nbiot5_t object definition for detailed explanation. |
[in] | state | Output value setting.
|
void nbiot5_set_rst | ( | nbiot5_t * | ctx, |
uint8_t | state | ||
) |
Sets state of the rst pin setting.
This function sets rst pin output to state setting.
[in] | ctx | Click context object. See nbiot5_t object definition for detailed explanation. |
[in] | state | Output value setting.
|
void nbiot5_set_sim_apn | ( | nbiot5_t * | ctx, |
char * | sim_apn | ||
) |
Set sim card APN.
This function sets APN for sim card.
[in] | ctx | : Click context object. See nbiot5_t object definition for detailed explanation. |
[in] | sim_apn | SIM card APN. |
void nbiot5_set_wkp | ( | nbiot5_t * | ctx, |
uint8_t | state | ||
) |
Sets state of the wkp pin setting.
This function sets wkp pin output to state setting.
[in] | ctx | Click context object. See nbiot5_t object definition for detailed explanation. |
[in] | state | Output value setting.
|