I was reading a line of code:
mesh_gatt_evt_t* p_gatt_evt = (mesh_gatt_evt_t*) p_ble_evt->evt.gatts_evt.params.write.data;
And ble_gatts_evt_write_t::data is the cenerpiece of the puzzle, but when I looked it up, I found this:
uint8_t ble_gatts_evt_write_t::data[1]
Received data, variable length.
A few things confuses me: 1.Why is there a "[1]"? To clarify that the length of the data is 1 byte or 8 bit, nothin more and nothing less? 2. What's usually in the "data"? You see, it appears that (in the aforementioned code) the data is some sort of memory? address, and can be converted to a pointer, which is odd because I expect there are actuall working data inside it, e.g. temperature, on/off values, etc? Please help?