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.

再问低功耗的问题



我把xPOWER_SAVING改成POWER_SAVING,进入低功耗。

没进低功耗的时候,功能是这样。

上电灯灭。按下按键,灯亮,松开灯灭。

并且按下按键时发送数据。

进入低功耗以后,其他功能都正常,只有灯不正常。

上电灯亮,按下按键灯照样亮,总之一直亮。

不知道怎么回事。请问高手,可能那里的毛病。

贴一部分代码:

按键按下

在这个函数里:

// 按键处理
static void simpleBLECentral_HandleKeys( uint8 shift, uint16 keys )

。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。

p->simpleBLEConnHandle=0x0000;
simpleBLETaskId=0x0B;
status = GATT_WriteCharValue( p->simpleBLEConnHandle, &req, simpleBLETaskId );
HAL_TURN_OFF_LED1(); //灯亮      这个是灯亮,和TI官方开发板接的方式不一样,我懒,没有改名字,其实就是灯亮。
PICTL &=~( HAL_KEY_SW_10_EDGEBIT);
KEY10Flag=TRUE;

。。。。。。。。。。。。。。。。。。。。。

在这个函数里

void halProcessKeyInterrupt (void)

。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。

if(KEY10Flag==TRUE)
{
KEY10Flag=FALSE;
PICTL |= HAL_KEY_SW_10_EDGEBIT;
HAL_TURN_ON_LED1();                          //这个地方是灯灭

谢谢!