Driver of the radio to generate BLE advertisements with scan responses.
More...
|
in Generic Access Profile (GAP)
|
#define | GAP_ADV_FLAGS 0x1 |
|
#define | GAP_ADV_UUID16_INCOMP 0x2 |
|
#define | GAP_ADV_UUID16_ALL 0x3 |
|
#define | GAP_ADV_UUID32_INCOMP 0x4 |
|
#define | GAP_ADV_UUID32_ALL 0x5 |
|
#define | GAP_ADV_UUID128_INCOMP 0x6 |
|
#define | GAP_ADV_UUID128_ALL 0x7 |
|
#define | GAP_ADV_NAME_SHORT 0x8 |
|
#define | GAP_ADV_NAME_FULL 0x9 |
|
#define | GAP_ADV_TRANSMIT_PWR 0xA |
|
#define | GAP_ADV_CONN_INTERVAL 0x12 |
|
#define | GAP_ADV_SERVICE_DATA 0x16 |
|
#define | GAP_ADV_MANUF_DATA 0xFF |
|
- Note
- This module utilizes the MS_TIMER2 and US_TIMER3, so ms_timer_init and us_timer_init must be called before using this module. Also the radio only works with the high frequency crystal enabled, so hfclk_xtal_init_blocking or hfclk_xtal_init_nonblocking must be used before to enable the it. The radio peripheral uses the highest priority interrupt.
◆ ADV_INTERVAL_MS
#define ADV_INTERVAL_MS |
( |
|
x | ) |
((x*16)/10) |
Conversion from millisecond to multiples of 0.625 ms
Definition at line 62 of file ble_adv.h.
◆ ble_adv_ch_map_t
Enumerator |
---|
CH_37_PARAM | CH_37_PARAM.
|
CH_38_PARAM | CH_38_PARAM.
|
CH_37_38_PARAM | CH_37_38_PARAM.
|
CH_39_PARAM | CH_39_PARAM.
|
CH_37_39_PARAM | CH_37_39_PARAM.
|
CH_38_39_PARAM | CH_38_39_PARAM.
|
CH_ALL_PARAM | CH_ALL_PARAM.
|
Definition at line 111 of file ble_adv.h.
◆ ble_adv_get_tx_power()
int8_t ble_adv_get_tx_power |
( |
void |
| ) |
|
- Returns
- The tx power used
Definition at line 225 of file ble_adv.c.
◆ ble_adv_set_adv_data()
void ble_adv_set_adv_data |
( |
uint8_t |
len, |
|
|
uint8_t * |
data_ptr |
|
) |
| |
- Parameters
-
len | Length of the advertising data |
data_ptr | Pointer to the buffer containing the data_ptr |
Definition at line 246 of file ble_adv.c.
References ADRS_LEN.
◆ ble_adv_set_adv_param()
◆ ble_adv_set_random_adrs()
void ble_adv_set_random_adrs |
( |
uint8_t * |
rand_adrs | ) |
|
- Parameters
-
rand_adrs | Pointer to the buffer containing the random address containing ADRS_LEN number of octets |
Definition at line 242 of file ble_adv.c.
References ADRS_LEN.
◆ ble_adv_set_scan_rsp_data()
void ble_adv_set_scan_rsp_data |
( |
uint8_t |
len, |
|
|
uint8_t * |
data_ptr |
|
) |
| |
- Parameters
-
len | Length of the scan response data |
data_ptr | Pointer to the buffer containing the data_ptr |
Definition at line 251 of file ble_adv.c.
References ADRS_LEN.
◆ ble_adv_set_tx_power()
void ble_adv_set_tx_power |
( |
int8_t |
pwr | ) |
|
- Parameters
-
pwr | The tx power ranging from -40 to 4 |
Definition at line 229 of file ble_adv.c.