Rev Author Line No. Line
615 kaklik 1 #ifndef __opled_h__
2 #define __opled_h__
3  
4 #include "common.h"
5  
6 namespace OpLed {
7 #if defined BOARD_rs232if
8 const int OpLedMask=(0x01 << 4);
9 #elif defined BOARD_umServo32
10 const int OpLedMask=(0x01 << 4);
11 #elif defined BOARD_umHBridge
12 const int OpLedMask=(0x01 << 2);
13 #else
14 #error Unknown board specification
15 #endif
16  
17 void inline Init() {
18 SETBIT(DDRD,OpLedMask);
19 }
20  
21 void inline On() {
22 SETBIT(PORTD,OpLedMask);
23 }
24  
25 void inline Off() {
26 CLRBIT(PORTD,OpLedMask);
27 }
28  
29 void inline Toggle() {
30 TOGGLEBIT(PORTD,OpLedMask);
31 }
32 }
33  
34 #endif // __opled_h__