nbiot 2.0.0.0
nbiot.h File Reference

This file contains API for NB IoT Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_uart.h"

Go to the source code of this file.

Data Structures

struct  nbiot_t
 Click ctx object definition. More...
 
struct  nbiot_cfg_t
 Click configuration structure definition. More...
 

Macros

#define NBIOT_MAP_MIKROBUS(cfg, mikrobus)
 
#define NBIOT_RETVAL   uint8_t
 
#define NBIOT_OK   0x00
 
#define NBIOT_INIT_ERROR   0xFF
 
#define NBIOT_CMD_AT   "AT"
 
#define NBIOT_CMD_ATI   "ATI"
 
#define NBIOT_CMD_CGMR   "AT+CGMR"
 
#define NBIOT_CMD_CFUN   "AT+CFUN"
 
#define NBIOT_CMD_CEREG   "AT+CEREG"
 
#define NBIOT_CMD_CGDCONT   "AT+CGDCONT"
 
#define NBIOT_CMD_CIMI   "AT+CIMI"
 
#define NBIOT_CMD_CGATT   "AT+CGATT"
 
#define NBIOT_CMD_CSQ   "AT+CSQ"
 
#define NBIOT_CMD_CESQ   "AT+CESQ"
 
#define NBIOT_CMD_COPS   "AT+COPS"
 
#define DRV_RX_BUFFER_SIZE   500
 
#define DRV_TX_BUFFER_SIZE   100
 

Typedefs

typedef uint8_t nbiot_actuator_sw_t
 Error type.
 
typedef int16_t nbiot_actuator_cnt_t
 
typedef char nbiot_actuator_str_t
 
typedef uint8_t nbiot_error_t
 

Functions

void nbiot_cfg_setup (nbiot_cfg_t *cfg)
 NB IoT configuration object setup function.
 
err_t nbiot_init (nbiot_t *ctx, nbiot_cfg_t *cfg)
 NB IoT initialization function.
 
err_t nbiot_generic_write (nbiot_t *ctx, char *data_buf, uint16_t len)
 NB IoT data writing function.
 
err_t nbiot_generic_read (nbiot_t *ctx, char *data_buf, uint16_t max_len)
 NB IoT data reading function.
 
void nbiot_power_on (nbiot_t *ctx)
 NB IoT module power on.
 
void nbiot_set_rst (nbiot_t *ctx, uint8_t state)
 Sets state of the RST pin.
 
uint8_t nbiot_get_stat (nbiot_t *ctx)
 STAT Pin Get function.
 
void nbiot_send_cmd (nbiot_t *ctx, char *cmd)
 Send command function.
 
void nbiot_send_cmd_with_parameter (nbiot_t *ctx, char *at_cmd_buf, char *param_buf)
 Send command function with parameter.
 
void nbiot_send_cmd_check (nbiot_t *ctx, char *at_cmd_buf)
 Check the sent command.
 
void nbiot_send_cmd_parameter_check (nbiot_t *ctx, char *at_cmd_buf)
 Check the command parameters.
 
void nbiot_set_sim_apn (nbiot_t *ctx, char *sim_apn)
 Set sim card APN.
 

Detailed Description

This file contains API for NB IoT Click driver.