Critical Link MityCam SoC Firmware  1.0
Critical Link MityCam SoC Firmware
CameraLinkIO.h
Go to the documentation of this file.
1 #ifndef CAMERALINKIO_H
2 #define CAMERALINKIO_H
3 
4 #include "IOChannel.h"
5 #include <libfpga/fpgaregister.h>
6 #include "libfpga/pll_reconfig.h"
7 
8 #include <list>
9 
11 {
12 public:
18  {
20  eeBase = 1,
21  eeMedium = 2,
22  eeFull = 3
23  };
24 
25  typedef struct {
26  unsigned int CCounter[3];
27  unsigned int phaseShift[3];
28  unsigned int mcount, ncount;
29  unsigned int vcodiv, loop_resistance, charge_pump;
31 
33  int32 anCamLinkFPGAControlAddress = 0xFF240000, tcPllReconfig *apReconfig = NULL, const char *apFilename = "pixel_clock_pll_table.txt");
34  virtual ~tcCameraLinkIO();
35 
44 
49  virtual void sendUpdate(tsNewFrameMsg *apMsg);
50 
51  void setSerDebug(bool abOn);
52 
59 
66  tcCameraLinkIO::teOutputMode aeOutputMode);
67 
72  void setTestPattern(bool abEnable);
73 
78  void enableStreaming(bool abEnable);
79 
81 
86  void setPseudoSinglePort(bool abEnable);
87 
93  SocCamera::teNackCode setPixelClock(double anFreqMHz);
94 
99  double getPixelClock();
100 
106  int setBackpressureRows(int rows);
107 
108 protected:
113  void resetCamLink(bool abSet);
114 
120 
121  tcFPGARegister<uint32> mhCLComponent;
122 
123 private:
124  void configureOutput();
125 
126  // This is for backwards compatibility; every effort should be made not to do this since it complicates IO channels.
127  void updateSensor();
128 
129  tcCameraLinkIO::teOutputMode meOutputMode;
130 
131  bool mbOutputConfigured;
132 
133  tcPllReconfig *mpPllReconfig;
134  std::list<double> mcSpeeds;
135  std::list<tsPllReconfigTableEntry> mcReconfigEntries;
136 
137  double mnPixFreq;
138 };
139 
140 #endif // CAMERALINKIO_H
tcCameraLinkIO::sendUpdate
virtual void sendUpdate(tsNewFrameMsg *apMsg)
Definition: CameraLinkIO.cpp:160
tcCameraLinkIO::setOutputMode
virtual SocCamera::teNackCode setOutputMode(tcCameraLinkIO::teOutputMode aeOutputMode)
Definition: CameraLinkIO.cpp:188
tcCameraLinkIO::~tcCameraLinkIO
virtual ~tcCameraLinkIO()
Definition: CameraLinkIO.cpp:113
int32
int32_t int32
Definition: Types.h:8
tcCameraLinkIO::setPixelClock
SocCamera::teNackCode setPixelClock(double anFreqMHz)
Definition: CameraLinkIO.cpp:318
tcCameraLinkIO::setPseudoSinglePort
void setPseudoSinglePort(bool abEnable)
Definition: CameraLinkIO.cpp:309
tcCameraLinkIO::setSerDebug
void setSerDebug(bool abOn)
Definition: CameraLinkIO.cpp:369
tcCameraLinkIO::capture
virtual SocCamera::teNackCode capture(tsCaptureRequest asRequest)
Definition: CameraLinkIO.cpp:132
tcCameraLinkIO::mhCLComponent
tcFPGARegister< uint32 > mhCLComponent
Definition: CameraLinkIO.h:121
tcCameraLinkIO::teOutputMode
teOutputMode
Definition: CameraLinkIO.h:17
tcCameraLinkIO::getOutputMode
teOutputMode getOutputMode()
Definition: CameraLinkIO.cpp:213
SocCamera::teNackCode
teNackCode
Definition: CameraTypes.h:62
tcIOChannel
Camera Output IO channel management class.
Definition: IOChannel.h:34
SocCamera::teBPPMode
teBPPMode
Definition: CameraTypes.h:133
tcCameraLinkIO::numTransferred
uint32 numTransferred()
Definition: CameraLinkIO.cpp:364
tcCameraLinkIO::setBackpressureRows
int setBackpressureRows(int rows)
Definition: CameraLinkIO.cpp:120
tcCameraLinkIO::getPixelClock
double getPixelClock()
Definition: CameraLinkIO.cpp:346
tcCameraLinkIO::tcCameraLinkIO
tcCameraLinkIO(SocCamera::tcSensorBoard *apSensor, int32 anCamLinkFPGAControlAddress=0xFF240000, tcPllReconfig *apReconfig=NULL, const char *apFilename="pixel_clock_pll_table.txt")
Definition: CameraLinkIO.cpp:49
tcCameraLinkIO::eeExpanded
@ eeExpanded
Definition: CameraLinkIO.h:19
tcCameraLinkIO::eeBase
@ eeBase
Definition: CameraLinkIO.h:20
uint32
uint32_t uint32
Definition: Types.h:11
tcCameraLinkIO::tsPllReconfigTableEntry::ncount
unsigned int ncount
Definition: CameraLinkIO.h:28
tcCameraLinkIO
Definition: CameraLinkIO.h:10
tcCameraLinkIO::setTestPattern
void setTestPattern(bool abEnable)
Definition: CameraLinkIO.cpp:291
tsNewFrameMsg
Definition: IOCallback.h:11
SocCamera::tcSensorBoard
Definition: SensorBoard.h:40
tcCameraLinkIO::enableStreaming
void enableStreaming(bool abEnable)
Definition: CameraLinkIO.cpp:300
tcCameraLinkIO::tsPllReconfigTableEntry::vcodiv
unsigned int vcodiv
Definition: CameraLinkIO.h:29
tsCaptureRequest
Definition: IOCallback.h:56
IOChannel.h
tcCameraLinkIO::resetCamLink
void resetCamLink(bool abSet)
Definition: CameraLinkIO.cpp:355
tcCameraLinkIO::eeMedium
@ eeMedium
Definition: CameraLinkIO.h:21
tcCameraLinkIO::tsPllReconfigTableEntry
Definition: CameraLinkIO.h:25
tcCameraLinkIO::setBpp
virtual SocCamera::teNackCode setBpp(SocCamera::teBPPMode aeBppMode)
Definition: CameraLinkIO.cpp:165
tcCameraLinkIO::eeFull
@ eeFull
Definition: CameraLinkIO.h:22