diff options
Diffstat (limited to 'libraries/MultiLCD/hardware/avr/HW_AVR_defines.h')
-rw-r--r-- | libraries/MultiLCD/hardware/avr/HW_AVR_defines.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libraries/MultiLCD/hardware/avr/HW_AVR_defines.h b/libraries/MultiLCD/hardware/avr/HW_AVR_defines.h new file mode 100644 index 0000000..557778c --- /dev/null +++ b/libraries/MultiLCD/hardware/avr/HW_AVR_defines.h @@ -0,0 +1,25 @@ +// Enable or disable the use of a display shield designed for use on +// an Arduino Uno (or compatible) on an Arduino Mega +// +// ** Currently only available for 8bit display shields ** +// +// Uncomment the following line to enable this feature +//#define USE_UNO_SHIELD_ON_MEGA 1 +//******************************************************************** + +// *** Hardwarespecific defines *** +#define cbi(reg, bitmask) *reg &= ~bitmask +#define sbi(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 cport(port, data) port &= data +#define sport(port, data) port |= data + +#define swap(type, i, j) {type t = i; i = j; j = t;} + +#define fontbyte(x) pgm_read_byte(&cfont.font[x]) + +#define regtype volatile uint8_t +#define regsize uint8_t +#define bitmapdatatype unsigned int* |