aboutsummaryrefslogtreecommitdiffstats
path: root/sw/deps/hd44780-driver/src/bus
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2020-12-18 10:43:40 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2020-12-18 10:43:40 +0100
commit18bcf61935b1d27d83ce03a490789365da799592 (patch)
treeb111a66ba716bca1efae801ea36f4c5c3fa787dd /sw/deps/hd44780-driver/src/bus
parent28bc0e6d03f221b4292be8e76e4bd019ebcc4616 (diff)
downloadpicardy-18bcf61935b1d27d83ce03a490789365da799592.tar.gz
picardy-18bcf61935b1d27d83ce03a490789365da799592.tar.bz2
picardy-18bcf61935b1d27d83ce03a490789365da799592.zip
LCD: fix setup and hold for I2C commands
Diffstat (limited to 'sw/deps/hd44780-driver/src/bus')
-rw-r--r--sw/deps/hd44780-driver/src/bus/i2c_mcp23008.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/deps/hd44780-driver/src/bus/i2c_mcp23008.rs b/sw/deps/hd44780-driver/src/bus/i2c_mcp23008.rs
index 1ccb479..09a7f2b 100644
--- a/sw/deps/hd44780-driver/src/bus/i2c_mcp23008.rs
+++ b/sw/deps/hd44780-driver/src/bus/i2c_mcp23008.rs
@@ -84,6 +84,11 @@ impl<I2C: Write> DataBus for I2CMCP23008Bus<I2C> {
delay.delay_ms(1);
+ let pins = rs | backlight | (upper_nibble << 3);
+ self.set_pins(pins)?;
+
+ delay.delay_ms(1);
+
let pins = rs | backlight | (lower_nibble << 3);
self.set_pins(pins)?;