Infineon Logo AIROC BTSDK v4.4 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
wiced_average_rssi.h File Reference

Average RSSI library. More...

Macros

#define AVERAGE_RSSI_MAX_CONNECTIONS   3
 
#define BTHCI_EVENT_VS_AVERAGE_RSSI_EVENT_CODE   0x88
 

Functions

struct __attribute__ ((packed)) wiced_average_rssi_event
 
wiced_result_t wiced_average_rssi_enable (uint8_t enable, uint16_t coefficient, uint16_t interval, uint8_t elna_gain, uint8_t conn_handle_num, uint16_t conn_handle[])
 Function wiced_average_rssi_enable. More...
 
wiced_result_t wiced_average_rssi_disable (void)
 Function wiced_average_rssi_disable. More...
 

Variables

 wiced_average_rssi_event_t
 

Detailed Description

Average RSSI library.

Use this library to enable the average rssi events for ACL connections. Add average_rss_lib.a in makefile to enable the feature as follows: APP_PATCHES_AND_LIBS += average_rssi_lib.a

Function Documentation

wiced_result_t wiced_average_rssi_disable ( void  )

Function wiced_average_rssi_disable.

Disable the average rssi event

Returns
            WICED_BT_SUCCESS     : Success
            WICED_BT_NO_RESOURCE : No resource to issue command
wiced_result_t wiced_average_rssi_enable ( uint8_t  enable,
uint16_t  coefficient,
uint16_t  interval,
uint8_t  elna_gain,
uint8_t  conn_handle_num,
uint16_t  conn_handle[] 
)

Function wiced_average_rssi_enable.

Enable the average rssi event

Parameters
[in]enable: 1: enable the event 0: disable the event (the same as wiced_average_rssi_disable)
[in]coefficient: The paramter will be divided by 1024 as the coefficient in the internal 1st order IIR filter y[n] = ax[n] + (1-a)y[n-1]
[in]interval: The timer interval in 100 ms between consecutive average RSSI events
[in]elna_gain: The RSSI will be reduced by elna_gain before filtering
[in]conn_handle_num: The connection number of conn_handle
[in]conn_handle: The array of connection handle
Returns
             WICED_BT_SUCCESS     : Success
             WICED_BT_NO_RESOURCE : No resource to issue command