Critical Link MityCam SoC Firmware  1.0
Critical Link MityCam SoC Firmware
LatticeMIPI.h
Go to the documentation of this file.
1 
9 #ifndef LATTICEMIPI_H
10 #define LATTICEMIPI_H
11 
12 #include "libdaq/spidevice.h"
13 #include "libdaq/gpiosingle.h"
14 #include "Mutex.h"
15 
21 {
22 public:
23  tcLatticeMIPI(void);
24  virtual ~tcLatticeMIPI(void);
25 
26  int Initialize(std::string arSpiDevPath, std::string CSName);
27 
28  int ReleaseSPI(void);
29  int ReopenSPI(void);
30 
31  bool IsAlive(void);
32  int GetVersion(uint8_t& anVersion);
33  int GetNumLanes(uint8_t& anNumLanes);
34 
35  int ReadRegister(uint8_t offset, uint8_t& value);
36  int WriteRegister(uint8_t offset, uint8_t value);
37 
38  int reset(void);
39 
40 protected:
42  tcSPIDevice* mpSPIDevice;
43  tsSPIConfiguration msSPIConfiguration;
44  bool mbNOIO;
45  MityDSP::tcGpioSingle* mpCS;
46 
47 };
48 
49 #endif
tcLatticeMIPI::ReleaseSPI
int ReleaseSPI(void)
Definition: LatticeMIPI.cpp:129
tcLatticeMIPI::mpCS
MityDSP::tcGpioSingle * mpCS
Sensor Board Specific GPIOs for control.
Definition: LatticeMIPI.h:45
tcLatticeMIPI::reset
int reset(void)
Definition: LatticeMIPI.cpp:71
tcLatticeMIPI::mbNOIO
bool mbNOIO
Definition: LatticeMIPI.h:44
tcLatticeMIPI::mpSPIDevice
tcSPIDevice * mpSPIDevice
Definition: LatticeMIPI.h:42
tcLatticeMIPI::tcLatticeMIPI
tcLatticeMIPI(void)
Definition: LatticeMIPI.cpp:30
tcLatticeMIPI::msSPIConfiguration
tsSPIConfiguration msSPIConfiguration
Definition: LatticeMIPI.h:43
tcLatticeMIPI::ReadRegister
int ReadRegister(uint8_t offset, uint8_t &value)
Definition: LatticeMIPI.cpp:181
tcLatticeMIPI::mcSpiDevMutex
tcMutex mcSpiDevMutex
thread safe lock for SPI access
Definition: LatticeMIPI.h:41
tcLatticeMIPI::WriteRegister
int WriteRegister(uint8_t offset, uint8_t value)
Definition: LatticeMIPI.cpp:206
Mutex.h
tcLatticeMIPI::IsAlive
bool IsAlive(void)
Definition: LatticeMIPI.cpp:153
tcLatticeMIPI::~tcLatticeMIPI
virtual ~tcLatticeMIPI(void)
Definition: LatticeMIPI.cpp:114
tcLatticeMIPI
Definition: LatticeMIPI.h:20
tcLatticeMIPI::ReopenSPI
int ReopenSPI(void)
Definition: LatticeMIPI.cpp:141
tcLatticeMIPI::GetNumLanes
int GetNumLanes(uint8_t &anNumLanes)
Definition: LatticeMIPI.cpp:229
tcMutex
Definition: Mutex.h:11
tcLatticeMIPI::Initialize
int Initialize(std::string arSpiDevPath, std::string CSName)
Definition: LatticeMIPI.cpp:43
tcLatticeMIPI::GetVersion
int GetVersion(uint8_t &anVersion)
Definition: LatticeMIPI.cpp:170