- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Dharav
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Dharav,
Once you call the CyBle_GattsNotification() function and it returns with a 0 (success) result, the data to be transmitted has already been stored in the BLE stack's internal packet buffers. Unless your application needs to do something else with it, there is no need to retain it separately.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Dharav,
Once you call the CyBle_GattsNotification() function and it returns with a 0 (success) result, the data to be transmitted has already been stored in the BLE stack's internal packet buffers. Unless your application needs to do something else with it, there is no need to retain it separately.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Alright. Thanks for the quick reply. I really appreciate it.
Dharav