Example #1
0
inline size_t SpiLcd::write(uint8_t value) {
	send(value, HIGH);
	content[_currline][_currpos] = value;
	_currpos++;
	waitBusy();
	return 1;
}
Example #2
0
// set user defined char 
void  TextLCD::writeCGRAM(int address, int pattern[8]){
    int i;
    address = address & 0x07;  //max 8 char
    for(i=0;i<8;i++){
        waitBusy();  // check if display is ready 
        _rs = 0;
        writeByte(0x40 + address * 8 + i);
        writeData(pattern[i]);
        }
}   
Example #3
0
void
xpcc::Hd44780Minimal<E, RW, RS, DATA>::writeCommand(uint8_t command)
{
	waitBusy();
	
	DATA::setOutput();
	RW::reset();
	RS::reset();
	
	writeNibble(command >> 4);
	writeNibble(command);
}
Example #4
0
void
xpcc::Hd44780Minimal<E, RW, RS, DATA>::writeRaw(char c)
{
	waitBusy();
	
	DATA::setOutput();
	RW::reset();
	RS::set();
	
	uint8_t data = c;
	writeNibble(data >> 4);
	writeNibble(data);
}
Example #5
0
int TextLCD::readData(){
    int input;
    waitBusy();
    _rw = 1;
    _rs = 1;
    __nop();
    _d.input();  // switch Data port to input
    _e = 1;
    __nop();
    input = _d.read() << 4; // high nibble
    _e = 0;
    __nop();
    _e = 1;
    __nop();
    input = input | _d.read(); // low nibble
    _e = 0;   
    return (input);
}
Example #6
0
inline size_t OLEDFourBit::write(uint8_t value) {
	send(value, HIGH);
	waitBusy();
}
Example #7
0
inline void OLEDFourBit::command(uint8_t value) {
	send(value, LOW);
	waitBusy();
}
Example #8
0
void TextLCD::writeData(int data) {
    waitBusy();
    _rs = 1;
    writeByte(data);
}
Example #9
0
void TextLCD::writeCommand(int command) {
    waitBusy();  // check if display is ready 
    _rs = 0;
    writeByte(command);
}
Example #10
0
inline void SpiLcd::command(uint8_t value) {
	send(value, LOW);
	waitBusy();
}