]> average.org Git - pulsecounter.git/blobdiff - msp430/Hal/Hal.h
wip on jitter counter
[pulsecounter.git] / msp430 / Hal / Hal.h
index 0d57348ab855a824c58594da29d7cd02dcb5eb84..0c969c4c19f96b1682535dd5322b1491aef5fe1c 100644 (file)
@@ -4,7 +4,6 @@
  * This example HAL is intentionally simple.  The implementation is limited to:
  *
  * BUTTON -- a single button that when pressed will cause an interrupt.
- * DEBUG -- two debug GPIOs that are available as outputs from the EAP and under user control.
  * DELAY -- a delay routine that can delay by n milliseconds.
  * INIT -- set the hardware up to its initial state
  * LED -- a user LED that is available for application control.
@@ -63,63 +62,6 @@ extern void Hal_gpioEnable(Hal_Handler handler);
  *
  **/
 extern void Hal_connected(void);
-/**
- * --------- Hal_debugOff ---------
- *
- * Turns the selected DEBUG line off.
- *
- * The two DEBUG lines are output GPIOs that are available to the user for
- * debug purposes.
- *
- * Inputs:
- *   line - the index value of the debug line to turn off
- *
- * Returns:
- *   None
- *
- * Side Effects:
- *   DEBUG line off.
- *
- **/
-extern void Hal_debugOff(uint8_t line);
-/**
- * --------- Hal_debugOn ---------
- *
- * Turns the selected DEBUG line on.
- *
- * The two DEBUG lines are output GPIOs that are available to the user for
- * debug purposes.
- *
- * Inputs:
- *   line - the index value of the debug line to turn on
- *
- * Returns:
- *   None
- *
- * Side Effects:
- *   DEBUG line on.
- *
- **/
-extern void Hal_debugOn(uint8_t line);
-/**
- * --------- Hal_debugPulse ---------
- *
- * Emits a pulse on the selected DEBUG line.
- *
- * The two DEBUG lines are output GPIOs that are available to the user for
- * debug purposes.
- *
- * Inputs:
- *   line - the index value of the debug line to emit a pulse
- *
- * Returns:
- *   None
- *
- * Side Effects:
- *   DEBUG line turns on then off.
- *
- **/
-extern void Hal_debugPulse(uint8_t line);
 /**
  * --------- Hal_delay ---------
  *
@@ -285,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