PreviousNext
BondingButton
Help > Custom DPA Handler > Events > BondingButton

This event is called during the standard DPA (un)bonding process at [N] and it allows to redefine (un)bonding button. If the event handler returns FALSE the default button is used. If the event handler returns TRUE then the bit at userReg1.0 specifies whether the used bonding button is pressed or not. When a custom button is used then the [N] does not go into a power-saving sleep mode during bonding. IQRF OS function amIBonded can distinguish between bonding and unbonding.

 

This event is also used to modify a default bonding button timeout using the BondingSleepCountdown variable.

 

Example

 

case DpaEvent_BondingButton:

  userReg1.0 = 0;

  if ( !PORTA.0 )

    userReg1.0 = 1;

  return TRUE;

 

☼ See example CustomDpaHandler-BondingButton.c for more details.