This interface can be used in C and C++ Applications. Include this header file in your source code and link against libhapregs. A shared version of this lib (libhapregs.so) is installed on every camera.
#include <stdint.h>
Go to the source code of this file.
Functions | |
int | CloseReg32 (void *board) |
Close the FPGA register interface (optional). | |
void * | OpenReg32 (void) |
Open the FPGA register interface (optional). | |
int | ReadReg32 (void *board, unsigned long address, uint32_t *value) |
Read a 32bit register from an FPGA design. | |
int | WriteReg32 (void *board, unsigned long address, uint32_t value) |
Write a 32bit value to an FPGA design register. |
int CloseReg32 | ( | void * | board | ) |
Close the FPGA register interface (optional).
This is an optional function that may be called to close the internally used file descriptor to the regsiter driver. (which is accessed through /dev/fpgapi0). This may be useful when the user want's to have control over register access from concurrently running applications. By default Linux closes the opened file descpriptor when the application process terminates.
board | Specifies the corresponding interface which should be closed. Currently this parameter can be specified as zero because this parameter is reserved for future use. |
void* OpenReg32 | ( | void | ) |
Open the FPGA register interface (optional).
This is an optional function that may be called to control the point of time where this interface should open the register driver (which is accessed through /dev/fpgapi0). This may be useful when the user want's to have control over register access from concurrently running applications. By default the first call to ReadReg32() or WriteReg32() tries to open the driver interface automatically. This function returns a handle to the corresponding register interface (known as board handle). This handle is currently ignored and reserved for future use on hardware platforms with several FPGA design APIs.
int ReadReg32 | ( | void * | board, | |
unsigned long | address, | |||
uint32_t * | value | |||
) |
Read a 32bit register from an FPGA design.
board | Specifies the corresponding register interface handle. Currently this parameter can be specified as zero because it is reserved for future use. | |
address | specifies the register address in the FPGA design's register address space (starting at 0) | |
value | pointer to 32bit variable to hold the result |
int WriteReg32 | ( | void * | board, | |
unsigned long | address, | |||
uint32_t | value | |||
) |
Write a 32bit value to an FPGA design register.
board | Specifies the corresponding register interface handle. Currently this parameter can be specified as zero because it is reserved for future use. | |
address | specifies the register address in the FPGA design's register address space (starting at 0) | |
value | 32bit value to be written to the register |