mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-24 23:55:24 +08:00
platforms/nuttx: px4io_serial always cleanup DMA before next bus exchange
- this really shouldn't be necessary, but worst case it's harmless and much better than potentially falling out of the sky
This commit is contained in:
@@ -225,6 +225,9 @@ ArchPX4IOSerial::ioctl(unsigned operation, unsigned &arg)
|
||||
int
|
||||
ArchPX4IOSerial::_bus_exchange(IOPacket *_packet)
|
||||
{
|
||||
// to be paranoid ensure all previous DMA transfers are cleared
|
||||
_abort_dma();
|
||||
|
||||
_current_packet = _packet;
|
||||
|
||||
/* clear any lingering error status */
|
||||
|
||||
@@ -237,6 +237,9 @@ ArchPX4IOSerial::ioctl(unsigned operation, unsigned &arg)
|
||||
int
|
||||
ArchPX4IOSerial::_bus_exchange(IOPacket *_packet)
|
||||
{
|
||||
// to be paranoid ensure all previous DMA transfers are cleared
|
||||
_abort_dma();
|
||||
|
||||
_current_packet = _packet;
|
||||
|
||||
/* clear data that may be in the RDR and clear overrun error: */
|
||||
|
||||
@@ -275,6 +275,9 @@ ArchPX4IOSerial::ioctl(unsigned operation, unsigned &arg)
|
||||
int
|
||||
ArchPX4IOSerial::_bus_exchange(IOPacket *_packet)
|
||||
{
|
||||
// to be paranoid ensure all previous DMA transfers are cleared
|
||||
_abort_dma();
|
||||
|
||||
_current_packet = _packet;
|
||||
|
||||
/* clear data that may be in the RDR and clear overrun error: */
|
||||
|
||||
Reference in New Issue
Block a user