From 2b2a9c7e6f19d3f700a1466b190606f362484af6 Mon Sep 17 00:00:00 2001 From: Omar Magdy Date: Thu, 25 Aug 2022 02:38:48 +0200 Subject: Fixed a bug where it would reset the timer of tf1 to 0 when I press the switch instead of displaying the time which it was paused at --- trafficlight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trafficlight.c b/trafficlight.c index 969ffae..92bacaa 100644 --- a/trafficlight.c +++ b/trafficlight.c @@ -182,7 +182,7 @@ void BcdWrite(Bcd bcd, uint32_t timer, bool ped) { DIO_WritePin(&GPIO_PORTA_DATA_R, bcd.A, bin[0]); DIO_WritePin(&GPIO_PORTA_DATA_R, bcd.B, bin[1]); DIO_WritePin(&GPIO_PORTA_DATA_R, bcd.C, bin[2]); - GPIOPinWrite(GPIO_PORTE_BASE, 0xFF, (bin[3] << bcd.D)); + DIO_WritePin(&GPIO_PORTE_DATA_R, bcd.C, bin[3]); } else { for(int i = 0; i < 4; i++) { -- cgit v1.2.3