uwb3 2.1.0.0
|
API for configuring and manipulating UWB 3 Click driver. More...
Topics | |
UWB 3 Device Settings | |
Settings for registers of UWB 3 Click driver. | |
UWB 3 MikroBUS Map | |
MikroBUS pin mapping of UWB 3 Click driver. | |
Functions | |
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_write (uwb3_t *ctx, uint8_t *data_in, uint16_t len) |
UWB 3 data writing function. | |
err_t | uwb3_generic_read (uwb3_t *ctx, uint8_t *data_out, uint16_t len) |
UWB 3 data reading function. | |
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. | |
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. | |
API for configuring and manipulating UWB 3 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void uwb3_cfg_setup | ( | uwb3_cfg_t * | cfg | ) |
UWB 3 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See uwb3_cfg_t object definition for detailed explanation. |
err_t uwb3_generic_read | ( | uwb3_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t | len ) |
UWB 3 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See uwb3_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 uwb3_generic_write | ( | uwb3_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | len ) |
UWB 3 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See uwb3_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. err_t uwb3_init | ( | uwb3_t * | ctx, |
uwb3_cfg_t * | cfg ) |
UWB 3 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See uwb3_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See uwb3_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void uwb3_reset_device | ( | uwb3_t * | ctx | ) |
UWB 3 reset device function.
This function resets the device by toggling the RST pin state.
[in] | ctx | : Click context object. See uwb3_t object definition for detailed explanation. |
void uwb3_send_cmd | ( | uwb3_t * | ctx, |
uint8_t * | cmd ) |
UWB 3 send cmd function.
This function sends a specified command to the click module.
[in] | ctx | : Click context object. See uwb3_t object definition for detailed explanation. |
[in] | cmd | Command buffer. |
void uwb3_send_cmd_with_parameter | ( | uwb3_t * | ctx, |
uint8_t * | cmd, | ||
uint8_t * | param ) |
UWB 3 send cmd with parameter function.
This function sends a command with specified parameter to the click module.
[in] | ctx | : Click context object. See uwb3_t object definition for detailed explanation. |
[in] | cmd | Command buffer. |
[in] | param | Parameter buffer. |