Struct Config
pub struct Config {
pub input_pin: TlmmPin,
pub input_pull_selection: PullSelection,
pub output_pin: TlmmPin,
pub sleep_level: Level,
}Expand description
Configuration for the LPM kernel module.
Fields§
§input_pin: TlmmPinThe pin to use as the wake-up interrupt source.
Corresponds to the wakeup_in parameter.
input_pull_selection: PullSelectionThe pull selection of the input pin.
output_pin: TlmmPinThe pin that the kernel module sets to
sleep_level when the system suspends.
Corresponds to the wakeup_out parameter.
sleep_level: LevelThe physical level of the output pin on suspend.
The kernel module doesn’t change the pin on resume. The pin stays at this level until you set it again.
Corresponds to the wakeup_out_edge parameter.
Implementations§
§impl Config
impl Config
const fn wakeup_out_edge(self) -> u8
Available on Android or Linux only.
const fn wakeup_out_edge(self) -> u8
Returns the wakeup_out_edge value that makes the kernel module set
sleep_level on suspend.
fn module_params(self) -> String
Available on Android or Linux only.
fn module_params(self) -> String
Returns the parameter string for the kernel module.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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