This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BLE协议栈中的几个想不明白的新手问题,望指教!



1)自己添加的事件,怎么区分是“系统事件”还是“其他事件”?(比如串口这个子事件该归到系统事件SYS_EVENT_MSG,还是该自己再扩充一个事件?)

2)“ 

if ( events & GAP_EVENT_SIGN_COUNTER_CHANGED )
{
// Sign counter changed, save it to NV
VOID osal_snv_write( BLE_NVID_SIGNCOUNTER, sizeof( uint32 ), &hciExtSignCounter );

return ( events ^ GAP_EVENT_SIGN_COUNTER_CHANGED );
}

”上面的程序中,①为什么调用函数加一个VOID,不加似乎也无影响,为何要加VOID?

②VOID的宏定义是“#define VOID (void)”,为何要这么做,而不直接使用void?

③GAP_EVENT_SIGN_COUNTER_CHANGED 这个事件我不明白什么时候触发。

想了好久没想明白,特来发帖请教大家,谢谢了!