static void flashEraseCallback(void) { // Disable global interrupts IntMasterDisable(); // Erase Flash CCA page FlashMainPageErase(CC2538_FLASH_CCA_ADDRESS); // Reset the board SysCtrlReset(); }
/********************************************************************* * @fn zclEnergyHarvester_HdlIncoming * * @brief Callback from ZCL to process incoming Commands specific * to this cluster library or Profile commands for attributes * that aren't in the attribute list * * @param pInMsg - pointer to the incoming message * * @return ZStatus_t */ static ZStatus_t zclEnergyHarvester_HdlIncoming( zclIncoming_t *pInMsg ) { #if DEV_TYPE==COORDINATOR uint8 buffer[50]; uint8 temperatureLength; temperatureLength = strlen( ( char* )pInMsg->pData ); sprintf( ( char* )buffer, "Node temperature: %s, Node battery voltage: %s.", pInMsg->pData, pInMsg->pData + temperatureLength + 1 ); debug_str( buffer ); zcl_SendAck( pInMsg->msg->srcAddr.addr.shortAddr ); #else if( strcmp( ( char* )pInMsg->pData, "SHUTDOWN" ) == 0 ) { SysCtrlDeepSleep(); SysCtrlReset(); } #endif return ( ZSuccess ); }
/** * Resets the board */ void board_reset() { SysCtrlReset(); }
/** * GPIO_C ISR handler. User button is GPIO_C_3 * Erases a Flash sector to trigger the bootloader backdoor */ void GPIO_C_Isr_Handler(){ IntMasterDisable(); FlashMainPageErase(CC2538_FLASH_ADDRESS); SysCtrlReset(); }
void Board::reset(void) { // Reset the board SysCtrlReset(); }