Forum Discussion
Altera_Forum
Honored Contributor
21 years agoHi,
like 'rugbybloke' I'm a bit confused about exactly what it is you're trying to do, however it sounds like you want to write you're own device driver for the UART. Assuming that's the case, a good starting point for your own driver is the existing one. If you copy the contents of altera_avalon_uart/HAL/src and altera_avalon_uart/HAL/inc into your system library project then this copy will be used in preference to the original. You can then modify the driver to provide additional functionality as you see fit. If you find that manipulating the device through the ANSI C API, e.g. fopen(), fwrite(), printf() etc., is too much of an overhead for your application, then you can instead talk to the device using the underlying 'UNIX style' API, e.g. open(), read(), write() etc. This is a less sophisticated interface, but that's the trade off between the two options. Hopefully that isn't at a complete tangent to what you're trying to do. If it is, can you have another stab at trying to explain the problem you're trying to solve?