mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
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:
parent
d46fa5a153
commit
4d505f188d
1 changed files with 9 additions and 0 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in a new issue