bletx 2.0.0.0
BLE TX Click Driver

API for configuring and manipulating BLE TX Click driver. More...

Topics

 BLE TX selection.
 Selection of BLE TX Click driver.
 
 BLE TX Registers List
 List of registers of BLE TX Click driver.
 
 BLE TX Registers Settings
 Settings for registers of BLE TX Click driver.
 
 BLE TX MikroBUS Map
 MikroBUS pin mapping of BLE TX Click driver.
 

Functions

void bletx_cfg_setup (bletx_cfg_t *cfg)
 BLE TX configuration object setup function.
 
err_t bletx_init (bletx_t *ctx, bletx_cfg_t *cfg)
 BLE TX initialization function.
 
err_t bletx_default_cfg (bletx_t *ctx)
 BLE TX default configuration function.
 
err_t bletx_power_down (bletx_t *ctx)
 BLE TX full power down function.
 
err_t bletx_power_up (bletx_t *ctx)
 BLE TX full power up function.
 
err_t bletx_hw_reset (bletx_t *ctx)
 BLE TX hardware reset function.
 
err_t bletx_soft_reset (bletx_t *ctx)
 BLE TX software reset function.
 
err_t bletx_interface_selection (bletx_t *ctx, uint8_t sel_interface)
 BLE TX interface selection function.
 
err_t bletx_slave_address_selection (bletx_t *ctx, uint8_t sel_slave_address)
 BLE TX slave address selection function.
 
err_t bletx_baud_rate_selection (bletx_t *ctx, uint32_t sel_baud_rate)
 BLE TX baud rate selection function.
 
err_t bletx_generic_write (bletx_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len)
 BLE TX I2C writing function.
 
err_t bletx_generic_read (bletx_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len)
 BLE TX I2C reading function.
 
err_t bletx_start_advertising (bletx_t *ctx)
 BLE TX start advertising function.
 
err_t bletx_stop_advertising (bletx_t *ctx)
 BLE TX stop advertising function.
 
err_t bletx_set_cfg_adv_channel (bletx_t *ctx, bletx_advch_value_t advch_data)
 BLE TX advertising channel setting function.
 
err_t bletx_set_output_power (bletx_t *ctx, bletx_tx_output_power_value_t power_data)
 BLE TX output power setting function.
 
err_t bletx_set_tx_data (bletx_t *ctx, bletx_txdata_value_t txdata_data)
 BLE TX TX data setting function.
 
err_t bletx_set_eventnum (bletx_t *ctx, bletx_eventnum_value_t eventnum_data)
 BLE TX eventnum setting function.
 
err_t bletx_set_adv_delay (bletx_t *ctx, float adv_delay_ms)
 BLE TX advertising delay setting function.
 
err_t bletx_set_configuration (bletx_t *ctx, bletx_adv_cfg_t adv_cfg)
 BLE TX configuration setting function.
 
err_t bletx_create_adv_data_packet (bletx_t *ctx, bletx_create_adv_data_packet_t adv_data_packet)
 BLE TX create advertising data packet function.
 
err_t bletx_create_eddystone_uri (bletx_t *ctx, bletx_eddystone_data_t adv_data)
 BLE TX create Eddystone™ URI data packet function.
 
err_t bletx_create_eddystone_uid (bletx_t *ctx, bletx_eddystone_data_t adv_data)
 BLE TX create Eddystone™ UID data packet function.
 
err_t bletx_create_eddystone_tlm (bletx_t *ctx, bletx_eddystone_data_t adv_data)
 BLE TX create Eddystone™ TLM data packet function.
 

Detailed Description

API for configuring and manipulating BLE TX 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

◆ bletx_baud_rate_selection()

err_t bletx_baud_rate_selection ( bletx_t * ctx,
uint32_t sel_baud_rate )

BLE TX baud rate selection function.

This function select baud rate of the AK1595 Bluetooth® Low Energy transmitter on the BLE TX click board™.

Parameters
[in]ctx: Click context object. See bletx_t object definition for detailed explanation.
[in]sel_baud_rate:
  • 9600 ( BLETX_SEL_BAUD_RATE_9600 ) - 9600 bps,
  • 115200 ( BLETX_SEL_BAUD_RATE_115200 )- 115200 bps.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ bletx_cfg_setup()

void bletx_cfg_setup ( bletx_cfg_t * cfg)

BLE TX configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ bletx_create_adv_data_packet()

err_t bletx_create_adv_data_packet ( bletx_t * ctx,
bletx_create_adv_data_packet_t adv_data_packet )

BLE TX create advertising data packet function.

This function create advertising data packet of the AK1595 Bluetooth® Low Energy transmitter on the BLE TX click board™.

Parameters
[in]ctx: Click context object. See bletx_t object definition for detailed explanation.
[in]adv_data_packet: Advertising data packet structure.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ bletx_create_eddystone_tlm()

err_t bletx_create_eddystone_tlm ( bletx_t * ctx,
bletx_eddystone_data_t adv_data )

BLE TX create Eddystone™ TLM data packet function.

This function create advertising Eddystone™ TLM data packet of the AK1595 Bluetooth® Low Energy transmitter on the BLE TX click board™.

Parameters
[in]ctx: Click context object. See bletx_t object definition for detailed explanation.
[in]adv_data: Advertising data packet structure.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ bletx_create_eddystone_uid()

err_t bletx_create_eddystone_uid ( bletx_t * ctx,
bletx_eddystone_data_t adv_data )

BLE TX create Eddystone™ UID data packet function.

This function create advertising Eddystone™ UID data packet of the AK1595 Bluetooth® Low Energy transmitter on the BLE TX click board™.

Parameters
[in]ctx: Click context object. See bletx_t object definition for detailed explanation.
[in]adv_data: Advertising data packet structure.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ bletx_create_eddystone_uri()

err_t bletx_create_eddystone_uri ( bletx_t * ctx,
bletx_eddystone_data_t adv_data )

BLE TX create Eddystone™ URI data packet function.

This function create advertising Eddystone™ URI data packet of the AK1595 Bluetooth® Low Energy transmitter on the BLE TX click board™.

Parameters
[in]ctx: Click context object. See bletx_t object definition for detailed explanation.
[in]adv_data: Advertising data packet structure.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ bletx_default_cfg()

err_t bletx_default_cfg ( bletx_t * ctx)

BLE TX default configuration function.

This function executes a default configuration of BLE TX click board™.

Parameters
[in]ctx: Click context object. See bletx_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ bletx_generic_read()

err_t bletx_generic_read ( bletx_t * ctx,
uint8_t reg,
uint8_t * rx_buf,
uint8_t rx_len )

BLE TX I2C reading function.

This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See bletx_t object definition for detailed explanation.
[in]reg: Start register address.
[out]rx_buf: Output read data.
[in]rx_len: Number of bytes to be read.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ bletx_generic_write()

err_t bletx_generic_write ( bletx_t * ctx,
uint8_t reg,
uint8_t * tx_buf,
uint8_t tx_len )

BLE TX I2C writing function.

This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See bletx_t object definition for detailed explanation.
[in]reg: Start register address.
[in]tx_buf: Data to be written.
[in]tx_len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ bletx_hw_reset()

err_t bletx_hw_reset ( bletx_t * ctx)

BLE TX hardware reset function.

This function executes a hardware reset reconfigures all registers of the AK1595 Bluetooth® Low Energy transmitter on the BLE TX click board™.

Parameters
[in]ctx: Click context object. See bletx_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ bletx_init()

err_t bletx_init ( bletx_t * ctx,
bletx_cfg_t * cfg )

BLE TX initialization function.

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

Parameters
[out]ctx: Click context object. See bletx_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See bletx_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ bletx_interface_selection()

err_t bletx_interface_selection ( bletx_t * ctx,
uint8_t sel_interface )

BLE TX interface selection function.

This function select interface of the AK1595 Bluetooth® Low Energy transmitter on the BLE TX click board™.

Parameters
[in]ctx: Click context object. See bletx_t object definition for detailed explanation.
[in]sel_interface:
  • 0 ( BLETX_SEL_INTERFACE_I2C ) - I2C serial interface,
  • 1 ( BLETX_SEL_INTERFACE_UART )- UART serial interface.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ bletx_power_down()

err_t bletx_power_down ( bletx_t * ctx)

BLE TX full power down function.

This function full power-down blocks communication of the AK1595 Bluetooth® Low Energy transmitter on the BLE TX click board™.

Parameters
[in]ctx: Click context object. See bletx_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ bletx_power_up()

err_t bletx_power_up ( bletx_t * ctx)

BLE TX full power up function.

This function full power-up initialization of all registers of the AK1595 Bluetooth® Low Energy transmitter on the BLE TX click board™.

Parameters
[in]ctx: Click context object. See bletx_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ bletx_set_adv_delay()

err_t bletx_set_adv_delay ( bletx_t * ctx,
float adv_delay_ms )

BLE TX advertising delay setting function.

This function advertising delay setting of the AK1595 Bluetooth® Low Energy transmitter on the BLE TX click board™.

Parameters
[in]ctx: Click context object. See bletx_t object definition for detailed explanation.
[in]adv_delay_ms: Advertising delay in milliseconds from 20 ms to 10240 ms.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ bletx_set_cfg_adv_channel()

err_t bletx_set_cfg_adv_channel ( bletx_t * ctx,
bletx_advch_value_t advch_data )

BLE TX advertising channel setting function.

This function advertising channel setting of the AK1595 Bluetooth® Low Energy transmitter on the BLE TX click board™.

Parameters
[in]ctx: Click context object. See bletx_t object definition for detailed explanation.
[in]advch_data: Enum values for advertising channel setting.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ bletx_set_configuration()

err_t bletx_set_configuration ( bletx_t * ctx,
bletx_adv_cfg_t adv_cfg )

BLE TX configuration setting function.

This function configuration setting of the AK1595 Bluetooth® Low Energy transmitter on the BLE TX click board™.

Parameters
[in]ctx: Click context object. See bletx_t object definition for detailed explanation.
[in]adv_cfg: Advertising settings structure.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ bletx_set_eventnum()

err_t bletx_set_eventnum ( bletx_t * ctx,
bletx_eventnum_value_t eventnum_data )

BLE TX eventnum setting function.

This function eventnum setting of the AK1595 Bluetooth® Low Energy transmitter on the BLE TX click board™.

Parameters
[in]ctx: Click context object. See bletx_t object definition for detailed explanation.
[in]eventnum_data: Enum values for the number of advertising event setting.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ bletx_set_output_power()

err_t bletx_set_output_power ( bletx_t * ctx,
bletx_tx_output_power_value_t power_data )

BLE TX output power setting function.

This function output power setting of the AK1595 Bluetooth® Low Energy transmitter on the BLE TX click board™.

Parameters
[in]ctx: Click context object. See bletx_t object definition for detailed explanation.
[in]power_data: Enum values for TX output power [ dBm ] setting.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ bletx_set_tx_data()

err_t bletx_set_tx_data ( bletx_t * ctx,
bletx_txdata_value_t txdata_data )

BLE TX TX data setting function.

This function TX data setting of the AK1595 Bluetooth® Low Energy transmitter on the BLE TX click board™.

Parameters
[in]ctx: Click context object. See bletx_t object definition for detailed explanation.
[in]txdata_data: Enum values for TX data loop, burst transmission or continuous transmission setting.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ bletx_slave_address_selection()

err_t bletx_slave_address_selection ( bletx_t * ctx,
uint8_t sel_slave_address )

BLE TX slave address selection function.

This function select slave address of the AK1595 Bluetooth® Low Energy transmitter on the BLE TX click board™.

Parameters
[in]ctx: Click context object. See bletx_t object definition for detailed explanation.
[in]sel_slave_address: Slave address.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ bletx_soft_reset()

err_t bletx_soft_reset ( bletx_t * ctx)

BLE TX software reset function.

This function executes a software reset reconfigures all registers of the AK1595 Bluetooth® Low Energy transmitter on the BLE TX click board™.

Parameters
[in]ctx: Click context object. See bletx_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ bletx_start_advertising()

err_t bletx_start_advertising ( bletx_t * ctx)

BLE TX start advertising function.

This function start advertising of the AK1595 Bluetooth® Low Energy transmitter on the BLE TX click board™.

Parameters
[in]ctx: Click context object. See bletx_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ bletx_stop_advertising()

err_t bletx_stop_advertising ( bletx_t * ctx)

BLE TX stop advertising function.

This function stop advertising of the AK1595 Bluetooth® Low Energy transmitter on the BLE TX click board™.

Parameters
[in]ctx: Click context object. See bletx_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.