ADD [WIP] Static scheduling with event
This commit is contained in:
		
							
								
								
									
										22
									
								
								main.cpp
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								main.cpp
									
									
									
									
									
								
							| @@ -7,27 +7,17 @@ | ||||
|  | ||||
| #include "mbed.h"  // NOLINT | ||||
| #include "mbed_trace.h" | ||||
| #include "static_scheduling/bike_system.hpp" | ||||
|  | ||||
| // Blinking rate in milliseconds | ||||
| #define BLINKING_RATE 500ms | ||||
| #include "static_scheduling_with_event/bike_system.hpp" | ||||
|  | ||||
| #if defined(MBED_CONF_MBED_TRACE_ENABLE) | ||||
| #define TRACE_GROUP "MAIN" | ||||
| #endif  // MBED_CONF_MBED_TRACE_ENAB | ||||
|  | ||||
| int main() { | ||||
|     // Initialise the digital pin LED1 as an output | ||||
|  | ||||
| #if defined(MBED_CONF_MBED_TRACE_ENABLE) | ||||
|     mbed_trace_init(); | ||||
|     // DigitalOut led(LED1); | ||||
|     // tr_debug("Hello world"); | ||||
|  | ||||
|     //    while (true) { | ||||
|     //        led = !led; | ||||
|     //        ThisThread::sleep_for(BLINKING_RATE); | ||||
|     //        tr_debug("blink"); | ||||
|     //    } | ||||
|     static_scheduling::BikeSystem bikeSystem; | ||||
|     // bikeSystem.start(); | ||||
| #endif | ||||
|     static_scheduling_with_event::BikeSystem bikeSystem; | ||||
|     bikeSystem.startWithEventQueue(); | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user