organize code
This commit is contained in:
parent
6af011db67
commit
d64a6b8bb5
@ -8,5 +8,6 @@ pub fn step_hub_home(hub: &mut PrometeuHub, os: &mut PrometeuOS, hw: &mut dyn Ha
|
|||||||
hw.gfx_mut().clear(Color::INDIGO);
|
hw.gfx_mut().clear(Color::INDIGO);
|
||||||
hub.gui_update(os);
|
hub.gui_update(os);
|
||||||
hw.gfx_mut().present();
|
hw.gfx_mut().present();
|
||||||
|
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
@ -5,5 +5,6 @@ use crate::prometeu_os::PrometeuOS;
|
|||||||
|
|
||||||
pub fn step_init_app(os: &mut PrometeuOS, _signals: &InputSignals, _hw: &mut dyn HardwareBridge, cartridge: &Cartridge) -> Option<FirmwareState> {
|
pub fn step_init_app(os: &mut PrometeuOS, _signals: &InputSignals, _hw: &mut dyn HardwareBridge, cartridge: &Cartridge) -> Option<FirmwareState> {
|
||||||
os.initialize_vm(cartridge);
|
os.initialize_vm(cartridge);
|
||||||
|
|
||||||
Some(FirmwareState::AppRunning)
|
Some(FirmwareState::AppRunning)
|
||||||
}
|
}
|
||||||
@ -2,7 +2,8 @@ use crate::firmware::firmware_state::FirmwareState;
|
|||||||
use crate::prometeu_hub::PrometeuHub;
|
use crate::prometeu_hub::PrometeuHub;
|
||||||
use crate::prometeu_os::PrometeuOS;
|
use crate::prometeu_os::PrometeuOS;
|
||||||
|
|
||||||
pub fn launch_hub(os: &mut PrometeuOS, hub: &mut PrometeuHub) -> Option<FirmwareState> {
|
pub fn launch_hub(_os: &mut PrometeuOS, hub: &mut PrometeuHub) -> Option<FirmwareState> {
|
||||||
hub.init();
|
hub.init();
|
||||||
|
|
||||||
Some(FirmwareState::HubHome)
|
Some(FirmwareState::HubHome)
|
||||||
}
|
}
|
||||||
@ -3,5 +3,6 @@ use crate::prometeu_os::PrometeuOS;
|
|||||||
|
|
||||||
pub fn step_reset(os: &mut PrometeuOS) -> Option<FirmwareState> {
|
pub fn step_reset(os: &mut PrometeuOS) -> Option<FirmwareState> {
|
||||||
os.reset();
|
os.reset();
|
||||||
|
|
||||||
Some(FirmwareState::SplashScreen)
|
Some(FirmwareState::SplashScreen)
|
||||||
}
|
}
|
||||||
@ -1,5 +1,7 @@
|
|||||||
use crate::firmware::firmware_state::FirmwareState;
|
use crate::firmware::firmware_state::FirmwareState;
|
||||||
|
|
||||||
pub fn step_splash_screen() -> Option<FirmwareState> {
|
pub fn step_splash_screen() -> Option<FirmwareState> {
|
||||||
|
|
||||||
|
|
||||||
Some(FirmwareState::LaunchHub)
|
Some(FirmwareState::LaunchHub)
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user