Contiki-NG
|
Files | |
file | rf-ble.c |
Implementation of the CC13xx/CC26xx RF BLE driver. | |
file | rf-ble.h |
Header file for the CC13xx/CC26xx BLE driver. | |
Functions | |
radio_value_t | rf_ble_get_tx_power (void) |
Get TX power for BLE advertisements. | |
void | rf_ble_set_tx_power (radio_value_t power) |
Set TX power for BLE advertisements. | |
void | rf_ble_beacond_config (clock_time_t interval, const char *name) |
Set the device name to use with the BLE advertisement/beacon daemon. | |
uint8_t | rf_ble_beacond_start (void) |
Start the BLE advertisement/beacon daemon. | |
uint8_t | rf_ble_is_active (void) |
Check whether the BLE beacond is currently active. | |
void | rf_ble_beacond_stop (void) |
Stop the BLE advertisement/beacon daemon. | |
void | rf_ble_beacon_single (uint8_t channel, uint8_t *data, uint8_t len) |
Transmit a single BLE advertisement in one or more advertisement channels. | |
void rf_ble_beacon_single | ( | uint8_t | channel, |
uint8_t * | data, | ||
uint8_t | len ) |
Transmit a single BLE advertisement in one or more advertisement channels.
channel | Bitmask of advertisement channels to be used: use BLE_ADV_CHANNEL_37 for channel 37, BLE_ADV_CHANNEL_38 for channel 38, BLE_ADV_CHANNEL_39 for channel 39, or any 'or' combination of those |
data | A pointer to the advertisement data buffer |
len | The length of the advertisement data. If more than BLE_ADV_MAX_SIZE, the first BLE_ADV_MAX_SIZE bytes will be used. |
Transmits a given advertisement payload once in one or any arbitrary combination of advertisement channels.
Definition at line 308 of file rf-ble.c.
References oscillators_request_hf_xosc(), oscillators_switch_to_hf_rc(), oscillators_switch_to_hf_xosc(), rf_core_boot(), rf_core_is_accessible(), rf_core_power_down(), rf_core_primary_mode_abort(), rf_core_primary_mode_restore(), and rf_core_send_cmd().
void rf_ble_beacond_config | ( | clock_time_t | interval, |
const char * | name ) |
Set the device name to use with the BLE advertisement/beacon daemon.
interval | The interval (ticks) between two consecutive beacon bursts |
name | The device name to advertise |
If name is NULL it will be ignored. If interval==0 it will be ignored. Thus, this function can be used to configure a single parameter at a time if so desired.
uint8_t rf_ble_beacond_start | ( | void | ) |
Start the BLE advertisement/beacon daemon.
Before calling this function, the name to advertise must first be set by calling rf_ble_beacond_config(). Otherwise, this function will return an error.
Definition at line 240 of file rf-ble.c.
References process_start().
radio_value_t rf_ble_get_tx_power | ( | void | ) |
uint8_t rf_ble_is_active | ( | void | ) |
void rf_ble_set_tx_power | ( | radio_value_t | power | ) |
Set TX power for BLE advertisements.
power | The 'at least' TX power in dBm, values avove 5 dBm will be ignored |
Set TX power to 'at least' power dBm. This works with a lookup table. If the value of 'power' does not exist in the lookup table, TXPOWER will be set to the immediately higher available value