38 static const uint8_t rs = 0, e = 1, db4 = 14, db5 = 17, db6 = 13, db7 = IO_D5;
42 virtual void initPins()
44 FastGPIO::Pin<e>::setOutputLow();
47 virtual void send(uint8_t data,
bool rsValue,
bool only4bits)
55 FastGPIO::PinLoan<rs> loanRS;
56 FastGPIO::PinLoan<db4> loanDB4;
57 FastGPIO::PinLoan<db5> loanDB5;
58 FastGPIO::PinLoan<db6> loanDB6;
59 FastGPIO::PinLoan<db7> loanDB7;
62 FastGPIO::Pin<rs>::setOutput(rsValue);
65 if (!only4bits) { sendNibble(data >> 4); }
66 sendNibble(data & 0x0F);
76 void sendNibble(uint8_t data)
78 FastGPIO::Pin<db4>::setOutput(data >> 0 & 1);
79 FastGPIO::Pin<db5>::setOutput(data >> 1 & 1);
80 FastGPIO::Pin<db6>::setOutput(data >> 2 & 1);
81 FastGPIO::Pin<db7>::setOutput(data >> 3 & 1);
83 FastGPIO::Pin<e>::setOutputHigh();
85 FastGPIO::Pin<e>::setOutputLow();
Writes data to the LCD on the 3pi+ 32U4.
Top-level namespace for the Pololu3piPlus32U4 library.