This variable can be modified at the BondingButton event in order to adjust the time without a pressed standard bonding button before [N] goes into deep sleep mode during bonding. Variable is internally zeroed when the bonding phase is initiated. The variable counts down and when it reaches zero (after it is pre-decremented) then the deep sleep mode is activated. A countdown unit is approximately 290 ms. When the variable is continuously set to 0 then the device will never activate deep sleep mode. Also setting bit.6 at DPA configuration bits avoids sleeping.
Example #1
The following example sets the time before going to sleep to 4 seconds:
case DpaEvent_BondingButton:
// Was the BondingSleepCountdown just initiated?
if ( BondingSleepCountdown == 0 )
// Set the requested timeout
BondingSleepCountdown = 4000 / BONDING_SLEEP_COUNTDOWN_UNIT;
break;
Example #2
The example disables bonding button timeout at all:
case DpaEvent_BondingButton:
BondingSleepCountdown = 0;
break;