I’m trying to implement HAL to ArduPilot code for AT32UC3C0512C using UC3C-EK. I use drivers of AP_HAL_AVR as a guide. However, I having troubles implementing UARTDriver.
In the UartDriver.cpp of the AVR, (github.com/diydrones/ardupilot/ … AP_HAL_AVR) I can’t understand how the rxBuffer is filled with the data coming from GPS or sensors. With the same manner, i didn’t understand how the values at the txbuffer are sent through the UART. In other words, all I can see is write() only filling the txBuffer, however, there is no method or line that sends bytes from txBuffer to the actual port. If anyone can please explain how read() and write() methods work, I would really appreciate.