#include "SFBTypes.h"
#include "SFBConstants.h"
#include "SFBAssert.h"
Go to the source code of this file.
Functions | |
int | powerDraw () |
int | powerDraw (u32 face) |
int | rawPower (u32 face) |
s32 | faceVoltage (u32 face, bool smoothed=true) |
What is the current voltage measurement on face? Returns a backwards-averaged value if smoothed is true or absent; returns the latest available sample if smoothed is present and false . | |
s32 | railVoltage (bool smoothed=true) |
Access current main (VEE) rail voltage. | |
int | rawVoltage () |
void | powerOut (u32 face, int on) |
Turn on (on != 0) or off (on == 0) the outbound power on face. | |
bool | isPowerOut (u32 face) |
True if output power is active to face, false otherwise. | |
void | powerIn (u32 face, int on) |
Control inbound power -- NOTE THIS CODE IS UNTESTED! | |
void | initPowerOuts () |
What is the current voltage measurement on face? Returns a backwards-averaged value if smoothed is true
or absent; returns the latest available sample if smoothed is present and false
.
Note that the calculated voltages are based on the datasheet properties of the ADC and the nominal values of the (1%) scaling resistors on the board, so the resulting values can differ substantially from the true voltage and from one board to another, but should be relatively consistent internally.
bool isPowerOut | ( | u32 | face | ) |
True if output power is active to face, false otherwise.
void powerOut | ( | u32 | face, | |
int | on | |||
) |
Turn on (on != 0) or off (on == 0) the outbound power on face.
s32 railVoltage | ( | bool | smoothed = true |
) |
Access current main (VEE) rail voltage.
Returns a backwards-averaged value if smoothed is true
or absent; returns the latest available sample if smoothed is present and false
.
Be aware that, unless the hardware has been calibrated, the calculated voltages are based on the datasheet properties of the ADC and the nominal values of the (1%) scaling resistors on the board, so the resulting values can differ significantly from the true voltage and from face to face and from board to board, but should be relatively consistent on a given face.