diff options
author | Stanley Huang <stanleyhuangyc@gmail.com> | 2015-11-01 21:19:19 +1100 |
---|---|---|
committer | Stanley Huang <stanleyhuangyc@gmail.com> | 2015-11-01 21:19:19 +1100 |
commit | 1b496fb2a89b1af1f4090b2910fdc5fd9f5a1c5a (patch) | |
tree | 8d113e60f7e67ca3b5c56d3eb90daef166032f12 /libraries/MultiLCD/hardware/arm/HW_ARM_defines.h | |
parent | ad12f674c507f425f72d062253deb1f56d94ebff (diff) | |
download | 2021-arduino-obd-1b496fb2a89b1af1f4090b2910fdc5fd9f5a1c5a.tar.gz 2021-arduino-obd-1b496fb2a89b1af1f4090b2910fdc5fd9f5a1c5a.tar.bz2 2021-arduino-obd-1b496fb2a89b1af1f4090b2910fdc5fd9f5a1c5a.zip |
Add R61581 3.5" LCD support
Diffstat (limited to 'libraries/MultiLCD/hardware/arm/HW_ARM_defines.h')
-rw-r--r-- | libraries/MultiLCD/hardware/arm/HW_ARM_defines.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libraries/MultiLCD/hardware/arm/HW_ARM_defines.h b/libraries/MultiLCD/hardware/arm/HW_ARM_defines.h index 2881e17..8df5f97 100644 --- a/libraries/MultiLCD/hardware/arm/HW_ARM_defines.h +++ b/libraries/MultiLCD/hardware/arm/HW_ARM_defines.h @@ -15,8 +15,13 @@ //******************************************************************** // *** Hardwarespecific defines *** -#define cbi(reg, bitmask) *reg &= ~bitmask -#define sbi(reg, bitmask) *reg |= bitmask +#if defined(ENERGIA) + #define cbi(reg, bitmask) HWREG((uint32_t)reg + 0x3FC) &= ~bitmask + #define sbi(reg, bitmask) HWREG((uint32_t)reg + 0x3FC) |= bitmask +#else + #define cbi(reg, bitmask) *reg &= ~bitmask + #define sbi(reg, bitmask) *reg |= bitmask +#endif #define pulse_high(reg, bitmask) sbi(reg, bitmask); cbi(reg, bitmask); #define pulse_low(reg, bitmask) cbi(reg, bitmask); sbi(reg, bitmask); |