39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
73#define UWB3_CMD_HELP "help"
74#define UWB3_CMD_STAT "stat"
75#define UWB3_CMD_DECA "deca$"
76#define UWB3_CMD_STOP "stop"
77#define UWB3_CMD_SAVE "save"
78#define UWB3_CMD_THREAD "thread"
84#define UWB3_CMD_LISTENER2 "listener2"
85#define UWB3_CMD_TCFM "tcfm"
86#define UWB3_CMD_TCWM "tcwm"
87#define UWB3_CMD_RESPF "respf"
88#define UWB3_CMD_INITF "initf"
94#define UWB3_CMD_LSTAT "lstat"
100#define UWB3_CMD_PAVRG "pavrg"
106#define UWB3_CMD_ANTTXA "anttxa"
107#define UWB3_CMD_ANTRXA "antrxa"
108#define UWB3_CMD_XTALTRIM "xtaltrim"
109#define UWB3_CMD_PDOAOFF "pdoaoff"
110#define UWB3_CMD_UART "uart"
116#define UWB3_CMD_RESTORE "restore"
117#define UWB3_CMD_DIAG "diag"
118#define UWB3_CMD_UWBCFG "uwbcfg"
119#define UWB3_CMD_STSKEYIV "stskeyiv"
120#define UWB3_CMD_TXPOWER "txpower"
121#define UWB3_CMD_ANTENNA "antenna"
122#define UWB3_CMD_DECAID "decaid"
123#define UWB3_CMD_VERSION "version"
129#define UWB3_RSP_OK "ok"
130#define UWB3_RSP_ERROR "error"
137#define UWB3_TX_DRV_BUFFER_SIZE 100
138#define UWB3_RX_DRV_BUFFER_SIZE 1000
156#define UWB3_MAP_MIKROBUS( cfg, mikrobus ) \
157 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
158 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
159 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST );
#define UWB3_TX_DRV_BUFFER_SIZE
UWB 3 driver buffer size.
Definition uwb3.h:137
#define UWB3_RX_DRV_BUFFER_SIZE
Definition uwb3.h:138
void uwb3_send_cmd(uwb3_t *ctx, uint8_t *cmd)
UWB 3 send cmd function.
void uwb3_send_cmd_with_parameter(uwb3_t *ctx, uint8_t *cmd, uint8_t *param)
UWB 3 send cmd with parameter function.
err_t uwb3_generic_write(uwb3_t *ctx, uint8_t *data_in, uint16_t len)
UWB 3 data writing function.
void uwb3_cfg_setup(uwb3_cfg_t *cfg)
UWB 3 configuration object setup function.
err_t uwb3_init(uwb3_t *ctx, uwb3_cfg_t *cfg)
UWB 3 initialization function.
err_t uwb3_generic_read(uwb3_t *ctx, uint8_t *data_out, uint16_t len)
UWB 3 data reading function.
void uwb3_set_rst_pin(uwb3_t *ctx, uint8_t state)
UWB 3 set rst pin function.
void uwb3_reset_device(uwb3_t *ctx)
UWB 3 reset device function.
UWB 3 Click configuration object.
Definition uwb3.h:187
uint32_t baud_rate
Definition uwb3.h:196
bool uart_blocking
Definition uwb3.h:197
uart_data_bits_t data_bit
Definition uwb3.h:198
pin_name_t tx_pin
Definition uwb3.h:190
pin_name_t rx_pin
Definition uwb3.h:189
uart_stop_bits_t stop_bit
Definition uwb3.h:200
uart_parity_t parity_bit
Definition uwb3.h:199
pin_name_t rst
Definition uwb3.h:193
UWB 3 Click context object.
Definition uwb3.h:169
uart_t uart
Definition uwb3.h:174
digital_out_t rst
Definition uwb3.h:171
uwb3_return_value_t
UWB 3 Click return value data.
Definition uwb3.h:209
@ UWB3_OK
Definition uwb3.h:210
@ UWB3_ERROR_TIMEOUT
Definition uwb3.h:212
@ UWB3_ERROR
Definition uwb3.h:211