36 static const uint8_t rs = 0, e = 1, db4 = 14, db5 = 17, db6 = 13, db7 = IO_D5;
40 virtual void initPins()
42 FastGPIO::Pin<e>::setOutputLow();
45 virtual void send(uint8_t data,
bool rsValue,
bool only4bits)
53 FastGPIO::PinLoan<rs> loanRS;
54 FastGPIO::PinLoan<db4> loanDB4;
55 FastGPIO::PinLoan<db5> loanDB5;
56 FastGPIO::PinLoan<db6> loanDB6;
57 FastGPIO::PinLoan<db7> loanDB7;
60 FastGPIO::Pin<rs>::setOutput(rsValue);
63 if (!only4bits) { sendNibble(data >> 4); }
64 sendNibble(data & 0x0F);
69 void sendNibble(uint8_t data)
71 FastGPIO::Pin<db4>::setOutput(data >> 0 & 1);
72 FastGPIO::Pin<db5>::setOutput(data >> 1 & 1);
73 FastGPIO::Pin<db6>::setOutput(data >> 2 & 1);
74 FastGPIO::Pin<db7>::setOutput(data >> 3 & 1);
76 FastGPIO::Pin<e>::setOutputHigh();
78 FastGPIO::Pin<e>::setOutputLow();
Writes data to the LCD on the Zumo 32U4.