git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@427 05563f52-14a8-4384-a975-3d1654cca0fa
129 lines
3.5 KiB
C
129 lines
3.5 KiB
C
// -----------------------------------------------------------------------------
|
|
/// @file Leds.h
|
|
/// @brief File description
|
|
// -----------------------------------------------------------------------------
|
|
// 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
|
|
// -----------------------------------------------------------------------------
|
|
/// $Revision$
|
|
/// $Author$
|
|
/// $Date$
|
|
// (c) 2015 Micro-Key bv
|
|
// -----------------------------------------------------------------------------
|
|
|
|
/**
|
|
* %Leds implementation
|
|
* \defgroup Leds Package Leds
|
|
* \ingroup HAL
|
|
* @{
|
|
*/
|
|
|
|
#ifndef INC_LEDS_H_
|
|
#define INC_LEDS_H_
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Include files
|
|
// -----------------------------------------------------------------------------
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include "stm32f10x.h"
|
|
|
|
#include "gpio.h"
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Constant and macro definitions
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Type definitions.
|
|
// -----------------------------------------------------------------------------
|
|
|
|
typedef enum
|
|
{
|
|
LED_ONBOARD_GREEN = 0,
|
|
LED_ONBOARD_ORANGE,
|
|
LED_BICOLOR_GREEN,
|
|
LED_BICOLOR_RED,
|
|
LED_BICOLOR_ORANGE,
|
|
LED_NUMBER_OF_LEDS
|
|
} Led;
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Function declarations
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
/** ----------------------------------------------------------------------------
|
|
* Led_construct
|
|
* Constructor for LEDs
|
|
*
|
|
* @param onboardGreen
|
|
* @param onboardOrange
|
|
* @param bicolourGreen
|
|
* @param bicolourRed
|
|
*
|
|
* @return void
|
|
*
|
|
* @todo
|
|
* -----------------------------------------------------------------------------
|
|
*/
|
|
extern ErrorStatus Led_construct(struct Gpio* onboardGreen, struct Gpio* onboardOrange, struct Gpio* bicolourGreen, struct Gpio* bicolourRed);
|
|
|
|
|
|
/** ----------------------------------------------------------------------------
|
|
* Led_on
|
|
* Turns on the LED given in argument led
|
|
*
|
|
* @param led The LED to set
|
|
*
|
|
* @return void
|
|
*
|
|
* @todo
|
|
* -----------------------------------------------------------------------------
|
|
*/
|
|
extern void Led_on(Led led);
|
|
|
|
|
|
/** ----------------------------------------------------------------------------
|
|
* Led_off
|
|
* Turns off the LED given in argument led
|
|
*
|
|
* @param led The LED to set
|
|
*
|
|
* @return void
|
|
*
|
|
* @todo
|
|
* -----------------------------------------------------------------------------
|
|
*/
|
|
extern void Led_off(Led led);
|
|
|
|
|
|
/** ----------------------------------------------------------------------------
|
|
* Led_getStatus
|
|
* Returns the status of the led in arugment led
|
|
*
|
|
* @param led The led to request the status of
|
|
* @param
|
|
* @return bool TRUE if led is ON
|
|
* FALSE if led is OFF
|
|
*
|
|
* @todo
|
|
* -----------------------------------------------------------------------------
|
|
*/
|
|
extern bool Led_getStatus(Led led);
|
|
|
|
|
|
|
|
#endif /* INC_LEDS_H_ */
|
|
|
|
/** @} */
|