在static void zclSampleLight_process_loop(void):
if(events & SAMPLEAPP_KEY_EVT)
{
// Process Key Presses
zclSampleLight_processKey(keys);
keys = 0;
events &= ~SAMPLEAPP_KEY_EVT;
}
是通过初始化阶段通过 Board_Key_initialize(zclSampleLight_changeKeyCallback);调用:
/* Setup keycallback for keys */
Timer_construct(&keyChangeClock, board_key_changeHandler,
(KEY_DEBOUNCE_TIMEOUT),
0, false, 0);
/* Set the application callback */
appKeyChangeHandler = appKeyCB;
来实现的吗???
static void zclSampleLight_changeKeyCallback(uint8_t keysPressed)
{
keys = keysPressed;
events |= SAMPLEAPP_KEY_EVT;
// Wake up the application thread when it waits for clock event
Semaphore_post(sem);
}
函数 Timer_construct(&keyChangeClock, board_key_changeHandler,
(KEY_DEBOUNCE_TIMEOUT),
0, false, 0); 是什么用途???