// write either command or data, with automatic 4/8-bit selection void PCFCrystal::send(uint8_t value, uint8_t mode) { /* // ORIGINAL CODE digitalWrite(_rs_pin, mode); // if there is a RW pin indicated, set it low to Write if (_rw_pin != -1) { digitalWrite(_rw_pin, LOW); } */ setBit(modeBuffer(), _rs_pin, mode); // if there is a RW pin indicated, set it low to Write if (_rw_pin) { setBit(modeBuffer(), _rw_pin, LOW); } writePCF(modeAddress(), *modeBuffer()); //return; if (_displayfunction & LCD_8BITMODE) { write8bits(value); } else { write4bits(value>>4); write4bits(value); } }
int ADE7758::lineFreq(char phase){ uint8_t mmode; mmode = read8bits(MMODE); write8bits(MMODE,(mmode&0x11111100 )| phase); delay(10); return read16bits(FREQ); }
void ADE7758::begin() { //normal mode //write8bits(OPMODE, 0x44); spi_setup(); write8bits(OPMODE, 0x05); }
// write either command or data, with automatic 4/8-bit selection void ShiftLCD::send(uint8_t value, uint8_t mode) { if (_displayfunction & LCD_8BITMODE) { write8bits(value, mode); } else { write4bits(value>>4, mode); write4bits(value, mode); } }
void LCD_Low_Level::sendData(uint8_t value, uint8_t rs_bit) { writeControl(rs_bit, 0); if (_display_function & LCD_8BitMode) { write8bits(value); } else { write4bits((value & 0xF0)>>4); write4bits(value & 0x0F); } }
void LCD::send(uint8_t value, uint8_t mode) { digitalOutput(pinRS, mode); if (pinRW != 255) digitalOutput(pinRW, LOW); if (displayFunction & LCD_8BITMODE) write8bits(value); else { write4bits(value>>4); write4bits(value); } }
// write either command or data, with automatic 4/8-bit selection void LiquidCrystal::send(uint8_t value, uint8_t mode) { digitalWrite(_rs_pin, mode); // if there is a RW pin indicated, set it low to Write if (_rw_pin != 255) { digitalWrite(_rw_pin, LOW); } if (_displayfunction & LCD_8BITMODE) { write8bits(value); } else { write4bits(value>>4); write4bits(value); } }
// write either command or data, with automatic 4/8-bit selection void LiquidCrystal::send(uint8_t value, uint8_t mode) { IO::digitalWrite(LCD_RS_PIN, mode); // if there is a RW pin indicated, set it low to Write #ifdef LCD_RW_PIN IO::digitalWrite(LCD_RW_PIN, LOW); #endif #ifdef LCD_ENABLE_8BITMODE write8bits(value); #else write4bits(value>>4); write4bits(value); #endif //LCD_ENABLE_8BITMODE }
// write either command or data, with automatic 4/8-bit selection void LiquidCrystal::send(uint8_t value, uint8_t mode) { digitalWrite(_rs_pin, mode); digitalWrite(_rw_pin, LOW); write8bits(value); }