Forum Discussion
Altera_Forum
Honored Contributor
21 years agoabout programable UART Baudrate
the readme.txt of the board_diag show that: * - UART test * Tests UART functionality for the UART defined as STDOUT. * * Currently, only tested on the JTAG UART device. the component ...
Altera_Forum
Honored Contributor
21 years agohello rugbybloke,
could you look at the following code that change the baudrate? in the sopc builder i have set the option that divisor can be change. and the result is when execute: if (fd->dev->ioctl) { rc = fd->dev->ioctl(fd, req, arg); } it stop! /********************************************************/ int main (void) { char* msg = "hello world"; FILE* fp; struct termios* term; fp = fopen ("/dev/uart1", "w"); if (fp) { term->c_ispeed=B57600; ioctl(fp, TIOCMSET, term); fprintf(fp, "%s",msg); fclose (fp); } return 0; } /********************************************************/ could you show me how to do? thank you!