#include <stdio.h>#include <stdlib.h>#include <fcntl.h>#include <string.h>#include <errno.h>#include <sys/ioctl.h>#include <ngc/core/ngcbDrv.h>Macros | |
| #define | _GNU_SOURCE |
| #define | _REENTRANT |
Functions | |
| int | ngcbComOpen (const char *devName, char *erms) |
| int | ngcbComClose (int fd) |
| int | ngcbComGetRev (int fd) |
| int | ngcbComRstDev (int fd) |
| int | ngcbComReset (int fd) |
| int | ngcbComUpLink (int fd, int routeThrough, int rst) |
| int | ngcbComTimeout (int fd, int seconds) |
| int | ngcbComRead (int fd, char *buffer, int size, char *erms) |
| int | ngcbComWrite (int fd, const char *buffer, int size, char *erms) |
| int | ngcbComReadStatus (int fd) |
| int | ngcbComErrStatus (void) |
| void | ngcbComErrStr (int status, char *s) |
| void | ngcbComStatStr (int status, char *s) |
| #define _GNU_SOURCE |
| #define _REENTRANT |
| int ngcbComClose | ( | int | fd | ) |
Close the connection to the front-end.
| int ngcbComErrStatus | ( | void | ) |
Return the saved status value of the last faulty I/O. The saved value is reset to zero on each device open/close.
| void ngcbComErrStr | ( | int | status, |
| char * | s ) |
Convert status to an error string
| int ngcbComGetRev | ( | int | fd | ) |
Return the device driver and hardware revsion. The value is a 32-bit integer scalar containing the driver revision in the lower 16 bits and the hardware revision in the upper 16 bits. Both numbers are virtual and reflect only major changes which are relevant for the application SW.
| int ngcbComOpen | ( | const char * | name, |
| char * | erms ) |
Open connection to the front-end.
| int ngcbComRead | ( | int | fd, |
| char * | buffer, | ||
| int | size, | ||
| char * | erms ) |
Read a number of bytes from the device.
| int ngcbComReadStatus | ( | int | fd | ) |
Return the actual value of the communication status register
| int ngcbComReset | ( | int | fd | ) |
Performs a reset of the subsystem.
| int ngcbComRstDev | ( | int | fd | ) |
Performs an interface device reset.
| void ngcbComStatStr | ( | int | status, |
| char * | s ) |
Convert status to a string
| int ngcbComTimeout | ( | int | fd, |
| int | seconds ) |
Sets the timeout for read/write accesses in seconds.
| int ngcbComUpLink | ( | int | fd, |
| int | routeThrough, | ||
| int | rst ) |
Configure the number of nodes to route through and the route-length from the last skipped node to the front-end global reset function.
| int ngcbComWrite | ( | int | fd, |
| const char * | buffer, | ||
| int | size, | ||
| char * | erms ) |
Write a number of bytes to the device.