polargraph_arduino/libraries/UTouch/hardware/avr/HW_AVR_defines.h

13 lines
432 B
C
Raw Normal View History

2019-08-31 22:31:33 +02:00
// *** Hardwarespecific defines ***
#define cbi(reg, bitmask) *reg &= ~bitmask
#define sbi(reg, bitmask) *reg |= 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 uint8_t
#define regsize uint8_t