diff --git a/include/bluetooth/gatt.h b/include/bluetooth/gatt.h index d9c9b5a42c2..d4c32623fb1 100644 --- a/include/bluetooth/gatt.h +++ b/include/bluetooth/gatt.h @@ -39,39 +39,39 @@ extern "C" { #include /* GATT attribute permission bit field values */ +enum { + /** Attribute read permission. */ + BT_GATT_PERM_READ = BIT(0), -/** @def BT_GATT_PERM_READ - * @brief Attribute read permission. - */ -#define BT_GATT_PERM_READ BIT(0) -/** @def BT_GATT_PERM_WRITE - * @brief Attribute write permission. - */ -#define BT_GATT_PERM_WRITE BIT(1) -/** @def BT_GATT_PERM_READ_ENCRYPT - * @brief Attribute read permission with encryption. - * - * If set, requires encryption for read access. - */ -#define BT_GATT_PERM_READ_ENCRYPT BIT(2) -/** @def BT_GATT_PERM_WRITE_ENCRYPT - * @brief Attribute write permission with encryption. - * - * If set, requires encryption for write access. - */ -#define BT_GATT_PERM_WRITE_ENCRYPT BIT(3) -/** @def BT_GATT_PERM_READ_AUTHEN - * @brief Attribute read permission with authentication. - * - * If set, requires encryption using authenticated link-key for read access. - */ -#define BT_GATT_PERM_READ_AUTHEN BIT(4) -/** @def BT_GATT_PERM_WRITE_AUTHEN - * @brief Attribute write permission with authentication. - * - * If set, requires encryption using authenticated link-key for write access. - */ -#define BT_GATT_PERM_WRITE_AUTHEN BIT(5) + /** Attribute write permission. */ + BT_GATT_PERM_WRITE = BIT(1), + + /** Attribute read permission with encryption. + * + * If set, requires encryption for read access. + */ + BT_GATT_PERM_READ_ENCRYPT = BIT(2), + + /** Attribute write permission with encryption. + * + * If set, requires encryption for write access. + */ + BT_GATT_PERM_WRITE_ENCRYPT = BIT(3), + + /** Attribute read permission with authentication. + * + * If set, requires encryption using authenticated link-key for read + * access. + */ + BT_GATT_PERM_READ_AUTHEN = BIT(4), + + /** Attribute write permission with authentication. + * + * If set, requires encryption using authenticated link-key for write + * access. + */ + BT_GATT_PERM_WRITE_AUTHEN = BIT(5), +}; /** @def BT_GATT_ERR * @brief Construct error return value for attribute read and write callbacks.