- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone,
in my project i use two generic event handler create from myself and the DIS service.
In my main.c , i start with CyBle_Start(MygenericEventHandler1).
I want to register MygenericEventHandler2 and the Dis Service.
How can i do that ?
I see the function "CyBle_DisRegisterAttrCallback" but what do i put in ()?
Thanks for your advice.
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
You can register the call back for DIS service exactly similar to CyBle_Start() function.
Prototype:-
MygenericEventHandler1( uint32 event, void* eventParam);
MygenericEventHandler2( uint32 event, void* eventParam);
Call Back Function Call:-
CyBle_Start(MygenericEventHandler1);
CyBle_DisRegisterAttrCallback(MygenericEventHandler2);
Call Back Function Define:-
void MygenericEventHandler1(uint32 event, void *eventParam)
{
switch(event)
{
case CYBLE_EVT_STACK_ON:
.
.
.
.
.
}
}
void MygenericEventHandler2(uint32 event, void *eventParam)
{
switch(event)
{
// DIS service specific events
.
.
.
.
.
}
}
-Gyan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
You can register the call back for DIS service exactly similar to CyBle_Start() function.
Prototype:-
MygenericEventHandler1( uint32 event, void* eventParam);
MygenericEventHandler2( uint32 event, void* eventParam);
Call Back Function Call:-
CyBle_Start(MygenericEventHandler1);
CyBle_DisRegisterAttrCallback(MygenericEventHandler2);
Call Back Function Define:-
void MygenericEventHandler1(uint32 event, void *eventParam)
{
switch(event)
{
case CYBLE_EVT_STACK_ON:
.
.
.
.
.
}
}
void MygenericEventHandler2(uint32 event, void *eventParam)
{
switch(event)
{
// DIS service specific events
.
.
.
.
.
}
}
-Gyan