add non-blocking version of screen brightness dimming

this is useful for dimming "animations" where it's not
critical if a dimming step is missed and you're spamming
the graphics server with dim requests
This commit is contained in:
bunnie 2026-05-05 23:54:06 +08:00
parent d46fa5a153
commit 4d505f188d

View file

@ -824,6 +824,15 @@ impl Gfx {
.map(|_| ())
}
#[cfg(feature = "board-baosec")]
pub fn brightness_nonblocking(&self, level: u8) {
xous::try_send_message(
self.conn,
Message::new_scalar(GfxOpcode::Brightness.to_usize().unwrap(), level as usize, 0, 0, 0),
)
.ok();
}
#[cfg(feature = "board-baosec")]
pub fn flip_screen(&self, flip: bool) -> Result<(), xous::Error> {
send_message(