Data stored in CYBLE_EVT_GATTC_HANDLE_VALUE_NTF | Cypress Semiconductor
August 17, 2017: We apologize for any difficulties or delays in posting new discussions to the Community on cypress.com. We are in the process of merging our support forums onto a single platform in an effort to create a much-improved community experience for you.
Data stored in CYBLE_EVT_GATTC_HANDLE_VALUE_NTF
I have been using CYBL10161-56LQXI where currently I am working over the BLE v4.2.
I have a question about the data that we store in CYBLE_EVT_GATTC_HANDLE_VALUE_NTF.
What I know till now is about CyBle_GattsNotification() that it is a non-blocking function and what it does.
I have save the data to be sent to the client over, CYBLE_GATTS_HANDLE_VALUE_NTF_T my_variable; // my declaration
and in some function this is what I use,
my_variable.value.val = MyData;
my_variable.value.actualLen = length;
my_variable.value.len = length;
my_variable.attrHandle = charAttrHandle;
So, my question is, do we need the memory that we are using to set up the descriptor(my_variable) to exist after my call returns? As right now I am saving it on the stack, which means at some point I am going to lose it.