PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

HW_AVR_defines.h 918B

3 years ago
12345678910111213141516171819202122232425
  1. // Enable or disable the use of a display shield designed for use on
  2. // an Arduino Uno (or compatible) on an Arduino Mega
  3. //
  4. // ** Currently only available for 8bit display shields **
  5. //
  6. // Uncomment the following line to enable this feature
  7. //#define USE_UNO_SHIELD_ON_MEGA 1
  8. //********************************************************************
  9. // *** Hardwarespecific defines ***
  10. #define cbi(reg, bitmask) *reg &= ~bitmask
  11. #define sbi(reg, bitmask) *reg |= bitmask
  12. #define pulse_high(reg, bitmask) sbi(reg, bitmask); cbi(reg, bitmask);
  13. #define pulse_low(reg, bitmask) cbi(reg, bitmask); sbi(reg, bitmask);
  14. #define cport(port, data) port &= data
  15. #define sport(port, data) port |= data
  16. #define swap(type, i, j) {type t = i; i = j; j = t;}
  17. #define fontbyte(x) pgm_read_byte(&cfont.font[x])
  18. #define regtype volatile uint8_t
  19. #define regsize uint8_t
  20. #define bitmapdatatype unsigned int*