uwb4  2.1.0.0
Data Structures | Macros | Enumerations | Functions
uwb4.h File Reference

This file contains API for UWB 4 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  uwb4_t
 UWB 4 Click context object. More...
 
struct  uwb4_cfg_t
 UWB 4 Click configuration object. More...
 

Macros

#define UWB4_CMD_AT   "AT"
 UWB 4 control commands. More...
 
#define UWB4_CMD_DISABLE_ECHO   "ATE0"
 
#define UWB4_CMD_ENABLE_ECHO   "ATE1"
 
#define UWB4_CMD_GET_MODULE_NAME   "ATI0"
 
#define UWB4_CMD_GET_FIRMWARE_VERSION   "ATI3"
 
#define UWB4_CMD_GET_BLE_ADDRESS   "ATI4"
 
#define UWB4_CMD_GET_UNIQUE_ID   "ATI5"
 
#define UWB4_CMD_GET_LAST_RESET_REASON   "ATI2001"
 
#define UWB4_CMD_GET_FREE_MEMORY   "ATI2002"
 
#define UWB4_CMD_GET_ALLOCATED_MEMORY   "ATI2003"
 
#define UWB4_CMD_RESET_MODULE   "ATZ"
 
#define UWB4_CMD_CREATE_SESSION   "AT+UWBS"
 
#define UWB4_CMD_DELETE_SESSION   "AT+UWBSD"
 
#define UWB4_CMD_SET_ADDRESS   "AT+UWBSA"
 
#define UWB4_CMD_ADD_PEER   "AT+UWBSAM"
 
#define UWB4_CMD_REMOVE_PEER   "AT+UWBSAMX"
 
#define UWB4_CMD_SET_RANGING_INTERVAL   "AT+UWBSI"
 
#define UWB4_CMD_SET_SESSION_CONFIG   "AT+UWBSC"
 
#define UWB4_CMD_START_SESSION   "AT+UWBSS"
 
#define UWB4_RSP_OK   "OK"
 UWB 4 device response for AT commands. More...
 
#define UWB4_RSP_ERROR   "ERROR"
 
#define UWB4_RSP_RANGE   "RANGE:"
 
#define UWB4_TX_DRV_BUFFER_SIZE   256
 UWB 4 driver buffer size. More...
 
#define UWB4_RX_DRV_BUFFER_SIZE   256
 
#define UWB4_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping. More...
 

Enumerations

enum  uwb4_return_value_t { UWB4_OK = 0, UWB4_ERROR = -1, UWB4_ERROR_TIMEOUT = -2, UWB4_ERROR_CMD = -3 }
 UWB 4 Click return value data. More...
 

Functions

void uwb4_cfg_setup (uwb4_cfg_t *cfg)
 UWB 4 configuration object setup function. More...
 
err_t uwb4_init (uwb4_t *ctx, uwb4_cfg_t *cfg)
 UWB 4 initialization function. More...
 
err_t uwb4_generic_write (uwb4_t *ctx, uint8_t *data_in, uint16_t len)
 UWB 4 data writing function. More...
 
err_t uwb4_generic_read (uwb4_t *ctx, uint8_t *data_out, uint16_t len)
 UWB 4 data reading function. More...
 
void uwb4_set_rst_pin (uwb4_t *ctx, uint8_t state)
 UWB 4 set RST pin function. More...
 
void uwb4_reset_device (uwb4_t *ctx)
 UWB 4 reset device function. More...
 
uint8_t uwb4_get_btn_pin (uwb4_t *ctx)
 UWB 4 get BTN pin function. More...
 
void uwb4_cmd_run (uwb4_t *ctx, uint8_t *cmd)
 UWB 4 cmd run function. More...
 
void uwb4_cmd_set (uwb4_t *ctx, uint8_t *cmd, uint8_t *value)
 UWB 4 cmd set function. More...
 

Detailed Description

This file contains API for UWB 4 Click Driver.

Enumeration Type Documentation

◆ uwb4_return_value_t

UWB 4 Click return value data.

Predefined enum values for driver return values.

Enumerator
UWB4_OK 
UWB4_ERROR 
UWB4_ERROR_TIMEOUT 
UWB4_ERROR_CMD