Finish slideshow

This commit is contained in:
Sofia 2025-09-12 23:03:03 +03:00
parent a634c9230c
commit bc944008a8
13 changed files with 5 additions and 12 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
images/steve.qoi Normal file

Binary file not shown.

View File

@ -20,7 +20,7 @@ use panic_halt as _;
use crate::{
display::{Display, Position, Rgb565},
peripherals::{Button, Knob},
qoi::{MARIO, PIKA, PRESS_BTN, draw_image},
qoi::{MARIO, PIKA, PRESS_BTN, STEVE, draw_image},
};
mod display;
@ -49,7 +49,7 @@ fn main() -> ! {
// ufmt::uwriteln!(serial, "Eeprom capacity: {}", eeprom.capacity()).unwrap();
let cs = pins.pb2.into_output();
let (mut spi, mut cs) = spi::Spi::new(
let (spi, cs) = spi::Spi::new(
dp.SPI,
pins.pb5.into_output(),
pins.pb3.into_output(),
@ -75,23 +75,15 @@ fn main() -> ! {
display.init();
let mut adc: Adc<CoreClock> = atmega_hal::Adc::new(dp.ADC, Default::default());
let mut button = Button::from(pins.pd5.into_pull_up_input());
let mut knob = Knob {
pin: pins.pc1.into_analog_input(&mut adc),
adc,
};
let mut delay = atmega_hal::delay::Delay::<CoreClock>::new();
let mut idx = 0;
let mut images = [&PIKA.as_slice(), &MARIO.as_slice()];
let images = [&PIKA.as_slice(), &MARIO.as_slice(), &STEVE.as_slice()];
let len = images.len();
match draw_image(
&mut serial,
&PRESS_BTN.as_slice(),
&PIKA.as_slice(),
&mut display,
Position { x: 0, y: 0 },
) {

View File

@ -19,6 +19,7 @@ use crate::{
// https://qoiformat.org/qoi-specification.pdf
pub static MARIO: [u8; 161] = *include_bytes!("../images/mario.qoi");
pub static PIKA: [u8; 241] = *include_bytes!("../images/pikachu.qoi");
pub static STEVE: [u8; 187] = *include_bytes!("../images/steve.qoi");
pub static PRESS_BTN: [u8; 174] = *include_bytes!("../images/press_btn.qoi");
#[derive(Debug, uDebug)]