//! main function, starts the UIF void main ( void ) { biosSetWdt(0); biosInitSystem(); biosInitCom(BAUDRATE); biosHalInterfaceInit(); biosLedOff(BIOS_LED_MODE); biosLedOn(BIOS_LED_POWER); biosmainLoop(); }
//! \brief lock/unlock write/erase to UIF (HAL) flash memory //! \param[in] *payload pointer to receive buffer //! \return 0 -> flash write/erase locked //! \return 1 -> flash write/erase released //! \return <0 -> error short v3opCoreFlashFunctionInit(unsigned char *payload) { short ret_value = -1; if(payload[4] == 0) { v3op_core_flash_enabled_ = 0; FCTL3 = FWKEY+LOCK; biosHalInterfaceInit(); biosLedAlternate(0); biosLedOff(BIOS_LED_MODE); biosLedOn(BIOS_LED_POWER); ret_value = 0; } else if(payload[4] == 1) { v3op_core_flash_enabled_ = 1; biosLedAlternate(30); v3opKillAllLoops(); ret_value = 1; } return(ret_value); }