From 8a5f32723ef73e25fd6a19d199e1f3f1f1ca7f94 Mon Sep 17 00:00:00 2001 From: Omar Magdy Date: Tue, 23 Aug 2022 17:26:28 +0200 Subject: Removed color.h and color.c --- trafficlight.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'trafficlight.h') diff --git a/trafficlight.h b/trafficlight.h index 2f8f33d..6d86982 100644 --- a/trafficlight.h +++ b/trafficlight.h @@ -1,12 +1,14 @@ #include #include #include "tivaware.h" -#include "color.h" #define TIVA_CLK 16e6 #define GREEN_PERIOD TIVA_CLK * 5 #define YELLOW_PERIOD TIVA_CLK * 2 #define RED_PERIOD TIVA_CLK * 7 +#define RED 1 +#define YELLOW 2 +#define GREEN 3 typedef struct Traffic{ @@ -15,6 +17,7 @@ typedef struct Traffic{ uint8_t red; uint8_t yellow; uint8_t green; + uint32_t prevPeriod; } Traffic; extern Traffic tf1; -- cgit v1.2.3