EDT PCD SDK Documentation 6.1.0
simple_putdata.c File Reference

(git 4cd3bb21, 2023-12-08)

#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "edtinc.h"
Include dependency graph for simple_putdata.c:

Functions

void usage (const char *progname, const char *err)
 
void init_buf (unsigned char *buf, unsigned int size, unsigned int numbufs)
 
int main (int argc, const char *argv[])
 

Detailed Description

A utility / example program to demonstrate the EDT PCD library's ring buffer mode. This application either reads data from a file/device or can generate counter data. Data is DMA'd from host to the opened EDT device.

Function Documentation

◆ usage()

void usage ( const char *  progname,
const char *  err 
)

Display usage information.

Parameters
prognameThe name of this program.
errA description of what is invalid about the call.

◆ init_buf()

void init_buf ( unsigned char *  buf,
unsigned int  size,
unsigned int  numbufs 
)

Initialize buffer with 16-bit incremented data. This could be replaced with read of data from file, data from device device, or some other ingestion method.

Parameters
bufThe buffer to initialize.
sizeThe size of buf.
numbufsThe number of buffers.

◆ main()

int main ( int  argc,
const char *  argv[] 
)

Send DMA data.