uwb4  2.1.0.0
Modules | Functions
UWB 4 Click Driver

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...
 

Detailed Description

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.

Function Documentation

◆ uwb4_cfg_setup()

void uwb4_cfg_setup ( uwb4_cfg_t cfg)

UWB 4 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ uwb4_cmd_run()

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.

Parameters
[in]ctx: Click context object. See uwb4_t object definition for detailed explanation.
[in]cmd: Command string.
Returns
None.
Note
None.

◆ uwb4_cmd_set()

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.

Parameters
[in]ctx: Click context object. See uwb4_t object definition for detailed explanation.
[in]cmd: Command string.
[in]value: Value string.
Returns
None.
Note
None.

◆ uwb4_generic_read()

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.

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

◆ uwb4_generic_write()

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.

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

◆ uwb4_get_btn_pin()

uint8_t uwb4_get_btn_pin ( uwb4_t ctx)

UWB 4 get BTN pin function.

This function returns the button pin logic state.

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

◆ uwb4_init()

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.

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

◆ uwb4_reset_device()

void uwb4_reset_device ( uwb4_t ctx)

UWB 4 reset device function.

This function resets the device by toggling the reset pin logic state.

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

◆ uwb4_set_rst_pin()

void uwb4_set_rst_pin ( uwb4_t ctx,
uint8_t  state 
)

UWB 4 set RST pin function.

This function sets the reset pin logic state.

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