#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 | |
| void | ngcbModInit (ngcb_mod_t *m) |
| int | ngcbModOpen (const char *path, ngcb_mod_t *m, char *erms) |
| int | ngcbModClose (ngcb_mod_t *m, char *erms) |
| int | ngcbModTimeout (ngcb_mod_t *m, int seconds, char *erms) |
| int | ngcbModFifo (ngcb_mod_t *m, int size, char *erms) |
| int | ngcbModRead (ngcb_mod_t *m, int addr, int *buffer, int size, char *erms) |
| int | ngcbModWrite (ngcb_mod_t *m, int addr, const int *buffer, int size, char *erms) |
| int | ngcbModWait (ngcb_mod_t *m, int addr, int mask, int timeout, char *erms) |
| #define _GNU_SOURCE |
| #define _REENTRANT |
| int ngcbModClose | ( | ngcb_mod_t * | m, |
| char * | erms ) |
Close DFE module interface
| int ngcbModFifo | ( | ngcb_mod_t * | m, |
| int | size, | ||
| char * | erms ) |
Set the transfer FIFO size (in 32-bit words). The default FIFO size is 128 words for backwards compatibility reasons. Current maximum is 1024 words. There are various setups in between. To optimize performance, the calling application may adapt the FIFO size depending on the board and revision to be addressed.
| void ngcbModInit | ( | ngcb_mod_t * | m | ) |
Initialze module handle
| int ngcbModOpen | ( | const char * | path, |
| ngcb_mod_t * | m, | ||
| char * | erms ) |
Open and enable path to DFE module
| int ngcbModRead | ( | ngcb_mod_t * | m, |
| int | addr, | ||
| int * | buffer, | ||
| int | size, | ||
| char * | erms ) |
Read a buffer from an address on a DFE-module
| int ngcbModTimeout | ( | ngcb_mod_t * | m, |
| int | seconds, | ||
| char * | erms ) |
Set the timeout for read/write accesses in seconds
| int ngcbModWait | ( | ngcb_mod_t * | m, |
| int | addr, | ||
| int | mask, | ||
| int | timeout, | ||
| char * | erms ) |
Poll address until all bits in mask are set. The timeout is given in seconds. A negative value indicates an infinite timoeut.
| int ngcbModWrite | ( | ngcb_mod_t * | m, |
| int | addr, | ||
| const int * | buffer, | ||
| int | size, | ||
| char * | erms ) |
Write a buffer to an address on a DFE-module