summaryrefslogtreecommitdiff
path: root/digital/zigbit/bitcloud/stack/Components/BSP/include/leds.h
blob: a75bb28ce9e87ad3e9d5522941ae6557feb27233 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/************************************************************//**
  \file  leds.h

  \brief The header file describes the leds interface.

  \author
    Atmel Corporation: http://www.atmel.com \n
    Support email: avr@atmel.com

  Copyright (c) 2008-2011, Atmel Corporation. All rights reserved.
  Licensed under Atmel's Limited License Agreement (BitCloudTM).

  \internal
  History:
    29/05/07 E. Ivanov - Created
*****************************************************************/

#ifndef _LEDS_H
#define _LEDS_H

/****************************************************************
                   Includes section
*****************************************************************/
// \cond
#include <types.h>
// \endcond

/****************************************************************
                   Define(s) section
*****************************************************************/
#define LED_FIRST     0
#define LED_SECOND    1
#define LED_THIRD     2
#define LED_FOURTH    3
#define LED_FIFTH     4
#define LED_SIXTH     5
#define LED_SEVENTH   6
#define LED_EIGHTH    7
#define LED_RED       LED_FIRST
#define LED_YELLOW    LED_SECOND
#define LED_GREEN     LED_THIRD
#define LED_BLUE      LED_FOURTH

/****************************************************************
                   Prototypes section
*****************************************************************/
/************************************************************//**
\brief Opens leds module to use.
\return
  BC_SUCCESS - always.
****************************************************************/
result_t BSP_OpenLeds(void);

/************************************************************//**
\brief Closes leds module.
\return
  BC_SUCCESS - always.
****************************************************************/
result_t BSP_CloseLeds(void);

/************************************************************//**
\brief Turns on a led.
\param[in]
  id - number of the led to proceed. Must be chosen from defines.
****************************************************************/
void BSP_OnLed(uint8_t id);

/************************************************************//**
\brief Turns off a led.
\param[in]
  id - number of the led to proceed. Must be chosen from defines.
****************************************************************/
void BSP_OffLed(uint8_t id);

/************************************************************//**
\brief Switches the led state to the opposite.
\param[in]
  id - number of the led to proceed. Must be chosen from defines.
****************************************************************/
void BSP_ToggleLed(uint8_t id);

#endif /* _LEDS_H */
// eof leds.h