OLED driver with shared SPI bus integrated
This commit was merged in pull request #35.
This commit is contained in:
@@ -16,7 +16,9 @@ where
|
||||
lcd
|
||||
}
|
||||
Err(_) => {
|
||||
error!("I2C tertiary LCD init failed on PCF8574T at address 0x27; check bus wiring, power, and device address");
|
||||
error!(
|
||||
"I2C tertiary LCD init failed on PCF8574T at address 0x27; check bus wiring, power, and device address"
|
||||
);
|
||||
panic!("tertiary LCD initialization failed");
|
||||
}
|
||||
}
|
||||
@@ -35,7 +37,10 @@ where
|
||||
return Err(e);
|
||||
}
|
||||
if let Err(e) = lcd.print(text) {
|
||||
error!("I2C LCD print failed on line {line}; payload length={} and device may be busy or disconnected", text.len());
|
||||
error!(
|
||||
"I2C LCD print failed on line {line}; payload length={} and device may be busy or disconnected",
|
||||
text.len()
|
||||
);
|
||||
return Err(e);
|
||||
}
|
||||
Ok(())
|
||||
@@ -52,7 +57,9 @@ where
|
||||
const DISPLAY_ROWS: usize = 2;
|
||||
|
||||
if let Err(e) = lcd.clear() {
|
||||
error!("I2C LCD clear failed before wrapped write; check the shared bus and display response");
|
||||
error!(
|
||||
"I2C LCD clear failed before wrapped write; check the shared bus and display response"
|
||||
);
|
||||
return Err(e);
|
||||
}
|
||||
|
||||
@@ -70,11 +77,16 @@ where
|
||||
};
|
||||
|
||||
if let Err(e) = lcd.set_cursor(0, row as u8) {
|
||||
error!("I2C LCD cursor move failed while writing wrapped row {row}; bus may be busy or device unresponsive");
|
||||
error!(
|
||||
"I2C LCD cursor move failed while writing wrapped row {row}; bus may be busy or device unresponsive"
|
||||
);
|
||||
return Err(e);
|
||||
}
|
||||
if let Err(e) = lcd.print(chunk) {
|
||||
error!("I2C LCD wrapped write failed on row {row}; chunk length={} and text may exceed display width", chunk.len());
|
||||
error!(
|
||||
"I2C LCD wrapped write failed on row {row}; chunk length={} and text may exceed display width",
|
||||
chunk.len()
|
||||
);
|
||||
return Err(e);
|
||||
}
|
||||
offset += chunk.len();
|
||||
|
||||
Reference in New Issue
Block a user