hapregs.h File Reference


Detailed Description

VisualApplets FPGA Register Library Interface.
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.
Author:
Thomas Berndorfer
Date:
2008/01/10

Go to the source code of this file.

Functions

int CloseReg32 (void)
 Optional: Close the VisualApplets register interface.
int OpenReg32 (void)
 Optional: Open the VisualApplets register interface.
int ReadReg32 (unsigned long address, unsigned long *value)
 Read a 32bit register from a VisualApplet FPGA design.
int WriteReg32 (unsigned long address, unsigned long value)
 Write a 32bit value to a VisualApplet FPGA design register.


Function Documentation

int CloseReg32 ( void   ) 

Optional: Close the VisualApplets register interface.

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/fpgapi). 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.

Returns:
0 ... on success
<0 ... on error

int OpenReg32 ( void   ) 

Optional: Open the VisualApplets register interface.

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/fpgapi). 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.

Returns:
0 ... on success
<0 ... on error

int ReadReg32 ( unsigned long  address,
unsigned long *  value 
)

Read a 32bit register from a VisualApplet FPGA design.

Parameters:
address specifies the register address in the VisualApplets register address space (starting at 0)
value pointer to 32bit variable to hold the result
Returns:
0 ... on success
<0 ... on error

int WriteReg32 ( unsigned long  address,
unsigned long  value 
)

Write a 32bit value to a VisualApplet FPGA design register.

Parameters:
address specifies the register address in the VisualApplets register address space (starting at 0)
value 32bit value to be written to the register
Returns:
0 ... on success
<0 ... on error


Generated on Wed Apr 2 15:57:03 2008 for Festo Camera API by  doxygen 1.5.3