41 #ifndef BLE_MGR_GATTS_H_
42 #define BLE_MGR_GATTS_H_
51 enum ble_cmd_gatts_opcode {
52 BLE_MGR_GATTS_SERVICE_ADD_CMD = BLE_MGR_CMD_CAT_FIRST(BLE_MGR_GATTS_CMD_CAT),
53 BLE_MGR_GATTS_SERVICE_INCLUDE_ADD_CMD,
54 BLE_MGR_GATTS_SERVICE_CHARACTERISTIC_ADD_CMD,
55 BLE_MGR_GATTS_SERVICE_DESCRIPTOR_ADD_CMD,
56 BLE_MGR_GATTS_SERVICE_REGISTER_CMD,
57 BLE_MGR_GATTS_SERVICE_ENABLE_CMD,
58 BLE_MGR_GATTS_SERVICE_DISABLE_CMD,
59 BLE_MGR_GATTS_SERVICE_CHARACTERISTIC_GET_PROP_CMD,
60 BLE_MGR_GATTS_SERVICE_CHARACTERISTIC_SET_PROP_CMD,
61 BLE_MGR_GATTS_GET_VALUE_CMD,
62 BLE_MGR_GATTS_SET_VALUE_CMD,
63 BLE_MGR_GATTS_READ_CFM_CMD,
64 BLE_MGR_GATTS_WRITE_CFM_CMD,
65 BLE_MGR_GATTS_PREPARE_WRITE_CFM_CMD,
66 BLE_MGR_GATTS_SEND_EVENT_CMD,
67 BLE_MGR_GATTS_SERVICE_CHANGED_IND_CMD,
69 BLE_MGR_GATTS_LAST_CMD,
77 } ble_mgr_gatts_service_add_cmd_t;
82 } ble_mgr_gatts_service_add_rsp_t;
84 void ble_mgr_gatts_service_add_cmd_handler(
void *param);
89 } ble_mgr_gatts_service_add_include_cmd_t;
95 } ble_mgr_gatts_service_add_include_rsp_t;
97 void ble_mgr_gatts_service_add_include_cmd_handler(
void *param);
106 } ble_mgr_gatts_service_add_characteristic_cmd_t;
112 uint16_t h_val_offset;
113 } ble_mgr_gatts_service_add_characteristic_rsp_t;
115 void ble_mgr_gatts_service_add_characteristic_cmd_handler(
void *param);
123 } ble_mgr_gatts_service_add_descriptor_cmd_t;
129 } ble_mgr_gatts_service_add_descriptor_rsp_t;
131 void ble_mgr_gatts_service_add_descriptor_cmd_handler(
void *param);
135 } ble_mgr_gatts_service_register_cmd_t;
141 } ble_mgr_gatts_service_register_rsp_t;
143 void ble_mgr_gatts_service_register_cmd_handler(
void *param);
148 } ble_mgr_gatts_service_enable_cmd_t;
153 } ble_mgr_gatts_service_enable_rsp_t;
155 void ble_mgr_gatts_service_enable_cmd_handler(
void *param);
160 } ble_mgr_gatts_service_disable_cmd_t;
165 } ble_mgr_gatts_service_disable_rsp_t;
167 void ble_mgr_gatts_service_disable_cmd_handler(
void *param);
172 } ble_mgr_gatts_service_characteristic_get_prop_cmd_t;
179 } ble_mgr_gatts_service_characteristic_get_prop_rsp_t;
181 void ble_mgr_gatts_service_characteristic_get_prop_cmd_handler(
void *param);
188 } ble_mgr_gatts_service_characteristic_set_prop_cmd_t;
193 } ble_mgr_gatts_service_characteristic_set_prop_rsp_t;
195 void ble_mgr_gatts_service_characteristic_set_prop_cmd_handler(
void *param);
201 } ble_mgr_gatts_get_value_cmd_t;
208 } ble_mgr_gatts_get_value_rsp_t;
210 void ble_mgr_gatts_get_value_cmd_handler(
void *param);
217 } ble_mgr_gatts_set_value_cmd_t;
222 } ble_mgr_gatts_set_value_rsp_t;
224 void ble_mgr_gatts_set_value_cmd_handler(
void *param);
233 } ble_mgr_gatts_read_cfm_cmd_t;
238 } ble_mgr_gatts_read_cfm_rsp_t;
240 void ble_mgr_gatts_read_cfm_cmd_handler(
void *param);
247 } ble_mgr_gatts_write_cfm_cmd_t;
252 } ble_mgr_gatts_write_cfm_rsp_t;
254 void ble_mgr_gatts_write_cfm_cmd_handler(
void *param);
262 } ble_mgr_gatts_prepare_write_cfm_cmd_t;
267 } ble_mgr_gatts_prepare_write_cfm_rsp_t;
269 void ble_mgr_gatts_prepare_write_cfm_cmd_handler(
void *param);
278 } ble_mgr_gatts_send_event_cmd_t;
283 } ble_mgr_gatts_send_event_rsp_t;
285 void ble_mgr_gatts_send_event_cmd_handler(
void *param);
290 uint16_t start_handle;
292 } ble_mgr_gatts_service_changed_ind_cmd_t;
297 } ble_mgr_gatts_service_changed_ind_rsp_t;
299 void ble_mgr_gatts_service_changed_ind_cmd_handler(
void *param);
306 void ble_mgr_gatts_write_value_req_evt_handler(
ble_gtl_msg_t *gtl);
308 void ble_mgr_gatts_prepare_write_req_evt_handler(
ble_gtl_msg_t *gtl);
310 void ble_mgr_gatts_event_sent_evt_handler(
ble_gtl_msg_t *gtl);