/************************************************************/
/* bmconc.ino */
/* */
/* Bare metal / concurrency demo */
/* ENGD2103, November 2022 */
/************************************************************/
#include "hal.h"
#include "Traffic.h"
#include "Heart_Beat.h"
#include "LED.h"
#include "Switch1.h"
switch_state_t B1_state;
//int count_value;
Traffic Traffic_Control;
Heart_Beat Heart_Beat_Control;
LED LED_Control;
Switch1 Switch1_Control;
void setup() {
HAL_setupGPIO ();
Traffic_Control.setRunning(true);
Heart_Beat_Control.setRunning(true);
LED_Control.setRunning(true);
Switch1_Control.setRunning(true);
Serial.begin(9600);
}
void loop() {
// Let the modules do their thing.
B1_state=Switch1_Control.getDebouncedState();
Serial.println(B1_state);
LED_Control.set_LED_Count(5);
Traffic_Control.process();
Heart_Beat_Control.process();
LED_Control.process();
}