task: move Scheduler into a trait, define static-sized scheduler implementation, expose as a system task runner in platform
This commit is contained in:
@@ -9,14 +9,15 @@ pub mod esp32;
|
||||
pub type DefaultBoard = esp32::Esp32Board;
|
||||
|
||||
use crate::render::{Output, Surfaces};
|
||||
use crate::task::Task;
|
||||
use crate::task::Scheduler;
|
||||
|
||||
pub trait Board {
|
||||
type Output: Output;
|
||||
type Surfaces: Surfaces;
|
||||
type Scheduler: Scheduler;
|
||||
|
||||
fn take() -> Self;
|
||||
fn output(&mut self) -> Self::Output;
|
||||
fn surfaces(&mut self) -> Self::Surfaces;
|
||||
fn system_tasks(&mut self) -> Vec<Box<dyn Task>>;
|
||||
fn system_tasks(&mut self) -> Self::Scheduler;
|
||||
}
|
Reference in New Issue
Block a user