Fix long-standing bug which prevented using UBLOX gps via DMA.
This was noticed when updating the UBLOX code in a commit from a couple of days ago and Dilbert66 from #cleanflight tracked it down.
This commit is contained in:
parent
6a72b86ccf
commit
63e16494bb
|
@ -68,15 +68,16 @@ serialPort_t *uartOpen(USART_TypeDef *USARTx, serialReceiveCallbackPtr callback,
|
||||||
} else {
|
} else {
|
||||||
return (serialPort_t *)s;
|
return (serialPort_t *)s;
|
||||||
}
|
}
|
||||||
|
s->txDMAEmpty = true;
|
||||||
|
|
||||||
// common serial initialisation code should move to serialPort::init()
|
// common serial initialisation code should move to serialPort::init()
|
||||||
s->port.rxBufferHead = s->port.rxBufferTail = 0;
|
s->port.rxBufferHead = s->port.rxBufferTail = 0;
|
||||||
s->port.txBufferHead = s->port.txBufferTail = 0;
|
s->port.txBufferHead = s->port.txBufferTail = 0;
|
||||||
// callback for IRQ-based RX ONLY
|
// callback works for IRQ-based RX ONLY
|
||||||
s->port.callback = callback;
|
s->port.callback = callback;
|
||||||
s->port.mode = mode;
|
s->port.mode = mode;
|
||||||
s->port.baudRate = baudRate;
|
s->port.baudRate = baudRate;
|
||||||
|
|
||||||
|
|
||||||
#if 1 // FIXME use inversion on STM32F3
|
#if 1 // FIXME use inversion on STM32F3
|
||||||
s->port.inversion = SERIAL_NOT_INVERTED;
|
s->port.inversion = SERIAL_NOT_INVERTED;
|
||||||
#else
|
#else
|
||||||
|
@ -189,7 +190,6 @@ uint8_t uartTotalBytesWaiting(serialPort_t *instance)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// BUGBUG TODO TODO FIXME - What is the bug?
|
|
||||||
bool isUartTransmitBufferEmpty(serialPort_t *instance)
|
bool isUartTransmitBufferEmpty(serialPort_t *instance)
|
||||||
{
|
{
|
||||||
uartPort_t *s = (uartPort_t *)instance;
|
uartPort_t *s = (uartPort_t *)instance;
|
||||||
|
|
Loading…
Reference in New Issue