Implementing _read() and _write()
Posted:
Hi all,
I just want to get confirmation on what are admittedly stupid questions with implementing the _read() and _write() properly
First of all with writing to the FPGA,
if I am simply using the _write() function to send a single byte to act as a start or stop signal on the FPGA side, is something like this appropriate?
numbytew = 1;
char bufw = 0xFF;
rcw = _write(fdw, bufw, numbytew);
With reading from the FPGA,
let's say for now I simply want to save the data read from the FPGA onto a file as it's read in, would I simply need to do something like this?
rcr = _read(fdr, bufr, numbyter);
rcfile = _write(file, bufr, rcr);
Or would I need to make a function similar to allwrite in the demoapps?
Thanks!
I just want to get confirmation on what are admittedly stupid questions with implementing the _read() and _write() properly
First of all with writing to the FPGA,
if I am simply using the _write() function to send a single byte to act as a start or stop signal on the FPGA side, is something like this appropriate?
numbytew = 1;
char bufw = 0xFF;
rcw = _write(fdw, bufw, numbytew);
With reading from the FPGA,
let's say for now I simply want to save the data read from the FPGA onto a file as it's read in, would I simply need to do something like this?
rcr = _read(fdr, bufr, numbyter);
rcfile = _write(file, bufr, rcr);
Or would I need to make a function similar to allwrite in the demoapps?
Thanks!