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 std::io::Read; 2use eepy_serial::SerialCommand; 3use crate::{Error, Normal, Serial}; 4 5impl Serial<Normal> { 6 pub fn get_slot(&mut self) -> Result<u8, Error> { 7 self.write(SerialCommand::GetProgramSlot, &[])?; 8 let mut slot_n = [0u8]; 9 self.port.read_exact(&mut slot_n)?; 10 Ok(slot_n[0]) 11 } 12 13 pub fn upload(&mut self, program: &[u8]) -> Result<(), Error> { 14 self.write(SerialCommand::UploadProgram, &program) 15 } 16}