Prepare main.cpp
parent
e77ac1ecd3
commit
ec44ef5f23
30
src/main.cpp
30
src/main.cpp
|
|
@ -1,3 +1,33 @@
|
||||||
|
#include "logic/mm_control.h"
|
||||||
|
|
||||||
|
/// One-time setup of HW and SW components
|
||||||
|
/// Called before entering the loop() function
|
||||||
|
void setup(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Main loop of the firmware
|
||||||
|
/// Proposed architecture
|
||||||
|
/// checkMsgs();
|
||||||
|
/// if(msg is command){
|
||||||
|
/// activate command handling
|
||||||
|
/// } else if(msg is query){
|
||||||
|
/// format response to query
|
||||||
|
/// }
|
||||||
|
/// StepCurrentCommand();
|
||||||
|
/// StepMotors();
|
||||||
|
/// StepLED();
|
||||||
|
/// StepWhateverElseNeedsStepping();
|
||||||
|
/// The idea behind the Step* routines is to keep each automaton non-blocking allowing for some “concurrency”.
|
||||||
|
/// Some FW components will leverage ISR to do their stuff (UART, motor stepping?, etc.)
|
||||||
|
void loop(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
setup();
|
||||||
|
for(;;){
|
||||||
|
loop();
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue