From e7e2f56db38dfb59a18c683813b9a4ec7de349cd Mon Sep 17 00:00:00 2001 From: Andy Killorin <37423245+Speedy6451@users.noreply.github.com> Date: Thu, 20 Mar 2025 11:24:04 -0400 Subject: [PATCH] enabled timer --- main.c | 6 +++++- tm4c1294ncpdt_startup_ccs.c | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 65cfcf2..e2607cd 100644 --- a/main.c +++ b/main.c @@ -15,9 +15,10 @@ #include "driverlib/interrupt.h" #include "Crystalfontz128x128_ST7735.h" #include +#include "buttons.h" uint32_t gSystemClock; // [Hz] system clock frequency -volatile uint32_t gTime = 8345; // time in hundredths of a second +volatile uint32_t gTime = 0; // time in hundredths of a second int main(void) { @@ -42,6 +43,9 @@ int main(void) // full-screen rectangle tRectangle rectFullScreen = {0, 0, GrContextDpyWidthGet(&sContext)-1, GrContextDpyHeightGet(&sContext)-1}; + ButtonInit(); + IntMasterEnable(); + while (true) { GrContextForegroundSet(&sContext, ClrBlack); GrRectFill(&sContext, &rectFullScreen); // fill screen with black diff --git a/tm4c1294ncpdt_startup_ccs.c b/tm4c1294ncpdt_startup_ccs.c index c1b28dd..42a068c 100644 --- a/tm4c1294ncpdt_startup_ccs.c +++ b/tm4c1294ncpdt_startup_ccs.c @@ -33,6 +33,7 @@ void ResetISR(void); static void NmiSR(void); static void FaultISR(void); static void IntDefaultHandler(void); +void ButtonISR(void); //***************************************************************************** // @@ -103,7 +104,7 @@ void (* const g_pfnVectors[])(void) = IntDefaultHandler, // ADC Sequence 2 IntDefaultHandler, // ADC Sequence 3 IntDefaultHandler, // Watchdog timer - IntDefaultHandler, // Timer 0 subtimer A + ButtonISR, // Timer 0 subtimer A IntDefaultHandler, // Timer 0 subtimer B IntDefaultHandler, // Timer 1 subtimer A IntDefaultHandler, // Timer 1 subtimer B