1 #ifndef GATT_H_ 2 #define GATT_H_ 3 4 /** 5 **************************************************************************************** 6 * @addtogroup GATT Generic Attribute Profile 7 * @ingroup HOST 8 * @brief Generic Attribute Profile. 9 * 10 * The GATT module is responsible for providing an API for all attribute related operations. 11 * It is responsible for all the service framework activities using the Attribute protocol 12 * for discovering services and for reading and writing characteristic values on a peer device. 13 * To achieve this, the GATT interfaces with @ref ATTM "ATTM", @ref ATTC "ATTC" and the 14 * @ref ATTS "ATTS". 15 * 16 * @{ 17 **************************************************************************************** 18 */ 19 /* 20 * INCLUDE FILES 21 **************************************************************************************** 22 */ 23 #include "rwip_config.h" 24 #include "att.h" 25 26 27 /* 28 * DEFINE DECLARATIONS 29 **************************************************************************************** 30 */ 31 32 /// retrieve gatt attribute handle from attribute index. 33 #define GATT_GET_ATT_HANDLE(idx)\ 34 ((gattm_svc_get_start_hdl() == 0)? (0) :(gattm_svc_get_start_hdl() + (idx))) 35 36 37 38 39 #if (BLE_ATTS) 40 /// GATT Attribute database handles 41 /// Generic Attribute Profile Service 42 enum gatt_db_att 43 { 44 GATT_IDX_PRIM_SVC, 45 GATT_IDX_CHAR_SVC_CHANGED, 46 GATT_IDX_SVC_CHANGED, 47 GATT_IDX_SVC_CHANGED_CFG, 48 49 GATT_IDX_NUMBER 50 }; 51 #endif /* (BLE_ATTS)*/ 52 53 /* 54 * Type Definition 55 **************************************************************************************** 56 */ 57 58 59 /// Service Changed type definition 60 struct gatt_svc_changed 61 { 62 /// Service start handle which changed 63 uint16_t start_hdl; 64 /// Service end handle which changed 65 uint16_t end_hdl; 66 }; 67 68 69 /// @} GATT 70 #endif // GATT_H_ 71