/* WARNING The C++ runtime hasn't been initialized yet (together with C's constructors). So make sure you don't do anything that is dependent on it.  */
int main(void)
/* WARNING The C++ runtime hasn't been initialized yet (together with C's constructors). So make sure you don't do anything that is dependent on it.  */
int main(void)
{
        Error_Handler();
    }
    if (hal::ADCDriver::Init() == false) {
        Error_Handler();
    }
    if (hal::RS485Driver::Init(get_assigned_modbus_address()) == false) {
        Error_Handler();
    }
    if (hal::PWMDriver::Init() == false) {
        Error_Handler();
    }
    modularbed::ModbusRegisters::Init();
    modbus::ModbusProtocol::Init(get_assigned_modbus_address());
    modularbed::MeasurementLogic::Init();
    modularbed::PWMLogic::Init();
    modularbed::ControlLogic::Init();
    if (modbus::ModbusTask::Init() == false) {
        Error_Handler();
    }
    if (modularbed::ControlTask::Init() == false) {
        Error_Handler();
    }
    osKernelStart();
}