equal
deleted
inserted
replaced
8 |
8 |
9 typedef uint8_t byte; |
9 typedef uint8_t byte; |
10 |
10 |
11 typedef volatile uint8_t ioport_t; |
11 typedef volatile uint8_t ioport_t; |
12 |
12 |
13 static inline ioport_t tbi(ioport_t *port, int bit) |
13 static inline ioport_t tbi(ioport_t *port, byte bit) |
14 { |
14 { |
15 return *port & (1 << bit); |
15 return *port & (1 << bit); |
16 } |
16 } |
17 |
17 |
18 static inline void sbi(ioport_t *port, int bit) |
18 static inline void sbi(ioport_t *port, byte bit) |
19 { |
19 { |
20 *port |= (1 << bit); |
20 *port |= (1 << bit); |
21 } |
21 } |
22 |
22 |
23 static inline void cbi(ioport_t *port, int bit) |
23 static inline void cbi(ioport_t *port, byte bit) |
24 { |
24 { |
25 *port &= ~(1 << bit); |
25 *port &= ~(1 << bit); |
26 } |
26 } |
27 |
27 |
28 static inline void xbi(ioport_t *port, int bit) |
28 static inline void xbi(ioport_t *port, byte bit) |
29 { |
29 { |
30 *port ^= (1 << bit); |
30 *port ^= (1 << bit); |
31 } |
31 } |
32 |
32 |
33 #endif |
33 #endif |