mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-21 15:25:36 +03:00
For readability
This commit is contained in:
parent
5715bda906
commit
b5ddae4672
1 changed files with 2 additions and 2 deletions
|
@ -255,7 +255,7 @@ serialPort_t *openSoftSerial(softSerialPortIndex_e portIndex, serialReceiveCallb
|
||||||
// If RX and TX pins are both assigned, we CAN use either with a timer.
|
// If RX and TX pins are both assigned, we CAN use either with a timer.
|
||||||
// However, for consistency with hardware UARTs, we only use TX pin,
|
// However, for consistency with hardware UARTs, we only use TX pin,
|
||||||
// and this pin must have a timer, and it should not be N-Channel.
|
// and this pin must have a timer, and it should not be N-Channel.
|
||||||
if (!(timerTx && !(timerTx->output & TIMER_OUTPUT_N_CHANNEL))) {
|
if (!timerTx || (timerTx->output & TIMER_OUTPUT_N_CHANNEL)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -266,7 +266,7 @@ serialPort_t *openSoftSerial(softSerialPortIndex_e portIndex, serialReceiveCallb
|
||||||
} else {
|
} else {
|
||||||
if (mode & MODE_RX) {
|
if (mode & MODE_RX) {
|
||||||
// Need a pin & a timer on RX. Channel should not be N-Channel.
|
// Need a pin & a timer on RX. Channel should not be N-Channel.
|
||||||
if (!(timerRx && !(timerRx->output & TIMER_OUTPUT_N_CHANNEL))) {
|
if (!timerRx || (timerRx->output & TIMER_OUTPUT_N_CHANNEL)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue