mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-22 06:42:32 +00:00
Applied formatting
This commit is contained in:
parent
79f00e54cc
commit
6edf7b4688
@ -2,18 +2,19 @@
|
||||
//! See ST application note AN4861: Introduction to LCD-TFT display controller (LTDC) on STM32 MCUs for high level details
|
||||
//! This module was tested against the stm32h735g-dk using the RM0468 ST reference manual for detailed register information
|
||||
|
||||
use crate::{
|
||||
gpio::{AfType, OutputType, Speed},
|
||||
interrupt::{self, typelevel::Interrupt},
|
||||
peripherals, rcc, Peripheral,
|
||||
};
|
||||
use core::{future::poll_fn, marker::PhantomData, task::Poll};
|
||||
use core::future::poll_fn;
|
||||
use core::marker::PhantomData;
|
||||
use core::task::Poll;
|
||||
|
||||
use embassy_hal_internal::{into_ref, PeripheralRef};
|
||||
use embassy_sync::waitqueue::AtomicWaker;
|
||||
use stm32_metapac::ltdc::{
|
||||
regs::Dccr,
|
||||
vals::{Bf1, Bf2, Cfuif, Clif, Crrif, Cterrif, Pf, Vbr},
|
||||
};
|
||||
use stm32_metapac::ltdc::regs::Dccr;
|
||||
use stm32_metapac::ltdc::vals::{Bf1, Bf2, Cfuif, Clif, Crrif, Cterrif, Pf, Vbr};
|
||||
|
||||
use crate::gpio::{AfType, OutputType, Speed};
|
||||
use crate::interrupt::typelevel::Interrupt;
|
||||
use crate::interrupt::{self};
|
||||
use crate::{peripherals, rcc, Peripheral};
|
||||
|
||||
static LTDC_WAKER: AtomicWaker = AtomicWaker::new();
|
||||
|
||||
|
@ -11,22 +11,18 @@
|
||||
use bouncy_box::BouncyBox;
|
||||
use defmt::{info, unwrap};
|
||||
use embassy_executor::Spawner;
|
||||
use embassy_stm32::{
|
||||
bind_interrupts,
|
||||
gpio::{Level, Output, Speed},
|
||||
ltdc::{self, Ltdc, LtdcConfiguration, LtdcLayer, LtdcLayerConfig, PolarityActive, PolarityEdge},
|
||||
peripherals,
|
||||
};
|
||||
use embassy_stm32::gpio::{Level, Output, Speed};
|
||||
use embassy_stm32::ltdc::{self, Ltdc, LtdcConfiguration, LtdcLayer, LtdcLayerConfig, PolarityActive, PolarityEdge};
|
||||
use embassy_stm32::{bind_interrupts, peripherals};
|
||||
use embassy_time::{Duration, Timer};
|
||||
use embedded_graphics::{
|
||||
draw_target::DrawTarget,
|
||||
geometry::{OriginDimensions, Point, Size},
|
||||
image::Image,
|
||||
pixelcolor::{raw::RawU24, Rgb888},
|
||||
prelude::*,
|
||||
primitives::Rectangle,
|
||||
Pixel,
|
||||
};
|
||||
use embedded_graphics::draw_target::DrawTarget;
|
||||
use embedded_graphics::geometry::{OriginDimensions, Point, Size};
|
||||
use embedded_graphics::image::Image;
|
||||
use embedded_graphics::pixelcolor::raw::RawU24;
|
||||
use embedded_graphics::pixelcolor::Rgb888;
|
||||
use embedded_graphics::prelude::*;
|
||||
use embedded_graphics::primitives::Rectangle;
|
||||
use embedded_graphics::Pixel;
|
||||
use heapless::{Entry, FnvIndexMap};
|
||||
use tinybmp::Bmp;
|
||||
use {defmt_rtt as _, panic_probe as _};
|
||||
@ -283,12 +279,9 @@ impl OriginDimensions for DoubleBuffer {
|
||||
|
||||
mod rcc_setup {
|
||||
|
||||
use embassy_stm32::{rcc::*, Peripherals};
|
||||
use embassy_stm32::{
|
||||
rcc::{Hse, HseMode},
|
||||
time::Hertz,
|
||||
Config,
|
||||
};
|
||||
use embassy_stm32::rcc::{Hse, HseMode, *};
|
||||
use embassy_stm32::time::Hertz;
|
||||
use embassy_stm32::{Config, Peripherals};
|
||||
|
||||
/// Sets up clocks for the stm32h735g mcu
|
||||
/// change this if you plan to use a different microcontroller
|
||||
@ -364,7 +357,8 @@ mod rcc_setup {
|
||||
}
|
||||
|
||||
mod bouncy_box {
|
||||
use embedded_graphics::{geometry::Point, primitives::Rectangle};
|
||||
use embedded_graphics::geometry::Point;
|
||||
use embedded_graphics::primitives::Rectangle;
|
||||
|
||||
enum Direction {
|
||||
DownLeft,
|
||||
|
Loading…
Reference in New Issue
Block a user