fw-rust: Move PWM handling into screen module
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Move the handling of the PWM signal which generates the dimmable backlight signal into the screen module.
This commit is contained in:
parent
fdd1f4636d
commit
134db298f6
2 changed files with 44 additions and 18 deletions
|
@ -58,9 +58,6 @@ impl ClockGenerator {
|
|||
let dp = Peripherals::take().unwrap();
|
||||
let pins = pins!(dp);
|
||||
|
||||
// Set display PWM backlight pin as output
|
||||
pins.pd5.into_output();
|
||||
|
||||
// Init SPI
|
||||
let (spi, _) = Spi::new(
|
||||
dp.SPI,
|
||||
|
@ -79,7 +76,13 @@ impl ClockGenerator {
|
|||
);
|
||||
|
||||
Self {
|
||||
screen: Screen::new(dp.TC0, spi, pins.pb0.into_output(), pins.pb1.into_output()),
|
||||
screen: Screen::new(
|
||||
dp.TC0,
|
||||
spi,
|
||||
pins.pd5.into_output(),
|
||||
pins.pb0.into_output(),
|
||||
pins.pb1.into_output(),
|
||||
),
|
||||
tc1: dp.TC1,
|
||||
exint: dp.EXINT,
|
||||
delay: Delay::<MHz8>::new(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue