uwb 2.0.0.0
Public function

Functions

void uwb_cfg_setup (uwb_cfg_t *cfg)
 Config Object Initialization function.
 
err_t uwb_init (uwb_t *ctx, uwb_cfg_t *cfg)
 Initialization function.
 
void uwb_generic_write (uwb_t *ctx, uint8_t reg_adr, uint8_t *tx_buf, uint16_t buf_len)
 Function for writing data to register.
 
void uwb_generic_read (uwb_t *ctx, uint8_t reg_adr, uint8_t *rx_buf, uint16_t buf_len)
 Function for reading data from register.
 
void uwb_set_rst_pin_status (uwb_t *ctx, uint8_t status)
 Function for setting rst pin status.
 
uint8_t uwb_get_qint_pin_status (uwb_t *ctx)
 Function for getting irq pin status.
 
void uwb_read_otp (uwb_t *ctx, uint16_t otp_adr, uint8_t *rx_buf)
 Function for reading OTM memory.
 
void uwb_set_bit (uwb_t *ctx, uint8_t reg_adr, uint16_t bit_num, uint8_t bit_state)
 Function for setting single bit state.
 
uint8_t uwb_get_bit (uwb_t *ctx, uint8_t reg_adr, uint16_t bit_num)
 Function for getting single bit state.
 
uint16_t uwb_reg_data_len (uint8_t reg_adr)
 Function for getting length of register data.
 
void uwb_set_dev_adr_n_network_id (uwb_t *ctx, uint16_t dev_adr, uint16_t net_id)
 Function for setting device address and network ID.
 
uint8_t uwb_set_data_rate (uwb_t *ctx, uint8_t rate)
 Function for setting data rate.
 
void uwb_set_pulse_freq (uwb_t *ctx, uint8_t freq)
 Function for setting pulse frequency.
 
void uwb_set_preamble_len (uwb_t *ctx, uint8_t prealen)
 Function for setting preamble length.
 
void uwb_set_preable_code (uwb_t *ctx, uint8_t preamble)
 Function for setting preamble code.
 
void uwb_set_channel (uwb_t *ctx, uint8_t channel)
 Function for setting channel.
 
void uwb_set_transmit_type (uwb_t *ctx, const uint8_t *t_t)
 Function for setting transmit type mode.
 
void uwb_get_transmit (uwb_t *ctx, uint8_t *rx_buf, uint16_t len_buf)
 Function for getting transmit data.
 
uint8_t uwb_get_transmit_len (uwb_t *ctx)
 Function for getting transmit length.
 
void uwb_set_transmit (uwb_t *ctx, uint8_t *tx_buf, uint16_t len_buf)
 Function for setting transmit data.
 
void uwb_use_smart_power (uwb_t *ctx, uint8_t smart_power)
 Function for setting smart power option.
 
void uwb_frame_check (uint8_t fc_val)
 Function for setting frame check option.
 
void uwb_frame_filter (uwb_t *ctx, uint8_t ff_val)
 Function for setting frame filter option.
 
void uwb_set_mode (uwb_t *ctx, uint8_t mode)
 Function for setting device working mode.
 
void uwb_start_transceiver (uwb_t *ctx)
 Function for starting communication of device.
 
uint8_t uwb_get_transmit_status (uwb_t *ctx)
 Function for getting transmit status.
 
void uwb_clear_status (uwb_t *ctx)
 Function for clearing status.
 
void uwb_int_mask_set (uwb_t *ctx)
 Function for setting interrupt mask.
 
void uwb_tune_config (uwb_t *ctx)
 Function for tuneing configuration for set values.
 
void uwb_dev_reset (uwb_t *ctx)
 Function for reseting device.
 
void uwb_enable (uwb_t *ctx)
 Function for enabling device.
 

Detailed Description

Function Documentation

◆ uwb_cfg_setup()

void uwb_cfg_setup ( uwb_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ uwb_clear_status()

void uwb_clear_status ( uwb_t * ctx)

Function for clearing status.

Parameters
ctxClick object.

This function clear status.

Note
Clearing status relative to previous sleceted device mode.

◆ uwb_dev_reset()

void uwb_dev_reset ( uwb_t * ctx)

Function for reseting device.

Parameters
ctxClick object.

This function reset device.

◆ uwb_enable()

void uwb_enable ( uwb_t * ctx)

Function for enabling device.

Parameters
ctxClick object.

This function enables device.

◆ uwb_frame_check()

void uwb_frame_check ( uint8_t fc_val)

Function for setting frame check option.

Parameters
ctxClick object.
fc_valFrame check data.

This function set frame check option.

◆ uwb_frame_filter()

void uwb_frame_filter ( uwb_t * ctx,
uint8_t ff_val )

Function for setting frame filter option.

Parameters
ctxClick object.
ff_valFrame filter data.

This function set frame filter option.

◆ uwb_generic_read()

void uwb_generic_read ( uwb_t * ctx,
uint8_t reg_adr,
uint8_t * rx_buf,
uint16_t buf_len )

Function for reading data from register.

Parameters
ctxClick object.
reg_adrRegister address.
rx_bufReceive buffer.
buf_lenReceive buffer length.

This function read data from register.

◆ uwb_generic_write()

void uwb_generic_write ( uwb_t * ctx,
uint8_t reg_adr,
uint8_t * tx_buf,
uint16_t buf_len )

Function for writing data to register.

Parameters
ctxClick object.
reg_adrRegister address.
tx_bufTransmit buffer.
buf_lenTransmit buffer length.

This function write data to register.

◆ uwb_get_bit()

uint8_t uwb_get_bit ( uwb_t * ctx,
uint8_t reg_adr,
uint16_t bit_num )

Function for getting single bit state.

Parameters
ctxClick object.
reg_adrRegister address of bit.
bit_numBit number.
Returns
Bit state getting single bit state.

This function

◆ uwb_get_qint_pin_status()

uint8_t uwb_get_qint_pin_status ( uwb_t * ctx)

Function for getting irq pin status.

Parameters
ctxClick object.
Returns
QINT pin status

This function gets irq pin status.

◆ uwb_get_transmit()

void uwb_get_transmit ( uwb_t * ctx,
uint8_t * rx_buf,
uint16_t len_buf )

Function for getting transmit data.

Parameters
ctxClick object.
rx_bufReceive buffer.
len_bufTransmit data length.

This function get transmit data.

◆ uwb_get_transmit_len()

uint8_t uwb_get_transmit_len ( uwb_t * ctx)

Function for getting transmit length.

Parameters
ctxClick object.
Returns
transmit length

This function get transmit length.

◆ uwb_get_transmit_status()

uint8_t uwb_get_transmit_status ( uwb_t * ctx)

Function for getting transmit status.

Parameters
ctxClick object.
Returns
OK or ERROR macro

This function get transmit status.

Note
Returns status is relative to previous selected device mode.

◆ uwb_init()

err_t uwb_init ( uwb_t * ctx,
uwb_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

This function initializes all necessary pins and peripherals used for this click.

◆ uwb_int_mask_set()

void uwb_int_mask_set ( uwb_t * ctx)

Function for setting interrupt mask.

Parameters
ctxClick object.

This function set interrupt mask.

Note
Setting interrupt mask relative to previous set device mode.

◆ uwb_read_otp()

void uwb_read_otp ( uwb_t * ctx,
uint16_t otp_adr,
uint8_t * rx_buf )

Function for reading OTM memory.

Parameters
ctxClick object.
otp_adrOtp register address.
rx_bufReceive data buffer.

This function read OTM memory.

◆ uwb_reg_data_len()

uint16_t uwb_reg_data_len ( uint8_t reg_adr)

Function for getting length of register data.

Parameters
ctxClick object.
reg_adrRegister address.
Returns
Register length

This function get length of register data

◆ uwb_set_bit()

void uwb_set_bit ( uwb_t * ctx,
uint8_t reg_adr,
uint16_t bit_num,
uint8_t bit_state )

Function for setting single bit state.

Parameters
ctxClick object.
reg_adrRegister address of bit.
bit_numBit number.
bit_stateBit state.

This function set single bit state.

◆ uwb_set_channel()

void uwb_set_channel ( uwb_t * ctx,
uint8_t channel )

Function for setting channel.

Parameters
ctxClick object.
channelDevice channel.

This function set channel.

◆ uwb_set_data_rate()

uint8_t uwb_set_data_rate ( uwb_t * ctx,
uint8_t rate )

Function for setting data rate.

Parameters
ctxClick object.
rateData rate.
Returns
OK or ERROR macro

This function set data rate.

◆ uwb_set_dev_adr_n_network_id()

void uwb_set_dev_adr_n_network_id ( uwb_t * ctx,
uint16_t dev_adr,
uint16_t net_id )

Function for setting device address and network ID.

Parameters
ctxClick object.
dev_adrDevice address.
net_idNetwork ID.

This function set device address and network ID

◆ uwb_set_mode()

void uwb_set_mode ( uwb_t * ctx,
uint8_t mode )

Function for setting device working mode.

Parameters
ctxClick object.
modeDevice working mode.

This function set device working mode.

Note
Should be first function called in driver after initialization.

◆ uwb_set_preable_code()

void uwb_set_preable_code ( uwb_t * ctx,
uint8_t preamble )

Function for setting preamble code.

Parameters
ctxClick object.
preambleDevice preamble code.

This function set preamble code.

◆ uwb_set_preamble_len()

void uwb_set_preamble_len ( uwb_t * ctx,
uint8_t prealen )

Function for setting preamble length.

Parameters
ctxClick object.
prealenDevice preamble length.

This function set preamble length.

◆ uwb_set_pulse_freq()

void uwb_set_pulse_freq ( uwb_t * ctx,
uint8_t freq )

Function for setting pulse frequency.

Parameters
ctxClick object.
freqDevice pulse frequency.

This function set pulse frequency.

◆ uwb_set_rst_pin_status()

void uwb_set_rst_pin_status ( uwb_t * ctx,
uint8_t status )

Function for setting rst pin status.

Parameters
ctxClick object.
statusPin status.

This function sets rst pin status.

◆ uwb_set_transmit()

void uwb_set_transmit ( uwb_t * ctx,
uint8_t * tx_buf,
uint16_t len_buf )

Function for setting transmit data.

Parameters
ctxClick object.
tx_bufTransmit buffer.
len_bufTransmit data length.

This function set transmit data.

◆ uwb_set_transmit_type()

void uwb_set_transmit_type ( uwb_t * ctx,
const uint8_t * t_t )

Function for setting transmit type mode.

Parameters
ctxClick object.
t_tTransmit type mode.

This function set transmit type mode.

◆ uwb_start_transceiver()

void uwb_start_transceiver ( uwb_t * ctx)

Function for starting communication of device.

Parameters
ctxClick object.

This function start communication of device.

Note
Function is called to start transmiting or receiving data.

◆ uwb_tune_config()

void uwb_tune_config ( uwb_t * ctx)

Function for tuneing configuration for set values.

Parameters
ctxClick object.

This function tune configuration for set values.

Note
Should be called after other configuration is set. It will do some additional configuration to device relative to some other parameteres.

◆ uwb_use_smart_power()

void uwb_use_smart_power ( uwb_t * ctx,
uint8_t smart_power )

Function for setting smart power option.

Parameters
ctxClick object.
smart_powerSmart power data.

This function set smart power option.