Program Listing for File modm_abandon.cpp¶
↰ Return to documentation for file (fang-mcb-project/src/system/assert/modm_abandon.cpp)
#include "modm_abandon.hpp"
#include "driver/drivers_singleton.hpp"
#include "system/emergency/kill_system.hpp"
#include "system/emergency/freeze_system.hpp"
#include "system/error/signal/assert_failed_buzz.hpp"
void modm_abandon(const modm::AssertionInfo &info)
{
//This forces the debugger to see it via copy constructor
static modm::AssertionInfo readInfo = info;
//TODO: write to terminal or buzz in morse code
fang::Drivers& drivers{fang::DriversSingleton::getDrivers()};
fang::emergency::killSystem();
fang::error::playFailedAssertBuzz(drivers.pwm);
FREEZE_SYSTEM();
}