Forum Discussion
tehjingy_Altera
Regular Contributor
11 months agoHi
For the lightweight UART, it is not meant to use the device instantiation directly.
It should be used to use through calling the Standard C Library Function as mention in the link below:
https://www.intel.com/content/www/us/en/docs/programmable/683130/22-3/uart-api-34890.html
Regards
Jingyang, Teh
- kpainter11 months ago
New Contributor
Thank you for the quick answer. I had wondered about that so we tried the avalon uart and the same thing happens. Let me explain what we are trying to do and maybe there is a better way. We are trying to use this embedded console found here:
https://github.com/bradschl/embedded-c-debug-consoleWe have a getc function defined as below:
int console_getc(void * console_hint){(void) console_hint;int ret = ECDC_GETC_EOF;if (uart_0.rx_start != uart_0.rx_end){ret = intel_lw_uart_read(&uart_0, xferbuf, 1, 0x4000);ret = xferbuf[0];}return ret;}Here is where the uart_0 is not recognized as it is being removed. This is happening with the avalon uart as well as I mentioned. I can see that the uart_0 struct is being filled with received characters from the isr but I am not able to get them out. Perhaps there is a better method of doing what I am attempting? Thank you for the assistance!Regards,Kelly Painter