ngc 1.5.0
 
Loading...
Searching...
No Matches
ngcbDmaBurst.c File Reference
#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)
 

Detailed Description

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

◆ _REENTRANT

#define _REENTRANT

Function Documentation

◆ ngcbDmaBurstAlloc()

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.

◆ ngcbDmaBurstClose()

int ngcbDmaBurstClose ( ngcb_burst_t * burst,
char * erms )

Close a DMA-burst device. This will also call the ngcbDmaBurstFree() function.

◆ ngcbDmaBurstFree()

void ngcbDmaBurstFree ( ngcb_burst_t * burst)

Free all buffers allocated with ngcbDmaBurstAlloc(). When already freed this function has no further effect.

◆ ngcbDmaBurstInit()

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.

◆ ngcbDmaBurstOpen()

int ngcbDmaBurstOpen ( const char * devName,
ngcb_burst_t * burst,
char * erms )

Open a DMA device for burst transfer.

◆ ngcbDmaBurstRelease()

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

◆ ngcbDmaBurstStart()

int ngcbDmaBurstStart ( ngcb_burst_t * burst,
char * erms )

Start a burst transfer with the parameters as given in the object structure.

◆ ngcbDmaBurstStop()

int ngcbDmaBurstStop ( ngcb_burst_t * burst,
char * erms )

Stop a burst transfer. It should always be called once when the burst transfer is over.

◆ ngcbDmaBurstWait()

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.