Critical Link MityCam SoC Firmware  1.0
Critical Link MityCam SoC Firmware
ColumnAdjuster.h
Go to the documentation of this file.
1 /*
2  * ColumnAdjuster.h
3  *
4  * Created on: Nov 18, 2014
5  * Author: mitycam
6  */
7 
8 #ifndef COLUMNADJUSTER_H_
9 #define COLUMNADJUSTER_H_
10 
11 #include <libfpga/fpgaregister.h>
12 #include "Types.h"
13 
18 public:
22  tcColumnAdjuster(uint32 anAddress, uint32 anBiasAddr,
23  uint32 anGainAddr, uint32 anDepth, uint32 anOffset = 0);
24 
25  virtual ~tcColumnAdjuster();
26 
31  bool initialized();
32 
38  int32 reset(bool abOn);
39 
46  int32 setBias(const char *apFilename);
47 
57  int32 setBias(int16 *apBias, int32 anLength);
58 
65  int32 setMultiplier(const char *apFilename);
66 
76  int32 setMultiplier(uint16 *apMultiplier, int32 anLength);
77 
78 private:
79  int32 setRange(uint16 *apArray, int32 anLength, tcFPGARegister<uint32> &reg);
80 
81  uint16* readFile(const char *apFilename, int32 &arLength);
82 
83  tcFPGARegister<uint32> mcRegisters;
84  tcFPGARegister<uint32> mcBias;
85  tcFPGARegister<uint32> mcGain;
86 
87  uint32 mnOffset;
88 };
89 
90 #endif /* COLUMNADJUSTER_H_ */
tcColumnAdjuster::tcColumnAdjuster
tcColumnAdjuster(uint32 anAddress, uint32 anBiasAddr, uint32 anGainAddr, uint32 anDepth, uint32 anOffset=0)
tcColumnAdjuster::tcColumnAdjuster
Definition: ColumnAdjuster.cpp:29
int32
int32_t int32
Definition: Types.h:8
Types.h
tcColumnAdjuster
The tcColumnAdjuster class interfaces to the FPGA column_cal core.
Definition: ColumnAdjuster.h:17
tcColumnAdjuster::setMultiplier
int32 setMultiplier(const char *apFilename)
tcColumnAdjuster::setMultiplier
Definition: ColumnAdjuster.cpp:110
int16
int16_t int16
Definition: Types.h:7
tcColumnAdjuster::reset
int32 reset(bool abOn)
tcColumnAdjuster::reset
Definition: ColumnAdjuster.cpp:59
tcColumnAdjuster::setBias
int32 setBias(const char *apFilename)
tcColumnAdjuster::setBias
Definition: ColumnAdjuster.cpp:77
tcColumnAdjuster::~tcColumnAdjuster
virtual ~tcColumnAdjuster()
tcColumnAdjuster::~tcColumnAdjuster
Definition: ColumnAdjuster.cpp:41
uint32
uint32_t uint32
Definition: Types.h:11
uint16
uint16_t uint16
Definition: Types.h:10
tcColumnAdjuster::initialized
bool initialized()
tcColumnAdjuster::initialized
Definition: ColumnAdjuster.cpp:49