From 1b496fb2a89b1af1f4090b2910fdc5fd9f5a1c5a Mon Sep 17 00:00:00 2001 From: Stanley Huang Date: Sun, 1 Nov 2015 21:19:19 +1100 Subject: Add R61581 3.5" LCD support --- libraries/MultiLCD/hardware/arm/HW_ARM_defines.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'libraries/MultiLCD/hardware/arm/HW_ARM_defines.h') 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); -- cgit v1.2.3