firmware for my Touchscreen E-Paper Input Module for Framework Laptop 16
0

Configure Feed

Select the types of activity you want to include in your feed.

1use eepy_serial::SerialCommand; 2use crate::{Error, HostApp, Serial}; 3 4pub const IMAGE_BYTES: usize = (240 * 416) / 8; 5 6impl Serial<HostApp> { 7 pub fn refresh(&mut self, fast: bool, image: &[u8; IMAGE_BYTES]) -> Result<(), Error> { 8 let cmd = if fast { SerialCommand::RefreshFast } else { SerialCommand::RefreshNormal }; 9 self.write(cmd, image) 10 } 11 12 pub fn maybe_refresh(&mut self, fast: bool, image: &[u8; IMAGE_BYTES]) -> Result<(), Error> { 13 let cmd = if fast { SerialCommand::MaybeRefreshFast } else { SerialCommand::MaybeRefreshNormal }; 14 self.write(cmd, image) 15 } 16}