273 #ifndef _LIQUIDCRYSTAL_SR1W_
274 #define _LIQUIDCRYSTAL_SR1W_
276 #if defined (__AVR__)
278 #include <inttypes.h>
291 #define SR1W_DELAY_US 5
292 #define SR1W_DELAY() { delayMicroseconds(SR1W_DELAY_US); numDelays++; }
297 #define SR1W_UNUSED_MASK 0x01 // Set unused bit(s) to '1' as they are slightly faster to clock in.
298 #define SR1W_D7_MASK 0x02
299 #define SR1W_D6_MASK 0x04
300 #define SR1W_D5_MASK 0x08
301 #define SR1W_D4_MASK 0x10
302 #define SR1W_BL_MASK 0x20
303 #define SR1W_RS_MASK 0x40
304 #define SR1W_EN_MASK 0x80 // This cannot be changed. It has to be the first thing shifted in.
306 #define SR1W_ATOMIC_WRITE_LOW(reg, mask) ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *reg &= ~mask; }
307 #define SR1W_ATOMIC_WRITE_HIGH(reg, mask) ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *reg |= mask; }
310 typedef enum { SW_CLEAR, HW_CLEAR } t_sr1w_circuitType;
312 class LiquidCrystal_SR1W :
public LCD
326 LiquidCrystal_SR1W (uint8_t srdata, t_sr1w_circuitType circuitType,
327 t_backlightPol blpol = POSITIVE);
341 virtual void send(uint8_t value, uint8_t mode);
362 void init ( uint8_t srdata, t_sr1w_circuitType circuitType, t_backlightPol blpol,
363 uint8_t lines, uint8_t font );
376 uint8_t loadSR (uint8_t val);
378 fio_register _srRegister;
381 t_sr1w_circuitType _circuitType;
388 #error "ONLY SUPPORTED ON AVR PROCESSORS"
389 #endif // defined (__AVR__)
virtual void setBacklight(uint8_t value)
Definition: LCD.h:517