Forum Discussion
Altera_Forum
Honored Contributor
20 years agoaccessing uart
hi guyz...
i am using quartus-V5.0 and NIOSII IDE for my design on UP3kit... i want to access UART and i used the function in HAL library for NIOSII IDE altera_uart_read(alt_fd* fd, char* ptr, int len); but what is this "alt_fd".... i came to know that it is a file descriptor and assigned as................. alt_fd* fd="\dev\uart_0"; my design has a uart also which is appropriately assigned to pins on the board.. but i was not able to read data sent to the UART .... i have sent the data thru the PC by using a c-prog which sends data to COM port continuously.... what is the problem..... plz someone explain me....... byeeeeeeeee2 Replies
- Altera_Forum
Honored Contributor
I can not find the function altera_uart_read on my system, but I guess it is the same as alt_avalon_uart_read.
This function is part of the hal device driver for the uart (please correct me if I am wrong). To access files or character-mode devices you should use the newlib functions or the unix-style interface provided by the HAL. Refer to "Nios II Software Developer's Handbook" and "Altera Embedded Peripherals Handbook" for more information. --Wolf - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by pfab@Nov 15 2005, 06:08 AM i can not find the function altera_uart_read on my system, but i guess it is the same as alt_avalon_uart_read.this function is part of the hal device driver for the uart (please correct me if i am wrong).
to access files or character-mode devices you should use the newlib functions or the unix-style interface provided by the hal.
refer to "nios ii software developer's handbook" and "altera embedded peripherals handbook" for more information.
--wolf
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=10994)
--- quote end ---
--- Quote End --- thanku Mr.Wolf .. yes it is alt_avalon_uart_read...i was mistaken.... i will try as you said .... thanks....