They are trying to use the ZDP_MgmtLeaveReq function, but I can not, because when I click the button nothing happens.
Here is the snippet of code I am using:
If (keys & HAL_KEY_SW_3)
{
ZAddrType_t destAddr;
Uint8 * pIEEEAddr;
DestAddr.addrMode = Addr16Bit;
DestAddr.addr.shortAddr = 0x0000;
PIEEEAddr = NLME_GetExtAddr ();
If ((byte) ZDP_MgmtLeaveReq (& destAddr, pIEEEAddr, 1,1,0) == afStatus_SUCCESS) {
HalLedSet (HAL_LED_1, HAL_LED_MODE_ON);
HalLcdWriteString ("Hello", HAL_LCD_LINE_6);
}
I'm using cc2538
I'm using NV_RESTORE
Thank you.