13 lines
447 B
C
13 lines
447 B
C
|
// *** Hardwarespecific defines ***
|
||
|
#define cbi(reg, bitmask) (*(reg + 1)) = bitmask
|
||
|
#define sbi(reg, bitmask) (*(reg + 2)) = bitmask
|
||
|
#define rbi(reg, bitmask) (*(reg) & bitmask)
|
||
|
|
||
|
#define pulse_high(reg, bitmask) sbi(reg, bitmask); cbi(reg, bitmask);
|
||
|
#define pulse_low(reg, bitmask) cbi(reg, bitmask); sbi(reg, bitmask);
|
||
|
|
||
|
#define swap(type, i, j) {type t = i; i = j; j = t;}
|
||
|
|
||
|
#define regtype volatile uint32_t
|
||
|
#define regsize uint16_t
|