たれぱんのびぼーろく

わたしの備忘録、生物学とプログラミングが多いかも

esp32 hid

static void hidd_le_profile_cb(esp_gatts_evt_t event, esp_gatts_t *p_data)
case ESP_GATTS_READ_EVT: {
hidd_read_attr_value(p_data->req_data.p_data, trans_id);

void hidd_read_attr_value(tGATTS_DATA *p_data, uint32_t trans_id)
//start build the rsp message
hidd_rsp(trans_id, conn_id, app_id, status, p_inst->pending_evt, p_data);

void hidd_rsp (uint32_t trans_id, uint16_t conn_id, uint8_t app_id,
esp_gatt_status_t status, uint8_t event, tGATTS_DATA *p_rsp)
case HIDD_LE_READ_REPORT_MAP_EVT:
//copy the infomation value to the att value to sent to the peer device memcpy(rsp.attr_value.value, hidReportMap, hidReportMapLen); //start send the rsp to the peer device esp_ble_gatts_send_rsp(conn_id, trans_id, status, &rsp);