Go to the documentation of this file.
35 #include "drv_digital_out.h"
36 #include "drv_digital_in.h"
65 #define NBIOT5_CMD_ATI "ATI"
66 #define NBIOT5_CMD_CIMI "AT+CIMI"
67 #define NBIOT5_CMD_CSQ "AT+CSQ"
69 #define NBIOT5_SET_CFUN "AT+CFUN=1"
70 #define NBIOT5_SET_CREG "AT+CREG=2"
71 #define NBIOT5_SET_COPS "AT+COPS=0"
72 #define NBIOT5_SET_CMGF "AT+CMGF=1"
74 #define NBIOT5_CHECK_CGATT "AT+CGATT?"
75 #define NBIOT5_CHECK_CREG "AT+CREG?"
82 #define DRV_BUFFER_SIZE 200
100 #define NBIOT5_MAP_MIKROBUS( cfg, mikrobus ) \
101 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
102 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
103 cfg.wkp = MIKROBUS( mikrobus, MIKROBUS_AN ); \
104 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
105 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
106 cfg.en = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
152 uart_data_bits_t data_bit;
153 uart_parity_t parity_bit;
154 uart_stop_bits_t stop_bit;
err_t nbiot5_generic_write(nbiot5_t *ctx, char *data_buf, uint16_t len)
NB IoT 5 data writing function.
err_t nbiot5_generic_read(nbiot5_t *ctx, char *data_buf, uint16_t max_len)
NB IoT 5 data reading function.
void nbiot5_set_en(nbiot5_t *ctx, uint8_t state)
Sets state of the en pin setting.
err_t nbiot5_init(nbiot5_t *ctx, nbiot5_cfg_t *cfg)
NB IoT 5 initialization function.
void nbiot5_set_wkp(nbiot5_t *ctx, uint8_t state)
Sets state of the wkp pin setting.
void nbiot5_set_sim_apn(nbiot5_t *ctx, char *sim_apn)
Set sim card APN.
#define DRV_BUFFER_SIZE
NB IoT 5 driver buffer size.
Definition: nbiot5.h:81
err_t nbiot5_default_cfg(nbiot5_t *ctx)
NB IoT 5 default configuration function.
NB IoT 5 Click configuration object.
Definition: nbiot5.h:135
NB IoT 5 Click context object.
Definition: nbiot5.h:114
void nbiot5_cfg_setup(nbiot5_cfg_t *cfg)
NB IoT 5 configuration object setup function.
void nbiot5_send_cmd(nbiot5_t *ctx, char *cmd)
Send command function.
void nbiot5_set_rst(nbiot5_t *ctx, uint8_t state)
Sets state of the rst pin setting.
void nbiot5_set_cs(nbiot5_t *ctx, uint8_t state)
Sets state of the cs pin setting.
void nbiot5_send_text_message(nbiot5_t *ctx, char *phone_number, char *message_context)
NB IoT 5 send text message.