SFBPower.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00030 #ifndef SFBPOWER_H
00031 #define SFBPOWER_H
00032
00033 #include "SFBTypes.h"
00034 #include "SFBConstants.h"
00035
00036 extern void initADC();
00037
00038 extern int powerDraw();
00039
00040 extern int powerDraw(u32 face);
00041
00042 extern int rawPower(u32 face);
00043
00044 extern int railVoltage();
00045
00046 extern int rawVoltage();
00047
00048 extern void powerOut(u32 face, int on);
00053 extern void powerIn(u32 face, int on);
00054
00055
00056 extern void initPowerOuts();
00057
00058 #define RAIL_SAMPLE_INDEX (FACE_COUNT)
00059 #define ADC_SAMPLE_COUNT (RAIL_SAMPLE_INDEX+1)
00060
00061 #if ADC_SAMPLE_COUNT > 8
00062 #error ADC_SAMPLE_COUNT too large
00063 #endif
00064
00065 extern uv32 adcSamples[ADC_SAMPLE_COUNT];
00066
00067 extern uv16 adcSmooth[ADC_SAMPLE_COUNT];
00068
00069 extern uv16 adcSmoother[ADC_SAMPLE_COUNT];
00070
00071 #endif