我想通过一个HandleKeys(),在if ( keys & HAL_KEY_SW_1 ){ 。。。}中添加怎样的代码以实现手机知道该键被按下。希望有具体点的代码,谢谢。
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.
fish,
keyfobdemo.c,keyfobapp_HandleKeys()中,
最终按键发射出去,是这里
SK_SetParameter( SK_KEY_ATTR, sizeof ( uint8 ), &SK_Keys );
然后在这个函数里面,关键就是下面这货了,是它把数据发射了出去:
GATTServApp_ProcessCharCfg( skConfig, &skKeyPressed, FALSE,
simplekeysAttrTbl, GATT_NUM_ATTRS( simplekeysAttrTbl ),
INVALID_TASK_ID );