262 #ifndef _LIQUIDCRYSTAL_SR1W_
263 #define _LIQUIDCRYSTAL_SR1W_
265 #if defined (__AVR__)
267 #include <inttypes.h>
280 #define SR1W_DELAY_US 5
281 #define SR1W_DELAY() { delayMicroseconds(SR1W_DELAY_US); numDelays++; }
286 #define SR1W_UNUSED_MASK 0x01 // Set unused bit(s) to '1' as they are slightly faster to clock in.
287 #define SR1W_D7_MASK 0x02
288 #define SR1W_D6_MASK 0x04
289 #define SR1W_D5_MASK 0x08
290 #define SR1W_D4_MASK 0x10
291 #define SR1W_BL_MASK 0x20
292 #define SR1W_RS_MASK 0x40
293 #define SR1W_EN_MASK 0x80 // This cannot be changed. It has to be the first thing shifted in.
295 #define SR1W_ATOMIC_WRITE_LOW(reg, mask) ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *reg &= ~mask; }
296 #define SR1W_ATOMIC_WRITE_HIGH(reg, mask) ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *reg |= mask; }
299 typedef enum { SW_CLEAR, HW_CLEAR } t_sr1w_circuitType;
301 class LiquidCrystal_SR1W :
public LCD
315 LiquidCrystal_SR1W (uint8_t srdata, t_sr1w_circuitType circuitType,
316 t_backlightPol blpol = POSITIVE);
330 virtual void send(uint8_t value, uint8_t mode);
351 void init ( uint8_t srdata, t_sr1w_circuitType circuitType, t_backlightPol blpol,
352 uint8_t lines, uint8_t font );
365 uint8_t loadSR (uint8_t val);
367 fio_register _srRegister;
370 t_sr1w_circuitType _circuitType;
377 #error "ONLY SUPPORTED ON AVR PROCESSORS"
378 #endif // defined (__AVR__)
virtual void setBacklight(uint8_t value)
Definition: LCD.h:505