X-Git-Url: http://www.average.org/gitweb/?p=pulsecounter.git;a=blobdiff_plain;f=msp430%2FHal%2FHal.h;fp=msp430%2FHal%2FHal.h;h=0c969c4c19f96b1682535dd5322b1491aef5fe1c;hp=1ceecb55f63c98aff226bfc1f0ee5813076a489a;hb=4e9dda3367ff17c80358426a6b4126704741c0b1;hpb=edfc471b90c3057b75c03fc29a43fabfb20b8721 diff --git a/msp430/Hal/Hal.h b/msp430/Hal/Hal.h index 1ceecb5..0c969c4 100644 --- a/msp430/Hal/Hal.h +++ b/msp430/Hal/Hal.h @@ -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