beginning of refactoring

This commit is contained in:
J / Jacob Babich
2022-04-14 18:41:42 -04:00
parent f63bfee140
commit 87cd68d12b
9 changed files with 504 additions and 557 deletions

16
src/lib/board.rs Normal file
View File

@@ -0,0 +1,16 @@
use crate::gpio::ports::{Port, PortOptions, UsablePort, setup_gpio_port};
pub struct UsableBoard;
impl UsableBoard {
pub fn setup_gpio_port(&self, port: Port, options: PortOptions) -> UsablePort {
setup_gpio_port(port, options)
}
// TODO: check page 704 for timers
// TODO: impl Drop trait so that tasks all run before the main function ends?
// TODO: examine page 670 for when (if) I do interrupts
}
pub fn setup_board() -> UsableBoard {
UsableBoard
}