summaryrefslogtreecommitdiffhomepage
path: root/digital/beacon/src/Bitcloud_stack/Components/BSP/RCB/include/bspLeds.h
blob: 8bfb459f7c2cb1e04c1d2a038c9f3f55fe65dd9f (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
/***************************************************************************//**
\file  bspLeds.h

\brief Declaration of leds defines.

\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:
    26.08.09 A. Taradov - Created
*******************************************************************************/

#ifndef _BSPLEDS_H
#define _BSPLEDS_H

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

/******************************************************************************
                   Define(s) section
******************************************************************************/

#define halInitFirstLed()       GPIO_E2_make_out()
#define halUnInitFirstLed()     GPIO_E2_make_in()
#define halOnFirstLed()         GPIO_E2_clr()
#define halOffFirstLed()        GPIO_E2_set()
#define halReadFirstLed()       GPIO_E2_read()
#define halToggleFirstLed()     GPIO_E2_toggle()

#define halInitSecondLed()      GPIO_E3_make_out()
#define halUnInitSecondLed()    GPIO_E3_make_in()
#define halOnSecondLed()        GPIO_E3_clr()
#define halOffSecondLed()       GPIO_E3_set()
#define halReadSecondLed()      GPIO_E3_read()
#define halToggleSecondLed()    GPIO_E3_toggle()

#if (APP_USART_CHANNEL == USART_CHANNEL_USBFIFO) && defined(ATMEGA128RFA1)

#define halInitThirdLed()
#define halUnInitThirdLed()
#define halOnThirdLed()
#define halOffThirdLed()
#define halReadThirdLed()
#define halToggleThirdLed()

#else

#define halInitThirdLed()       GPIO_E4_make_out()
#define halUnInitThirdLed()     GPIO_E4_make_in()
#define halOnThirdLed()         GPIO_E4_clr()
#define halOffThirdLed()        GPIO_E4_set()
#define halReadThirdLed()       GPIO_E4_read()
#define halToggleThirdLed()     GPIO_E4_toggle()

#endif // APP_USART_CHANNEL == USART_CHANNEL_USBFIFO

#endif /*_BSPLEDS_H*/
// eof bspLeds.h