]> www.average.org Git - pulsecounter.git/blobdiff - msp430/Hal/Hal.c
mark possible place that is losing events
[pulsecounter.git] / msp430 / Hal / Hal.c
index ad8576a259feb749e1045137256083e5fecbe288..dda8c690e6c28bf8d9d22805426c77b55478b0d7 100644 (file)
@@ -91,11 +91,11 @@ static void gpioHandler(uint8_t id);
 static void postEvent(uint8_t handlerId);
 
 static Hal_Handler appSettleHandler;
-static void (*appJitterHandler)(uint8_t id, uint16_t count);
+static void (*appJitterHandler)(uint8_t id, uint32_t count);
 static volatile uint16_t handlerEvents = 0;
 static uint16_t clockTick = 0;
 static Hal_Handler handlerTab[NUM_HANDLERS];
-static uint32_t gpioCount[3];
+static volatile uint32_t gpioCount[3] = {0};
 static bool timerActive[3] = {false, false, false};
 static uint16_t timerPoint[3];
 
@@ -149,7 +149,7 @@ static void tickHandler(uint16_t clock) {
     uint8_t i;
 
     for (i = 0; i < 3; i++)
-        if (timerActive[i] && timerPoint[i] == clock) {
+        if (timerActive[i] && timerPoint[i] == clock) { /* FIXME */
             uint32_t count = getCount(i);
             uint16_t mask = BIT3 << i;