1 | #ifndef __OLDMACROS_H_INCLUDED__
|
2 | #define __OLDMACROS_H_INCLUDED__
|
3 |
|
4 | #if 0
|
5 | #define PRG_RDB(addr) __lpm_inline((unsigned short)(addr))
|
6 | #else
|
7 | #define PRG_RDB(addr) _LPM((unsigned short)(addr))
|
8 | #endif
|
9 |
|
10 | #ifndef cbi
|
11 | #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
|
12 | #endif
|
13 |
|
14 | #ifndef sbi
|
15 | #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
|
16 | #endif
|
17 |
|
18 | #ifndef inb
|
19 | #define inb(sfr) _SFR_BYTE(sfr)
|
20 | #endif
|
21 |
|
22 | #ifndef outb
|
23 | #define outb(sfr, val) (_SFR_BYTE(sfr) = (val))
|
24 | #endif
|
25 |
|
26 | #ifndef inw
|
27 | #define inw(sfr) _SFR_WORD(sfr)
|
28 | #endif
|
29 |
|
30 | #ifndef outw
|
31 | #define outw(sfr, val) (_SFR_WORD(sfr) = (val))
|
32 | #endif
|
33 |
|
34 | #ifndef outp
|
35 | #define outp(val, sfr) outb(sfr, val)
|
36 | #endif
|
37 |
|
38 | #ifndef inp
|
39 | #define inp(sfr) inb(sfr)
|
40 | #endif
|
41 |
|
42 | #ifndef BV
|
43 | #define BV(bit) _BV(bit)
|
44 | #endif
|
45 |
|
46 | #endif
|