Forum Discussion
Altera_Forum
Honored Contributor
20 years agoUART IO
Hi: How could I open/set flags to an Altera UART device for being used in a non-blocking manner, e.g. a call to fgetc() or fread() returns inmediately if no characters are available? Thank...
Altera_Forum
Honored Contributor
20 years agoHi smcnutt,
It works fine now using the unix style open, read and write functions from "unistd.h". for opening the device: comm_uartfd = open( uart_name, O_RDWR | O_NONBLOCK | O_NOCTTY ); for writing: write( comm_uartfd, src, size ) for reading: res = read( comm_uartfd, &curr_rxd, 1 ); Thanks