platform: remove Peripherals param from board trait
This commit is contained in:
16
src/main.rs
16
src/main.rs
@@ -9,26 +9,14 @@ mod animations;
|
||||
mod mappings;
|
||||
mod buffers;
|
||||
|
||||
use esp_idf_svc::hal::prelude::Peripherals;
|
||||
|
||||
use crate::platform::Board;
|
||||
use crate::platform::{DefaultBoard, Board};
|
||||
use crate::task::{Task, Scheduler};
|
||||
use crate::render::{Surfaces, Renderer};
|
||||
use crate::geometry::Rectangle;
|
||||
|
||||
use crate::platform::esp32::Esp32Board as BoardType;
|
||||
|
||||
fn main() {
|
||||
// It is necessary to call this function once. Otherwise some patches to the runtime
|
||||
// implemented by esp-idf-sys might not link properly. See https://github.com/esp-rs/esp-idf-template/issues/71
|
||||
esp_idf_svc::sys::link_patches();
|
||||
let mut board: DefaultBoard = Board::take();
|
||||
|
||||
// Bind the log crate to the ESP Logging facilities
|
||||
esp_idf_svc::log::EspLogger::initialize_default();
|
||||
|
||||
let peripherals = Peripherals::take().unwrap();
|
||||
let mut board: BoardType = Board::new(peripherals);
|
||||
|
||||
log::info!("Board: {}", core::any::type_name_of_val(&board));
|
||||
|
||||
let output = board.output();
|
||||
|
Reference in New Issue
Block a user