platform: move platform lib bits into platform module

This commit is contained in:
Victoria Fischer 2024-10-30 20:54:49 +01:00
parent 1668db2c85
commit 84b5abce09
5 changed files with 11 additions and 9 deletions

View File

@ -8,3 +8,5 @@
[ ] Weather
[ ] Circadian Rhythm
[ ] NTP
[ ] Config to only start a subset of tasks on startup
[ ] Serial CLI

View File

@ -18,23 +18,17 @@ use crate::task::Task;
use crate::platform::DisplayInit;
use crate::lib8::IntoRgb8;
#[cfg(feature="embedded-graphics")]
mod embedded_graphics_lib;
#[cfg(feature="rmt")]
#[cfg(feature="embedded-graphics")]
use ws2812_esp32_rmt_driver::lib_embedded_graphics::PonderjarTarget;
#[cfg(feature="smart-leds")]
mod smart_leds_lib;
#[cfg(feature="rmt")]
#[cfg(feature="smart-leds")]
use ws2812_esp32_rmt_driver::lib_smart_leds::Ws2812Esp32Rmt;
#[cfg(feature="spi")]
#[cfg(feature="smart-leds")]
use crate::smart_leds_lib::spi::SPIDisplay;
use crate::platform::smart_leds_lib::spi::SPIDisplay;
#[cfg(feature="threads")]
use crate::render::SharedSurface;

View File

@ -1,3 +1,9 @@
#[cfg(feature="embedded-graphics")]
pub mod embedded_graphics_lib;
#[cfg(feature="smart-leds")]
pub mod smart_leds_lib;
use crate::render::{Surface, Display};
use crate::task::Task;

View File

@ -95,7 +95,7 @@ pub mod rmt {
use crate::render::{Display, Surface};
use crate::task::Task;
use crate::smart_leds_lib::SmartLedDisplay;
use crate::platform::smart_leds_lib::SmartLedDisplay;
use crate::platform::DisplayInit;
impl DisplayInit for Ws2812Esp32Rmt<'_> {
@ -121,7 +121,7 @@ pub mod spi {
use crate::render::{Display, Surface};
use crate::task::Task;
use crate::smart_leds_lib::SmartLedDisplay;
use crate::platform::smart_leds_lib::SmartLedDisplay;
use esp_idf_svc::hal::{
prelude::*,