#include <LatticeMIPI.h>
The tcLatticeMIPI class provides a basic interface to the MIPI Deserializer bitstreams loaded on the Lattice parts for the HWK1411 FPGA (and potentially others)
◆ tcLatticeMIPI()
tcLatticeMIPI::tcLatticeMIPI |
( |
void |
| ) |
|
◆ ~tcLatticeMIPI()
tcLatticeMIPI::~tcLatticeMIPI |
( |
void |
| ) |
|
|
virtual |
◆ GetNumLanes()
int tcLatticeMIPI::GetNumLanes |
( |
uint8_t & |
anNumLanes | ) |
|
Fetch the number of lanes the bitstream supports.
- Parameters
-
[out] | anNumLanes | the supported number of lanes |
- Returns
- non-zero on error
◆ GetVersion()
int tcLatticeMIPI::GetVersion |
( |
uint8_t & |
anVersion | ) |
|
Get the version of the MIPI bitstream
- Parameters
-
[out] | anVersion | the version number |
- Returns
- non-zero on error
◆ Initialize()
int tcLatticeMIPI::Initialize |
( |
std::string |
arSpiDevPath, |
|
|
std::string |
CSName |
|
) |
| |
Initialize the MIPI SPI interface. open the SPIDEV device and the gpio for the chip select.
- Parameters
-
arSpiDevPath | full path to the spidev device to use |
CSName | name of the chip select pin in /sys/kernel/debug/gpio listing |
- Returns
- non-zero on error.
◆ IsAlive()
bool tcLatticeMIPI::IsAlive |
( |
void |
| ) |
|
- Returns
- true if the device is communicating properly.
◆ ReadRegister()
int tcLatticeMIPI::ReadRegister |
( |
uint8_t |
offset, |
|
|
uint8_t & |
value |
|
) |
| |
Threadsafe register read routine.
- Parameters
-
| offset | the register offset |
[out] | offset | the value read |
- Returns
- non-zero on error
◆ ReleaseSPI()
int tcLatticeMIPI::ReleaseSPI |
( |
void |
| ) |
|
Release the SPI device. This can be used if the device needs to be temporarily controlled by another piece of software, etc.
- Returns
- non-zero on error
◆ ReopenSPI()
int tcLatticeMIPI::ReopenSPI |
( |
void |
| ) |
|
Reattach the SPI device. This can be used after a call to ReleaseSPI
- Returns
- non-zero on error
◆ reset()
int tcLatticeMIPI::reset |
( |
void |
| ) |
|
Reset the Lattice MIPI bitstream
- Returns
- non-zero on error.
◆ WriteRegister()
int tcLatticeMIPI::WriteRegister |
( |
uint8_t |
offset, |
|
|
uint8_t |
value |
|
) |
| |
Threadsafe register write routine.
- Parameters
-
offset | the register offset |
value | the value to write |
- Returns
- non-zero on error
◆ mbNOIO
bool tcLatticeMIPI::mbNOIO |
|
protected |
◆ mcSpiDevMutex
tcMutex tcLatticeMIPI::mcSpiDevMutex |
|
mutableprotected |
thread safe lock for SPI access
◆ mpCS
MityDSP::tcGpioSingle* tcLatticeMIPI::mpCS |
|
protected |
Sensor Board Specific GPIOs for control.
◆ mpSPIDevice
tcSPIDevice* tcLatticeMIPI::mpSPIDevice |
|
protected |
◆ msSPIConfiguration
tsSPIConfiguration tcLatticeMIPI::msSPIConfiguration |
|
protected |
The documentation for this class was generated from the following files: