- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using CyBle_RegisterBlessInterruptCallback() I want to trigger a interrupt after an advertising message has been transmitted.
So I setup a call back function with:-
static CYBLE_BLESS_EVENT_PARAM_T evt_param;
evt_param.BlessStateMask = CYBLE_ISR_BLESS_ADV_CLOSE;
evt_param.bless_evt_app_cb = BlessInterruptHandler;
ret = CyBle_RegisterBlessInterruptCallback(&evt_param);
//No error is reported
//And I handle the callback function with:-
void BlessInterruptHandler(uint32 event, void *eventparam);
void BlessInterruptHandler(uint32 event, void *eventparam)
{
CY_NOP;
switch(event)
{
case CYBLE_ISR_BLESS_ADV_CLOSE: break; //set flag
}
}
But it is not working for me. What am I missing?
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You also need to start the BLE module with something named similar to: "CYBLE_Start()" before it will start interrupting/running.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You also need to start the BLE module with something named similar to: "CYBLE_Start()" before it will start interrupting/running.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was doing "CyBLE_start()"
Problem was I was not waiting for the CYBLE_EVT_STACK_ON event.
Problem now solved, thank you.