Lines Matching full:a
40 /** Length in bytes of a standard Bluetooth address */
55 bt_addr_t a; member
64 /** Bluetooth device "any" address, not a valid address */
66 /** Bluetooth device "none" address, not a valid address */
68 /** Bluetooth LE device "any" address, not a valid address */
70 /** Bluetooth LE device "none" address, not a valid address */
75 * @param a First Bluetooth device address to compare
78 * @return negative value if @a a < @a b, 0 if @a a == @a b, else positive
80 static inline int bt_addr_cmp(const bt_addr_t *a, const bt_addr_t *b) in bt_addr_cmp() argument
82 return memcmp(a, b, sizeof(*a)); in bt_addr_cmp()
90 static inline bool bt_addr_eq(const bt_addr_t *a, const bt_addr_t *b) in bt_addr_eq() argument
92 return bt_addr_cmp(a, b) == 0; in bt_addr_eq()
97 * @param a First Bluetooth LE device address to compare
100 * @return negative value if @a a < @a b, 0 if @a a == @a b, else positive
104 static inline int bt_addr_le_cmp(const bt_addr_le_t *a, const bt_addr_le_t *b) in bt_addr_le_cmp() argument
106 return memcmp(a, b, sizeof(*a)); in bt_addr_le_cmp()
117 static inline bool bt_addr_le_eq(const bt_addr_le_t *a, const bt_addr_le_t *b) in bt_addr_le_eq() argument
119 return bt_addr_le_cmp(a, b) == 0; in bt_addr_le_eq()
142 /** Check if a Bluetooth LE random address is resolvable private address. */
143 #define BT_ADDR_IS_RPA(a) (((a)->val[5] & 0xc0) == 0x40) argument
144 /** Check if a Bluetooth LE random address is a non-resolvable private address.
146 #define BT_ADDR_IS_NRPA(a) (((a)->val[5] & 0xc0) == 0x00) argument
147 /** Check if a Bluetooth LE random address is a static address. */
148 #define BT_ADDR_IS_STATIC(a) (((a)->val[5] & 0xc0) == 0xc0) argument
150 /** Set a Bluetooth LE random address as a resolvable private address. */
151 #define BT_ADDR_SET_RPA(a) ((a)->val[5] = (((a)->val[5] & 0x3f) | 0x40)) argument
152 /** Set a Bluetooth LE random address as a non-resolvable private address. */
153 #define BT_ADDR_SET_NRPA(a) ((a)->val[5] &= 0x3f) argument
154 /** Set a Bluetooth LE random address as a static address. */
155 #define BT_ADDR_SET_STATIC(a) ((a)->val[5] |= 0xc0) argument
157 /** @brief Create a Bluetooth LE random non-resolvable private address. */
160 /** @brief Create a Bluetooth LE random static address. */
163 /** @brief Check if a Bluetooth LE address is a random private resolvable
168 * @return true if address is a random private resolvable address.
176 return BT_ADDR_IS_RPA(&addr->a); in bt_addr_le_is_rpa()
179 /** @brief Check if a Bluetooth LE address is valid identity address.
186 * @return true if address is a valid identity address.
194 return BT_ADDR_IS_STATIC(&addr->a); in bt_addr_le_is_identity()
266 addr->a.val[5], addr->a.val[4], addr->a.val[3], in bt_addr_le_to_str()
267 addr->a.val[2], addr->a.val[1], addr->a.val[0], type); in bt_addr_le_to_str()
272 * @param[in] str The string representation of a Bluetooth address.
276 * @return -EINVAL Invalid address string. @p str is not a well-formed Bluetooth address.