This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE_GATTS_VLOC_USER and volatile variable

When using BLE_GATTS_VLOC_USER I would tend to make the variable pointed to by ble_gatts_attr_t.p_value volatile to reflect the situation that the value can be changed by softdevice interrupt handlers at any time, but this entails all kinds of additional casts, e.g. to memset the value. Also, ble_gatts_attr_t.p_value itself isn't volatile.

Is my thinking process wrong?

Parents Reply Children
No Data
Related