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_ARM_defines.h 1.1KB

3 jaren geleden
12345678910111213141516171819202122232425262728293031323334353637
  1. // CTE TFT LCD/SD Shield for Arduino Due
  2. // -------------------------------------
  3. // Uncomment the following line if you are using this shield
  4. //#define CTE_DUE_SHIELD 1
  5. //
  6. // For this shield: RS=25, WR=26, CS=27, RST=28
  7. //********************************************************************
  8. // *** Hardwarespecific defines ***
  9. #define cbi(reg, bitmask) *reg &= ~bitmask
  10. #define sbi(reg, bitmask) *reg |= bitmask
  11. #define pulse_high(reg, bitmask) sbi(reg, bitmask); cbi(reg, bitmask);
  12. #define pulse_low(reg, bitmask) cbi(reg, bitmask); sbi(reg, bitmask);
  13. #define cport(port, data) port &= data
  14. #define sport(port, data) port |= data
  15. #define swap(type, i, j) {type t = i; i = j; j = t;}
  16. #define fontbyte(x) cfont.font[x]
  17. #ifdef pgm_read_word
  18. #undef pgm_read_word
  19. #endif
  20. #ifdef pgm_read_byte
  21. #undef pgm_read_byte
  22. #endif
  23. #define pgm_read_word(data) *data
  24. #define pgm_read_byte(data) *data
  25. #if defined(TEENSYDUINO) && TEENSYDUINO >= 117
  26. #define regtype volatile uint8_t
  27. #define regsize uint8_t
  28. #else
  29. #define regtype volatile uint32_t
  30. #define regsize uint32_t
  31. #endif
  32. #define bitmapdatatype unsigned short*