代码暂存 蓝牙未连接时闪灯提示
This commit is contained in:
parent
347659ad53
commit
8da11095ba
|
@ -434,10 +434,18 @@ uint16_t Peripheral_ProcessEvent(uint8_t task_id, uint16_t events)
|
||||||
*/
|
*/
|
||||||
static void Peripheral_ProcessGAPMsg(gapRoleEvent_t *pEvent)
|
static void Peripheral_ProcessGAPMsg(gapRoleEvent_t *pEvent)
|
||||||
{
|
{
|
||||||
|
static uint8_t LED_ALARM_Flag = 0;
|
||||||
switch(pEvent->gap.opcode)
|
switch(pEvent->gap.opcode)
|
||||||
{
|
{
|
||||||
case GAP_SCAN_REQUEST_EVENT:
|
case GAP_SCAN_REQUEST_EVENT:
|
||||||
{
|
{
|
||||||
|
LED_ALARM_Flag++;
|
||||||
|
if(LED_ALARM_Flag > 2)
|
||||||
|
{
|
||||||
|
LED_ALARM_OPEN;
|
||||||
|
DelayMs(5);
|
||||||
|
LED_ALARM_Flag = 0;
|
||||||
|
}
|
||||||
// PRINT("Receive scan req from %x %x %x %x %x %x ..\n", pEvent->scanReqEvt.scannerAddr[0],
|
// PRINT("Receive scan req from %x %x %x %x %x %x ..\n", pEvent->scanReqEvt.scannerAddr[0],
|
||||||
// pEvent->scanReqEvt.scannerAddr[1], pEvent->scanReqEvt.scannerAddr[2], pEvent->scanReqEvt.scannerAddr[3],
|
// pEvent->scanReqEvt.scannerAddr[1], pEvent->scanReqEvt.scannerAddr[2], pEvent->scanReqEvt.scannerAddr[3],
|
||||||
// pEvent->scanReqEvt.scannerAddr[4], pEvent->scanReqEvt.scannerAddr[5]);
|
// pEvent->scanReqEvt.scannerAddr[4], pEvent->scanReqEvt.scannerAddr[5]);
|
||||||
|
|
Loading…
Reference in New Issue