#[repr(C)]pub struct device_state {
pub init_res: u8,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1]>,
}
Expand description
@brief Runtime device dynamic structure (in RAM) per driver instance
Fields in this are expected to be default-initialized to zero. The kernel driver infrastructure and driver access functions are responsible for ensuring that any non-zero initialization is done before they are accessed.
Fields§
§init_res: u8
Device initialization return code (positive errno value).
Device initialization functions return a negative errno code if they fail. In Zephyr, errno values do not exceed 255, so we can store the positive result value in a uint8_t type.
_bitfield_align_1: [u8; 0]
§_bitfield_1: __BindgenBitfieldUnit<[u8; 1]>
Implementations§
source§impl device_state
impl device_state
pub fn initialized(&self) -> bool
pub fn set_initialized(&mut self, val: bool)
pub fn new_bitfield_1(initialized: bool) -> __BindgenBitfieldUnit<[u8; 1]>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for device_state
impl RefUnwindSafe for device_state
impl Send for device_state
impl Sync for device_state
impl Unpin for device_state
impl UnwindSafe for device_state
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