nimble/host: Add doxygen for ble_hs_hci.h

This commit is contained in:
Szymon Janc
2018-06-04 12:09:29 +02:00
parent 65bda05e9a
commit 9259e078f7
2 changed files with 62 additions and 50 deletions
+62
View File
@@ -20,17 +20,79 @@
#ifndef H_BLE_HS_HCI_
#define H_BLE_HS_HCI_
/**
* @brief Bluetooth Host HCI utils
* @defgroup bt_host_hci Bluetooth Host HCI utils
* @ingroup bt_host
* @{
*/
#include <inttypes.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* 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.
*
* @param conn_handle The handle of the connection whose channel map
* is being read.
* @param out_chan_map On success, the retrieved channel map gets
* written here. This buffer must have a size
* >= 5 bytes.
*
* @return 0 on success;
* A BLE host HCI return code if the controller
* rejected the request;
* A BLE host core return code on unexpected
* error.
*/
int ble_hs_hci_read_chan_map(uint16_t conn_handle, uint8_t *out_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.
*
* @param chan_map The channel map to configure. This buffer
* should have a size of 5 bytes.
*
* @return 0 on success;
* A BLE host HCI return code if the controller
* rejected the request;
* A BLE host core return code on unexpected
* error.
*/
int ble_hs_hci_set_chan_class(const uint8_t *chan_map);
#ifdef __cplusplus
}
#endif
/**
* @}
*/
#endif
-50
View File
@@ -197,33 +197,6 @@ ble_hs_hci_util_data_hdr_strip(struct os_mbuf *om,
return 0;
}
/**
* 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.
*
* @param conn_handle The handle of the connection whose channel map
* is being read.
* @param out_chan_map On success, the retrieved channel map gets
* written here. This buffer must have a size
* >= 5 bytes.
*
* @return 0 on success;
* A BLE host HCI return code if the controller
* rejected the request;
* A BLE host core return code on unexpected
* error.
*/
int
ble_hs_hci_read_chan_map(uint16_t conn_handle, uint8_t *out_chan_map)
{
@@ -256,29 +229,6 @@ ble_hs_hci_read_chan_map(uint16_t conn_handle, uint8_t *out_chan_map)
return 0;
}
/**
* 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.
*
* @param chan_map The channel map to configure. This buffer
* should have a size of 5 bytes.
*
* @return 0 on success;
* A BLE host HCI return code if the controller
* rejected the request;
* A BLE host core return code on unexpected
* error.
*/
int
ble_hs_hci_set_chan_class(const uint8_t *chan_map)
{