Skip to main content

power_register

Function power_register 

Source
pub fn power_register(microwatts: u32, current_lsb_microamps: u32) -> u16
Expand description

Builds the power register a monitor reports for a power.

The inverse of power_microwatts; the power LSB is fixed by the datasheet at twenty times the current LSB.

§Arguments

  • microwatts - the power in microwatts.
  • current_lsb_microamps - the current LSB the calibration register was set for.

§Returns

The power register, or zero if current_lsb_microamps is zero.