mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
reorder some bao-video operation for a cleaner init sequence
This commit is contained in:
parent
392cd64493
commit
f68cc0ba83
1 changed files with 7 additions and 4 deletions
|
|
@ -180,6 +180,10 @@ pub fn wrapped_main(main_thread_token: MainThreadToken) -> ! {
|
||||||
// but it'll do the job 90% of the time and it's way better than having none at all.
|
// but it'll do the job 90% of the time and it's way better than having none at all.
|
||||||
let is_panic = Arc::new(AtomicBool::new(false));
|
let is_panic = Arc::new(AtomicBool::new(false));
|
||||||
|
|
||||||
|
// ---- boot logo
|
||||||
|
display.blit_screen(&ux_api::bitmaps::baochip128x128::BITMAP);
|
||||||
|
display.redraw();
|
||||||
|
|
||||||
// This is safe because the SPIM is finished with initialization, and the handler is
|
// This is safe because the SPIM is finished with initialization, and the handler is
|
||||||
// Mutex-protected.
|
// Mutex-protected.
|
||||||
#[cfg(feature = "board-baosec")]
|
#[cfg(feature = "board-baosec")]
|
||||||
|
|
@ -191,6 +195,9 @@ pub fn wrapped_main(main_thread_token: MainThreadToken) -> ! {
|
||||||
// ---- camera initialization
|
// ---- camera initialization
|
||||||
#[cfg(not(feature = "hosted-baosec"))]
|
#[cfg(not(feature = "hosted-baosec"))]
|
||||||
{
|
{
|
||||||
|
// wait for other inits to finish so we can do this roughly atomically
|
||||||
|
tt.sleep_ms(1000).ok();
|
||||||
|
|
||||||
// setup camera power
|
// setup camera power
|
||||||
match bao1x_hal::axp2101::Axp2101::new(&mut i2c) {
|
match bao1x_hal::axp2101::Axp2101::new(&mut i2c) {
|
||||||
Ok(mut pmic) => {
|
Ok(mut pmic) => {
|
||||||
|
|
@ -298,10 +305,6 @@ pub fn wrapped_main(main_thread_token: MainThreadToken) -> ! {
|
||||||
irq_csr.wfo(utra::irqarray8::EV_ENABLE_CAM_RX, 1);
|
irq_csr.wfo(utra::irqarray8::EV_ENABLE_CAM_RX, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---- boot logo
|
|
||||||
display.blit_screen(&ux_api::bitmaps::baochip128x128::BITMAP);
|
|
||||||
display.redraw();
|
|
||||||
|
|
||||||
// ---- main loop variables
|
// ---- main loop variables
|
||||||
let screen_clip = Rectangle::new(Point::new(0, 0), display.screen_size());
|
let screen_clip = Rectangle::new(Point::new(0, 0), display.screen_size());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue