Loading system/btcore/include/bdaddr.h +4 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,10 @@ bool bdaddr_is_empty(const bt_bdaddr_t *addr); // may be NULL. bool bdaddr_equals(const bt_bdaddr_t *first, const bt_bdaddr_t *second); // Returns destination bdaddr |dest| after copying |src| to |dest|. // |dest| and |src| must not be NULL. bt_bdaddr_t *bdaddr_copy(bt_bdaddr_t *dest, const bt_bdaddr_t *src); // Makes a string representation of |addr| and places it into |string|. |size| // refers to the size of |string|'s buffer and must be >= 18. On success, this // function returns |string|, otherwise it returns NULL. Neither |addr| nor |string| Loading system/btcore/src/bdaddr.c +7 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,13 @@ bool bdaddr_equals(const bt_bdaddr_t *first, const bt_bdaddr_t *second) { return memcmp(first, second, sizeof(bt_bdaddr_t)) == 0; } bt_bdaddr_t *bdaddr_copy(bt_bdaddr_t *dest, const bt_bdaddr_t *src) { assert(dest != NULL); assert(src != NULL); return (bt_bdaddr_t *)memcpy(dest, src, sizeof(bt_bdaddr_t)); } const char *bdaddr_to_string(const bt_bdaddr_t *addr, char *string, size_t size) { assert(addr != NULL); assert(string != NULL); Loading Loading
system/btcore/include/bdaddr.h +4 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,10 @@ bool bdaddr_is_empty(const bt_bdaddr_t *addr); // may be NULL. bool bdaddr_equals(const bt_bdaddr_t *first, const bt_bdaddr_t *second); // Returns destination bdaddr |dest| after copying |src| to |dest|. // |dest| and |src| must not be NULL. bt_bdaddr_t *bdaddr_copy(bt_bdaddr_t *dest, const bt_bdaddr_t *src); // Makes a string representation of |addr| and places it into |string|. |size| // refers to the size of |string|'s buffer and must be >= 18. On success, this // function returns |string|, otherwise it returns NULL. Neither |addr| nor |string| Loading
system/btcore/src/bdaddr.c +7 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,13 @@ bool bdaddr_equals(const bt_bdaddr_t *first, const bt_bdaddr_t *second) { return memcmp(first, second, sizeof(bt_bdaddr_t)) == 0; } bt_bdaddr_t *bdaddr_copy(bt_bdaddr_t *dest, const bt_bdaddr_t *src) { assert(dest != NULL); assert(src != NULL); return (bt_bdaddr_t *)memcpy(dest, src, sizeof(bt_bdaddr_t)); } const char *bdaddr_to_string(const bt_bdaddr_t *addr, char *string, size_t size) { assert(addr != NULL); assert(string != NULL); Loading