From eac8a1b2ee3761ed3107587b36c10c1e26f9d59f Mon Sep 17 00:00:00 2001 From: Omar Magdy Date: Tue, 23 Aug 2022 21:19:38 +0200 Subject: Added switch_handler() function which allows the pedestrian to make the other traffic lights red and his green and at the same time when his light turns red the other continue where they left off + Moved all code to trafficlight.c and made the main less clutered --- tivaware.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tivaware.h') diff --git a/tivaware.h b/tivaware.h index ce3d029..7ee26ab 100644 --- a/tivaware.h +++ b/tivaware.h @@ -2,11 +2,13 @@ #include #include "tm4c123gh6pm.h" #include "../../ti/TivaWare_C_Series-2.2.0.295/inc/hw_memmap.h" +#include "../../ti/TivaWare_C_Series-2.2.0.295/inc/hw_ints.h" #include "../../ti/TivaWare_C_Series-2.2.0.295/driverlib/debug.h" #include "../../ti/TivaWare_C_Series-2.2.0.295/driverlib/gpio.h" #include "../../ti/TivaWare_C_Series-2.2.0.295/driverlib/sysctl.h" #include "../../ti/TivaWare_C_Series-2.2.0.295/driverlib/systick.h" #include "../../ti/TivaWare_C_Series-2.2.0.295/driverlib/timer.h" +#include "../../ti/TivaWare_C_Series-2.2.0.295/driverlib/interrupt.h" #define RIGHT_SWITCH !(GPIOPinRead(GPIO_PORTF_BASE, GPIO_PIN_0) != 0) #define LEFT_SWITCH !(GPIOPinRead(GPIO_PORTF_BASE, GPIO_PIN_4) != 0) -- cgit v1.2.3