pub struct SelfTest(/* private fields */);
Expand description
Control and status flags for a function’s self test capability, if present.
Implementations§
Source§impl SelfTest
impl SelfTest
Sourcepub fn start(&self) -> bool
pub fn start(&self) -> bool
Setting this bit triggers the device to start its self test. Once the test is finished (successful or not), this is reset by the device.
Sourcepub fn completion_code(&self) -> u8
pub fn completion_code(&self) -> u8
If a self-test is complete, then any non-zero value in this field indicates that the test failed.
Sourcepub fn set_capable(&mut self, value: bool)
pub fn set_capable(&mut self, value: bool)
Indicates whether the function has a self-test capability.
Sourcepub fn with_capable(&mut self, value: bool) -> Self
pub fn with_capable(&mut self, value: bool) -> Self
Indicates whether the function has a self-test capability.
Sourcepub fn set_start(&mut self, value: bool)
pub fn set_start(&mut self, value: bool)
Setting this bit triggers the device to start its self test. Once the test is finished (successful or not), this is reset by the device.
Sourcepub fn with_start(&mut self, value: bool) -> Self
pub fn with_start(&mut self, value: bool) -> Self
Setting this bit triggers the device to start its self test. Once the test is finished (successful or not), this is reset by the device.
Sourcepub fn set_completion_code(&mut self, value: u8)
pub fn set_completion_code(&mut self, value: u8)
If a self-test is complete, then any non-zero value in this field indicates that the test failed.
Sourcepub fn with_completion_code(&self, value: u8) -> Self
pub fn with_completion_code(&self, value: u8) -> Self
If a self-test is complete, then any non-zero value in this field indicates that the test failed.