X-Git-Url: http://www.average.org/gitweb/?p=pulsecounter.git;a=blobdiff_plain;f=Hal%2FHal.h;h=0d57348ab855a824c58594da29d7cd02dcb5eb84;hp=f166774501274df29b6c8b7d1626b9afda905aae;hb=440f8b92b68c9829d1b9ccf274db5f53fb4e0de7;hpb=a210dfa3087cdca2393e7a4f3611e654f4724b53 diff --git a/Hal/Hal.h b/Hal/Hal.h index f166774..0d57348 100644 --- a/Hal/Hal.h +++ b/Hal/Hal.h @@ -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. - * CONNECTED_LED -- an LED that is controlled inside the HAL to indicate connection to a central. * 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 @@ -27,7 +26,7 @@ extern "C" { #endif -typedef void (*Hal_Handler)(void); +typedef void (*Hal_Handler)(uint8_t id); /** * --------- Hal_buttonEnable --------- @@ -48,13 +47,12 @@ typedef void (*Hal_Handler)(void); * BUTTON interrupt enabled * **/ -extern void Hal_buttonEnable(Hal_Handler handler); +extern void Hal_gpioEnable(Hal_Handler handler); /** * --------- Hal_connected --------- * * Called whenever the MCM peripheral connects to a central. * - * Turns on the CONNECTED_LED to show connectivity to the central * Could do other things associated with connection to the central. * * Inputs: @@ -63,9 +61,6 @@ extern void Hal_buttonEnable(Hal_Handler handler); * Returns: * None * - * Side Effects: - * CONNECTED_LED on. - * **/ extern void Hal_connected(void); /** @@ -149,7 +144,6 @@ extern void Hal_delay(uint16_t msecs); * * Called whenever the MCM peripheral disconnects from a central. * - * Turns off the CONNECTED_LED to show lack of connectivity to the central * Could do other things associated with connection to the central. * * Inputs: @@ -158,9 +152,6 @@ extern void Hal_delay(uint16_t msecs); * Returns: * None * - * Side Effects: - * CONNECTED_LED off. - * **/ extern void Hal_disconnected(void); /** @@ -226,7 +217,8 @@ extern void Hal_init(void); * User LED off. * **/ -extern void Hal_ledOff(void); +extern void Hal_greenLedOff(void); +extern void Hal_redLedOff(void); /** * --------- Hal_ledOn --------- * @@ -242,7 +234,8 @@ extern void Hal_ledOff(void); * User LED on. * **/ -extern void Hal_ledOn(void); +extern void Hal_greenLedOn(void); +extern void Hal_redLedOn(void); /** * --------- Hal_ledRead --------- * @@ -258,7 +251,8 @@ extern void Hal_ledOn(void); * None * **/ -extern bool Hal_ledRead(void); +extern bool Hal_greenLedRead(void); +extern bool Hal_redLedRead(void); /** * --------- Hal_ledToggle --------- * @@ -274,7 +268,8 @@ extern bool Hal_ledRead(void); * User LED toggles state. * **/ -extern void Hal_ledToggle(void); +extern void Hal_greenLedToggle(void); +extern void Hal_redLedToggle(void); /** * --------- Hal_tickStart --------- * @@ -297,6 +292,7 @@ extern void Hal_ledToggle(void); * **/ extern void Hal_tickStart(uint16_t msecs, Hal_Handler Handler); +extern void Hal_tickStop(void); #ifdef __cplusplus }