/* --------------------------------------------------------------------------- * ledfunctions.h (c) 2008 Micro-key bv * --------------------------------------------------------------------------- * Micro-key bv * Industrieweg 28, 9804 TG Noordhorn * Postbus 92, 9800 AB Zuidhorn * The Netherlands * Tel: +31 594 503020 * Fax: +31 594 505825 * Email: support@microkey.nl * Web: www.microkey.nl * --------------------------------------------------------------------------- * Description: * Headerfile for ledfunctions.c * --------------------------------------------------------------------------- * Version(s): 0.1, Mar 11, 2008, MMi * Creation. * --------------------------------------------------------------------------- */ #ifndef LEDFUNCTIONS_H_ #define LEDFUNCTIONS_H_ /* --------------------------------------------------------------------------- * System include files. * --------------------------------------------------------------------------- */ #include "lpc23xx.h" #include "types.h" /* --------------------------------------------------------------------------- * Application include files. * --------------------------------------------------------------------------- */ #include "leds.h" /* --------------------------------------------------------------------------- * Constant and macro definitions. * --------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------- * Type definitions. * --------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------- * Variable declarations. * --------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------- * Function declarations. * --------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------- * Function: LEDPauseFlash * * Function that flashes either the RED or the GREEN LED in user defined * length and number. * * Parameters: t_led_ids LEDnum - Defines the LED to flash * UINT8 counts - Number of flash events * INT16 delay_length - length of single flash event * * Return: void * --------------------------------------------------------------------------- */ void LEDPauseFlash(t_led_ids LEDnum, UINT8 counts, INT16 delay_length); /* --------------------------------------------------------------------------- * Function: LEDResult * * Function to display a BOOLEAN Variable either on RED or GREEN LED * * Parameters: BOOLEAN TestResult - Gives the BOOLEAN Variable to display * * Return: void * --------------------------------------------------------------------------- */ void LEDResult (BOOLEAN TestResult); /* --------------------------------------------------------------------------- * Function: LEDResultDIO * * Function to display a BOOLEAN Variable on a DIO LED * * Parameters: BOOLEAN TestResult - Gives the BOOLEAN Variable to display * UINT 16 dioNo - Number of DIO channel * * Return: void * --------------------------------------------------------------------------- */ void LEDResultDIO (BOOLEAN TestResult, UINT16 dioNo); /* --------------------------------------------------------------------------- * Function: LEDToggleForever * * Function that simply toggles RED and GREEN LED in an endless loop * * Parameters: void * * Return: void * --------------------------------------------------------------------------- */ void LEDToggleForever( void); /* --------------------------------------------------------------------------- * Function: LEDToggle * * Function that simply toggles RED and GREEN LED for user defined number * * Parameters: UINT16 cnts - user defined toggle number * * Return: void * --------------------------------------------------------------------------- */ void LEDToggle( UINT16 cnts); /* --------------------------------------------------------------------------- * Function: LEDShowStatus * * Function to display a Variable value by flashing that amount of. * * Parameters: UINT16 status - Value of Variable to flash like * * Return: void * --------------------------------------------------------------------------- */ void LEDShowStatus (UINT16 status); /* --------------------------------------------------------------------------- * Functions: gLEDToggle / rLEDToggle * * Functions to toggle either RED or GREEN LED forever with user defined * flash time * * Parameters: UINT16 time * * Return: void * --------------------------------------------------------------------------- */ void gLEDToggle (UINT16 time); void rLEDToggle (UINT16 time); /* --------------------------------------------------------------------------- * Function: dioToggle * * Function to toggle LED Status of a user defined Digital Output with 100 ms * flash time. * * Parameters: UINT16 LEDnr * * Return: void * --------------------------------------------------------------------------- */ void dioToggle (UINT16 LEDnr); /* --------------------------------------------------------------------------- * Function: dioToggleNC * * Function to toggle LED Status of a user defined Digital Output with 1000 ms * flash time. * * Parameters: UINT16 LEDnr * * Return: void * --------------------------------------------------------------------------- */ void dioToggleNC (UINT16 LEDnr); /* --------------------------------------------------------------------------- * Function: dio2x4 * * Function to constantly flash the DIO LEDs in ON-OFF-ON-OFF pattern with * userdefined toggle Time. * Normaly used to note the user for something * * Parameters: UINT32 ToggleTime * * Return: void * --------------------------------------------------------------------------- */ void dio2x4 (UINT32 ToggleTime); /* --------------------------------------------------------------------------- * Function: dioClean * * Sets all Digital Outputs back to LOW * * Parameters: void * * Return: void * --------------------------------------------------------------------------- */ void dioClean (void); /* --------------------------------------------------------------------------- * Function: dioCapture * * Function to capture and save up to all 8 Digital Output Levels * * Parameters: void * * Return: UINT8 - up to all 8 Digital Output Levels * --------------------------------------------------------------------------- */ UINT8 dioCapture (void); /* --------------------------------------------------------------------------- * Function: dioResume * * Function to set or restore up to all 8 Digital Output Levels * * Parameters: UINT8 dioResumeValue - Value for setting Output Levels * * Return: void * --------------------------------------------------------------------------- */ void dioResume (UINT8 dioResumeValue); #endif /*LEDFUNCTIONS_H_*/