Struct Reading
pub struct Reading {
pub physical: i64,
pub raw: i32,
}Expand description
A reading of an ADC channel.
See: struct qpnp_vadc_result in linux/qpnp/qpnp-adc.h.
Fields§
§physical: i64The value of the channel, such as a voltage, current or temperature.
- Voltages are in µV.
- Battery temperatures are in 0.1 °C.
- PA Therm temperatures are in °C.
- PMIC Die temperatures are in 0.001 °C.
raw: i32The pre-calibrated digital output of the ADC relative to the ADC reference.
The kernel prints this signed value as unsigned hex, so ffffffff is
-1.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Reading
impl RefUnwindSafe for Reading
impl Send for Reading
impl Sync for Reading
impl Unpin for Reading
impl UnsafeUnpin for Reading
impl UnwindSafe for Reading
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