]> www.average.org Git - pulsecounter.git/blobdiff - msp430/Hal/Hal.h
wip on jitter counter
[pulsecounter.git] / msp430 / Hal / Hal.h
index 1ceecb55f63c98aff226bfc1f0ee5813076a489a..0c969c4c19f96b1682535dd5322b1491aef5fe1c 100644 (file)
@@ -227,15 +227,32 @@ extern void Hal_redLedToggle(void);
  *   tickHandler - the address of the user's tick handler that will be called
  *
  * Returns:
- *   None
+ *   Future clock when handler will be called
  *
  * Side Effects:
  *   tickhandler called by the idle loop
  *
  **/
-extern void Hal_tickStart(uint16_t msecs, Hal_Handler Handler);
+extern uint16_t Hal_tickStart(uint16_t msecs, void (*handler)(uint16_t clock));
 extern void Hal_tickStop(void);
 
+/**
+ * --------- Hal_gpioCount ---------
+ *
+ * Returns the number of interrups encounted on gpio `id`
+ *
+ * Inputs:
+ *   id if the gpio (0-2 for gpio 3-5)
+ *
+ * Returns:
+ *   Counted interrupts
+ *
+ * Side Effects:
+ *   Resets the accumulator (counting restarts from zero).
+ *
+ **/
+extern uint32_t Hal_gpioCount(uint8_t id);
+
 #ifdef __cplusplus
 }
 #endif