Subversion Repositories Projects

Rev

Rev 231 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 231 Rev 271
1
#include <inttypes.h>
1
#include <inttypes.h>
2
#include "led.h"
2
#include "led.h"
3
 
3
 
4
 
4
 
5
// initializes the LED control outputs
5
// initializes the LED control outputs
6
void LED_Init(void)
6
void LED_Init(void)
7
{
7
{
8
        #ifdef USE_SDLOGGER
8
        #ifdef USE_SDLOGGER
9
    // set PB0 as output (control of red LED)
9
    // set PB0 as output (control of red LED)
10
        DDRB |= (1<<DDB0);
10
        DDRB |= (1<<DDB0);
11
        LEDRED_OFF;
11
        LEDRED_OFF;
12
        #endif
12
        #endif
13
 
13
 
14
        #ifdef USE_FOLLOWME
14
        #ifdef USE_FOLLOWME
15
        // set PB0 as output (control of yellow LED)
15
        // set PB0 as output (control of green LED)
16
        DDRB |= (1<<DDB0);
16
        DDRB |= (1<<DDB0);
17
        LEDYELLOW_OFF;
17
        LEDGRN_OFF;
18
        // set PB1 as output (control of red LED)
18
        // set PB1 as output (control of red LED)
19
        DDRB |= (1<<DDB1);
19
        DDRB |= (1<<DDB1);
20
        LEDRED_OFF;
20
        LEDRED_OFF;
21
        #endif
21
        #endif
22
 
22
 
23
}
23
}
24
 
24