SAE Teensy ECU
IIT SAE Microcontroller programming
Loading...
Searching...
No Matches
Main.cpp
1#include "ECU.h"
2#include "ECUGlobalConfig.h"
3#if CONF_ECU_POSITION == FRONT_ECU
4#include "Front.h"
5#endif
6
7int main(void) {
8 Serial.begin(CONF_ECU_BAUD_RATE);
10#if CONF_ECU_POSITION == BACK_ECU
11 State::begin(ECUStates::Initialize_State);
12#else
13 Front::run();
14#endif
15 return 0;
16}
Configure global build properties.
#define CONF_ECU_INITAL_DELAY
Set a delay on startup before any ECU does anything.
#define CONF_ECU_BAUD_RATE
Set serial baud rate.
main()
Main Function.
Definition bin2cc.py:61
void run()
Runs front ECU code.
Definition src/front.cpp:72
void begin(State_t &entry)
Begin the state machine with a pointer to a state.