uwb3 2.1.0.0
UWB 3 Click Driver

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.
 

Detailed Description

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.

Function Documentation

◆ uwb3_cfg_setup()

void uwb3_cfg_setup ( uwb3_cfg_t * cfg)

UWB 3 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See uwb3_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ uwb3_generic_read()

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.

Parameters
[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.
Returns
  • >0 - Number of data bytes read,
  • <=0 - Error/Empty Ring buffer. See #err_t definition for detailed explanation.
Note
None.

◆ uwb3_generic_write()

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.

Parameters
[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.
Returns
  • >=0 - Success,
  • <0 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ uwb3_init()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ uwb3_reset_device()

void uwb3_reset_device ( uwb3_t * ctx)

UWB 3 reset device function.

This function resets the device by toggling the RST pin state.

Parameters
[in]ctx: Click context object. See uwb3_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ uwb3_send_cmd()

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.

Parameters
[in]ctx: Click context object. See uwb3_t object definition for detailed explanation.
[in]cmdCommand buffer.
Returns
None.
Note
None.

◆ uwb3_send_cmd_with_parameter()

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.

Parameters
[in]ctx: Click context object. See uwb3_t object definition for detailed explanation.
[in]cmdCommand buffer.
[in]paramParameter buffer.
Returns
None.
Note
None.

◆ uwb3_set_rst_pin()

void uwb3_set_rst_pin ( uwb3_t * ctx,
uint8_t state )

UWB 3 set rst pin function.

This function sets the RST pin logic state.

Parameters
[in]ctx: Click context object. See uwb3_t object definition for detailed explanation.
[in]state: Pin logic state.
Returns
None.
Note
None.