uwb4
2.1.0.0
|
API for configuring and manipulating UWB 4 Click driver. More...
Modules | |
UWB 4 Device Settings | |
Settings for registers of UWB 4 Click driver. | |
UWB 4 MikroBUS Map | |
MikroBUS pin mapping of UWB 4 Click driver. | |
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... | |
API for configuring and manipulating UWB 4 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void uwb4_cfg_setup | ( | uwb4_cfg_t * | cfg | ) |
UWB 4 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See uwb4_cfg_t object definition for detailed explanation. |
void uwb4_cmd_run | ( | uwb4_t * | ctx, |
uint8_t * | cmd | ||
) |
UWB 4 cmd run function.
This function sends a specified command to the click module.
[in] | ctx | : Click context object. See uwb4_t object definition for detailed explanation. |
[in] | cmd | : Command string. |
void uwb4_cmd_set | ( | uwb4_t * | ctx, |
uint8_t * | cmd, | ||
uint8_t * | value | ||
) |
UWB 4 cmd set function.
This function sets a value to a specified command of the click module.
[in] | ctx | : Click context object. See uwb4_t object definition for detailed explanation. |
[in] | cmd | : Command string. |
[in] | value | : Value string. |
err_t uwb4_generic_read | ( | uwb4_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t | len | ||
) |
UWB 4 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See uwb4_t object definition for detailed explanation. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer. See #err_t definition for detailed explanation. err_t uwb4_generic_write | ( | uwb4_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | len | ||
) |
UWB 4 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See uwb4_t object definition for detailed explanation. |
[in] | data_in | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
>=0
- Success, <0
- Error. See #err_t definition for detailed explanation. uint8_t uwb4_get_btn_pin | ( | uwb4_t * | ctx | ) |
UWB 4 get BTN pin function.
This function returns the button pin logic state.
[in] | ctx | : Click context object. See uwb4_t object definition for detailed explanation. |
err_t uwb4_init | ( | uwb4_t * | ctx, |
uwb4_cfg_t * | cfg | ||
) |
UWB 4 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See uwb4_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See uwb4_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void uwb4_reset_device | ( | uwb4_t * | ctx | ) |
UWB 4 reset device function.
This function resets the device by toggling the reset pin logic state.
[in] | ctx | : Click context object. See uwb4_t object definition for detailed explanation. |