Bluetooth: host: Fix doxygen in addr header
Fix doxygen in addr.h file, missing /** needed for doxygen, and placing the brief on the first line of the comment consistenly. Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
parent
b20b5c0d44
commit
27bc7ad3a7
1 changed files with 37 additions and 43 deletions
|
@ -41,14 +41,14 @@ typedef struct {
|
||||||
bt_addr_t a;
|
bt_addr_t a;
|
||||||
} bt_addr_le_t;
|
} bt_addr_le_t;
|
||||||
|
|
||||||
/* Bluetooth device "any" address, not a valid address */
|
/** Bluetooth device "any" address, not a valid address */
|
||||||
#define BT_ADDR_ANY ((bt_addr_t[]) { { { 0, 0, 0, 0, 0, 0 } } })
|
#define BT_ADDR_ANY ((bt_addr_t[]) { { { 0, 0, 0, 0, 0, 0 } } })
|
||||||
/* Bluetooth device "none" address, not a valid address */
|
/** Bluetooth device "none" address, not a valid address */
|
||||||
#define BT_ADDR_NONE ((bt_addr_t[]) { { \
|
#define BT_ADDR_NONE ((bt_addr_t[]) { { \
|
||||||
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } } })
|
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } } })
|
||||||
/* Bluetooth LE device "any" address, not a valid address */
|
/** Bluetooth LE device "any" address, not a valid address */
|
||||||
#define BT_ADDR_LE_ANY ((bt_addr_le_t[]) { { 0, { { 0, 0, 0, 0, 0, 0 } } } })
|
#define BT_ADDR_LE_ANY ((bt_addr_le_t[]) { { 0, { { 0, 0, 0, 0, 0, 0 } } } })
|
||||||
/* Bluetooth LE device "none" address, not a valid address */
|
/** Bluetooth LE device "none" address, not a valid address */
|
||||||
#define BT_ADDR_LE_NONE ((bt_addr_le_t[]) { { 0, \
|
#define BT_ADDR_LE_NONE ((bt_addr_le_t[]) { { 0, \
|
||||||
{ { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } } } })
|
{ { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } } } })
|
||||||
|
|
||||||
|
@ -151,38 +151,35 @@ static inline bool bt_addr_le_is_identity(const bt_addr_le_t *addr)
|
||||||
return BT_ADDR_IS_STATIC(&addr->a);
|
return BT_ADDR_IS_STATIC(&addr->a);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** @def BT_ADDR_STR_LEN
|
||||||
* @def BT_ADDR_STR_LEN
|
|
||||||
*
|
*
|
||||||
* @brief Recommended length of user string buffer for Bluetooth address
|
* @brief Recommended length of user string buffer for Bluetooth address
|
||||||
*
|
*
|
||||||
* @details The recommended length guarantee the output of address
|
* @details The recommended length guarantee the output of address
|
||||||
* conversion will not lose valuable information about address being
|
* conversion will not lose valuable information about address being
|
||||||
* processed.
|
* processed.
|
||||||
*/
|
*/
|
||||||
#define BT_ADDR_STR_LEN 18
|
#define BT_ADDR_STR_LEN 18
|
||||||
|
|
||||||
/**
|
/** @def BT_ADDR_LE_STR_LEN
|
||||||
* @def BT_ADDR_LE_STR_LEN
|
|
||||||
*
|
*
|
||||||
* @brief Recommended length of user string buffer for Bluetooth LE address
|
* @brief Recommended length of user string buffer for Bluetooth LE address
|
||||||
*
|
*
|
||||||
* @details The recommended length guarantee the output of address
|
* @details The recommended length guarantee the output of address
|
||||||
* conversion will not lose valuable information about address being
|
* conversion will not lose valuable information about address being
|
||||||
* processed.
|
* processed.
|
||||||
*/
|
*/
|
||||||
#define BT_ADDR_LE_STR_LEN 30
|
#define BT_ADDR_LE_STR_LEN 30
|
||||||
|
|
||||||
/**
|
/** @brief Converts binary Bluetooth address to string.
|
||||||
* @brief Converts binary Bluetooth address to string.
|
|
||||||
*
|
*
|
||||||
* @param addr Address of buffer containing binary Bluetooth address.
|
* @param addr Address of buffer containing binary Bluetooth address.
|
||||||
* @param str Address of user buffer with enough room to store formatted
|
* @param str Address of user buffer with enough room to store formatted
|
||||||
* string containing binary address.
|
* string containing binary address.
|
||||||
* @param len Length of data to be copied to user string buffer. Refer to
|
* @param len Length of data to be copied to user string buffer. Refer to
|
||||||
* BT_ADDR_STR_LEN about recommended value.
|
* BT_ADDR_STR_LEN about recommended value.
|
||||||
*
|
*
|
||||||
* @return Number of successfully formatted bytes from binary address.
|
* @return Number of successfully formatted bytes from binary address.
|
||||||
*/
|
*/
|
||||||
static inline int bt_addr_to_str(const bt_addr_t *addr, char *str, size_t len)
|
static inline int bt_addr_to_str(const bt_addr_t *addr, char *str, size_t len)
|
||||||
{
|
{
|
||||||
|
@ -191,16 +188,15 @@ static inline int bt_addr_to_str(const bt_addr_t *addr, char *str, size_t len)
|
||||||
addr->val[2], addr->val[1], addr->val[0]);
|
addr->val[2], addr->val[1], addr->val[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** @brief Converts binary LE Bluetooth address to string.
|
||||||
* @brief Converts binary LE Bluetooth address to string.
|
|
||||||
*
|
*
|
||||||
* @param addr Address of buffer containing binary LE Bluetooth address.
|
* @param addr Address of buffer containing binary LE Bluetooth address.
|
||||||
* @param str Address of user buffer with enough room to store
|
* @param str Address of user buffer with enough room to store
|
||||||
* formatted string containing binary LE address.
|
* formatted string containing binary LE address.
|
||||||
* @param len Length of data to be copied to user string buffer. Refer to
|
* @param len Length of data to be copied to user string buffer. Refer to
|
||||||
* BT_ADDR_LE_STR_LEN about recommended value.
|
* BT_ADDR_LE_STR_LEN about recommended value.
|
||||||
*
|
*
|
||||||
* @return Number of successfully formatted bytes from binary address.
|
* @return Number of successfully formatted bytes from binary address.
|
||||||
*/
|
*/
|
||||||
static inline int bt_addr_le_to_str(const bt_addr_le_t *addr, char *str,
|
static inline int bt_addr_le_to_str(const bt_addr_le_t *addr, char *str,
|
||||||
size_t len)
|
size_t len)
|
||||||
|
@ -230,25 +226,23 @@ static inline int bt_addr_le_to_str(const bt_addr_le_t *addr, char *str,
|
||||||
addr->a.val[2], addr->a.val[1], addr->a.val[0], type);
|
addr->a.val[2], addr->a.val[1], addr->a.val[0], type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** @brief Convert Bluetooth address from string to binary.
|
||||||
* @brief Convert Bluetooth address from string to binary.
|
|
||||||
*
|
*
|
||||||
* @param[in] str The string representation of a Bluetooth address.
|
* @param[in] str The string representation of a Bluetooth address.
|
||||||
* @param[out] addr Address of buffer to store the Bluetooth address
|
* @param[out] addr Address of buffer to store the Bluetooth address
|
||||||
*
|
*
|
||||||
* @return Zero on success or (negative) error code otherwise.
|
* @return Zero on success or (negative) error code otherwise.
|
||||||
*/
|
*/
|
||||||
int bt_addr_from_str(const char *str, bt_addr_t *addr);
|
int bt_addr_from_str(const char *str, bt_addr_t *addr);
|
||||||
|
|
||||||
/**
|
/** @brief Convert LE Bluetooth address from string to binary.
|
||||||
* @brief Convert LE Bluetooth address from string to binary.
|
|
||||||
*
|
*
|
||||||
* @param[in] str The string representation of an LE Bluetooth address.
|
* @param[in] str The string representation of an LE Bluetooth address.
|
||||||
* @param[in] type The string representation of the LE Bluetooth address
|
* @param[in] type The string representation of the LE Bluetooth address
|
||||||
* type.
|
* type.
|
||||||
* @param[out] addr Address of buffer to store the LE Bluetooth address
|
* @param[out] addr Address of buffer to store the LE Bluetooth address
|
||||||
*
|
*
|
||||||
* @return Zero on success or (negative) error code otherwise.
|
* @return Zero on success or (negative) error code otherwise.
|
||||||
*/
|
*/
|
||||||
int bt_addr_le_from_str(const char *str, const char *type, bt_addr_le_t *addr);
|
int bt_addr_le_from_str(const char *str, const char *type, bt_addr_le_t *addr);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue