#include <stdio.h>#include <stdlib.h>#include <string.h>#include <signal.h>#include <errno.h>#include <poll.h>#include <sys/time.h>#include <sys/types.h>#include <sys/socket.h>#include <unistd.h>#include <ngc/core/ngcb.h>#include <ngc/core/ngcbDrv.h>Macros | |
| #define | _GNU_SOURCE |
| #define | _REENTRANT |
Functions | |
| int | ngcbDmaBurstInit (ngcb_burst_t *burst, char *erms) |
| void | ngcbDmaBurstRelease (ngcb_burst_t *burst) |
| int | ngcbDmaBurstOpen (const char *devName, ngcb_burst_t *burst, char *erms) |
| int | ngcbDmaBurstClose (ngcb_burst_t *burst, char *erms) |
| int | ngcbDmaBurstAlloc (ngcb_burst_t *burst, size_t size, size_t dmaSize, int numBuf, char *erms) |
| void | ngcbDmaBurstFree (ngcb_burst_t *burst) |
| int | ngcbDmaBurstStart (ngcb_burst_t *burst, char *erms) |
| int | ngcbDmaBurstStop (ngcb_burst_t *burst, char *erms) |
| int | ngcbDmaBurstWait (ngcb_burst_t *burst, char *erms) |
| #define _GNU_SOURCE |
| #define _REENTRANT |
| int ngcbDmaBurstAlloc | ( | ngcb_burst_t * | burst, |
| size_t | size, | ||
| size_t | dmaSize, | ||
| int | numBuf, | ||
| char * | erms ) |
Allocate a burst buffer of the given size (in bytes) and also a DMA ring-buffer with numBuf elements. The size of each element is dmaSize bytes.
| int ngcbDmaBurstClose | ( | ngcb_burst_t * | burst, |
| char * | erms ) |
Close a DMA-burst device. This will also call the ngcbDmaBurstFree() function.
| void ngcbDmaBurstFree | ( | ngcb_burst_t * | burst | ) |
Free all buffers allocated with ngcbDmaBurstAlloc(). When already freed this function has no further effect.
| int ngcbDmaBurstInit | ( | ngcb_burst_t * | burst, |
| char * | erms ) |
Initialize the ngcb_burst_t object. The function should be called once before using the other functions.
| int ngcbDmaBurstOpen | ( | const char * | devName, |
| ngcb_burst_t * | burst, | ||
| char * | erms ) |
Open a DMA device for burst transfer.
| void ngcbDmaBurstRelease | ( | ngcb_burst_t * | burst | ) |
Release the ngcb_burst_t object. The function should be called once when the object is no longer used. This function must not be called from within a signal handler
| int ngcbDmaBurstStart | ( | ngcb_burst_t * | burst, |
| char * | erms ) |
Start a burst transfer with the parameters as given in the object structure.
| int ngcbDmaBurstStop | ( | ngcb_burst_t * | burst, |
| char * | erms ) |
Stop a burst transfer. It should always be called once when the burst transfer is over.
| int ngcbDmaBurstWait | ( | ngcb_burst_t * | burst, |
| char * | erms ) |
Suspend the process execution until the next chunk of dma data has been put to the burst buffer in the ngcb_burst_t object.