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