NimBLE-Arduino 2.1.2
|
Bluetooth Host HCI utils. More...
Functions | |
int | ble_hs_hci_read_chan_map (uint16_t conn_handle, uint8_t *out_chan_map) |
int | ble_hs_hci_set_chan_class (const uint8_t *chan_map) |
Bluetooth Host HCI utils.
int ble_hs_hci_read_chan_map | ( | uint16_t | conn_handle, |
uint8_t * | out_chan_map | ||
) |
Queries the controller for the channel map used with the specified connection. The channel map is represented as an array of five bytes, with each bit corresponding to an individual channel. The array is interpreted as little-endian, such that: map[0] & 0x01 --> Channel 0. map[0] & 0x02 --> Channel 1. ... map[1] & 0x01 --> Channel 8.
As there are 37 channels, only the first 37 bits get written.
If a bit is 1, the corresponding channel is used. Otherwise, the channel is unused.
conn_handle | The handle of the connection whose channel map is being read. |
out_chan_map | On success, the retrieved channel map gets written here. This buffer must have a size >= 5 bytes. |
int ble_hs_hci_set_chan_class | ( | const uint8_t * | chan_map | ) |
Instructs the controller to use the specified channel map. The channel map is represented as an array of five bytes, with each bit corresponding to an individual channel. The array is interpreted as little-endian, such that: map[0] & 0x01 --> Channel 0. map[0] & 0x02 --> Channel 1. ... map[1] & 0x01 --> Channel 8.
As there are 37 channels, only the first 37 bits should be written are used.
If a bit is 1, the corresponding channel can be used. Otherwise, the channel should not be used.
chan_map | The channel map to configure. This buffer should have a size of 5 bytes. |