use the blit routine in the library for the loader logo

This commit is contained in:
bunnie 2025-02-24 00:58:09 +08:00
parent ffceea0389
commit 96811143fd

View file

@ -1,5 +1,4 @@
use cramium_hal::sh1107::{Mono, Oled128x128};
use ux_api::minigfx::{FrameBuffer, Point};
use cramium_hal::sh1107::Oled128x128;
pub fn show_logo(sh1107: &mut Oled128x128) {
/* // pattern test for debugging pixel orientations - done with this now, I think?
@ -18,11 +17,5 @@ pub fn show_logo(sh1107: &mut Oled128x128) {
crate::println!("oled test end");
*/
sh1107.buffer_mut().fill(0);
for (i, &word) in ux_api::bitmaps::baochip128x128::BITMAP.iter().enumerate() {
for bit in 0..32 {
if (word & (1 << (31 - bit))) != 0 {
sh1107.put_pixel(Point::new((i as isize % 4) * 32 + bit, i as isize / 4), Mono::White.into());
}
}
}
sh1107.blit_screen(&ux_api::bitmaps::baochip128x128::BITMAP);
}