Skip to main content

bus_millivolts

Function bus_millivolts 

Source
pub fn bus_millivolts(raw: u16) -> u32
Expand description

Decodes the bus voltage register to millivolts.

The voltage occupies bits 15:3, so the register is shifted right by three before scaling by the 4 mV LSB; the low bits are the conversion-ready and overflow flags.

§Arguments

  • raw - the bus voltage register.

§Returns

The bus voltage in millivolts.