diff options
author | Stanley Huang <stanleyhuangyc@gmail.com> | 2014-06-06 09:01:44 +1000 |
---|---|---|
committer | Stanley Huang <stanleyhuangyc@gmail.com> | 2014-06-06 09:01:44 +1000 |
commit | 0236e79af77c785c68fe0856723ecfb0fac4bbeb (patch) | |
tree | 867dcb4211f8f9552d72cbbbebb02cd4c6d5c992 /libraries/MultiLCD/hardware/arm/HW_ARM_defines.h | |
parent | 9fd501b8f63ef4d8c484c1ad49478ca8d7bd593a (diff) | |
download | 2021-arduino-obd-0236e79af77c785c68fe0856723ecfb0fac4bbeb.tar.gz 2021-arduino-obd-0236e79af77c785c68fe0856723ecfb0fac4bbeb.tar.bz2 2021-arduino-obd-0236e79af77c785c68fe0856723ecfb0fac4bbeb.zip |
Add hardware header files
Diffstat (limited to 'libraries/MultiLCD/hardware/arm/HW_ARM_defines.h')
-rw-r--r-- | libraries/MultiLCD/hardware/arm/HW_ARM_defines.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/libraries/MultiLCD/hardware/arm/HW_ARM_defines.h b/libraries/MultiLCD/hardware/arm/HW_ARM_defines.h new file mode 100644 index 0000000..2881e17 --- /dev/null +++ b/libraries/MultiLCD/hardware/arm/HW_ARM_defines.h @@ -0,0 +1,40 @@ +// CTE TFT LCD/SD Shield for Arduino Due +// ------------------------------------- +// Uncomment the following line if you are using this shield +//#define CTE_DUE_SHIELD 1 +// +// For this shield: RS=25, WR=26, CS=27, RST=28 +//******************************************************************** + +// ElecHouse TFT LCD/SD Shield for Arduino Due +// ------------------------------------- +// Uncomment the following line if you are using this shield +//#define EHOUSE_DUE_SHIELD 1 +// +// For this shield: RS=22, WR=23, CS=31, RST=33 +//******************************************************************** + +// *** 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) cfont.font[x] + +#define pgm_read_word(data) *data +#define pgm_read_byte(data) *data +#define bitmapdatatype unsigned short* + +#if defined(TEENSYDUINO) && TEENSYDUINO >= 117 + #define regtype volatile uint8_t + #define regsize uint8_t +#else + #define regtype volatile uint32_t + #define regsize uint32_t +#endif |