AnsweredAssumed Answered

KW36 - HeartRate_PowerDownMode_Switch??

Question asked by ayden hong on May 25, 2020
Latest reply on May 29, 2020 by Sebastián Del Río

Hi,

 

I'm testing an example of heart rate. (frdmkw36_wireless_examples_bluetooth_hrs_freertos)

 The Switch is different when power down mode is set and not set.

1. The SW3 operate as gKBD_EventPressPB1_c when the power-down mode is set to "1".

2. The SW2 operate as gKBD_EventPressPB1_c when the power-down mode is set to "0".

--------------------------------------------------------------------------------------------------------------------------

/* Enable/Disable PowerDown functionality in PwrLib */
#define cPWR_UsePowerDownMode 0 // (1)

 

 

void BleApp_HandleKeys(key_event_t events)
{
#if (cPWR_UsePowerDownMode)
switch (events)
{
   case gKBD_EventPressPB1_c: //SW3 ??
   case gKBD_EventPressPB2_c:
   {
      if (mPeerDeviceId == gInvalidDeviceId_c)
      {
         BleApp_Start();
      }
      break;
   }
   case gKBD_EventLongPB1_c:
   case gKBD_EventLongPB2_c:
   {
      if (mPeerDeviceId != gInvalidDeviceId_c)
      {
         Gap_Disconnect(mPeerDeviceId);
      }
      break;
   }
   default:
   break;
}
#else
switch (events)
{
   case
gKBD_EventPressPB1_c: //SW2 ??
   {

--------------------------------------------------------------------------------------------------------------------------

 

Plz, Let me know if this is normal.

Outcomes