pub struct DeviceImpl<'a> { /* private fields */ }Implementations§
Source§impl<'a> DeviceImpl<'a>
impl<'a> DeviceImpl<'a>
pub fn new(config: DeviceConfig) -> Self
Sourcepub fn update_input(&mut self, input: InputState)
pub fn update_input(&mut self, input: InputState)
Called by the GUI to set input from UI and keyboard.
pub fn alloc_psram(&self, size: usize) -> Vec<u8> ⓘ
Trait Implementations§
Source§impl<'a> Device for DeviceImpl<'a>
impl<'a> Device for DeviceImpl<'a>
type Network = NetworkImpl<'a>
type Serial = SerialImpl
type Dir = DirImpl
Source§fn read_input(&mut self) -> Option<InputState>
fn read_input(&mut self) -> Option<InputState>
Read gamepad input.
Source§fn log_debug<D: Display>(&self, src: &str, msg: D)
fn log_debug<D: Display>(&self, src: &str, msg: D)
Log a debug message into console. Read more
fn open_dir(&mut self, path: &[&str]) -> Result<Self::Dir, FSError>
Source§fn has_headphones(&mut self) -> bool
fn has_headphones(&mut self) -> bool
Returns true if headphones are connected.
Source§fn get_audio_buffer(&mut self) -> &mut [i16]
fn get_audio_buffer(&mut self) -> &mut [i16]
Get a writable slice of free audio buffer region.
fn get_battery_status(&mut self) -> Option<BatteryStatus>
fn network(&mut self) -> Self::Network
Auto Trait Implementations§
impl<'a> Freeze for DeviceImpl<'a>
impl<'a> !RefUnwindSafe for DeviceImpl<'a>
impl<'a> Send for DeviceImpl<'a>
impl<'a> !Sync for DeviceImpl<'a>
impl<'a> Unpin for DeviceImpl<'a>
impl<'a> !UnwindSafe for DeviceImpl<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more