Allowed RX-only softserial

This commit is contained in:
Andrey Mironov 2018-02-09 14:49:57 +03:00
parent 1c3a3229ad
commit 63af8cdede
1 changed files with 4 additions and 2 deletions

View File

@ -457,11 +457,13 @@ void serialInit(bool softserialEnabled, serialPortIdentifier_e serialPortToDisab
if ((serialPortUsageList[index].identifier == SERIAL_PORT_SOFTSERIAL1 if ((serialPortUsageList[index].identifier == SERIAL_PORT_SOFTSERIAL1
#ifdef USE_SOFTSERIAL1 #ifdef USE_SOFTSERIAL1
&& !(softserialEnabled && serialPinConfig()->ioTagTx[RESOURCE_SOFT_OFFSET + SOFTSERIAL1]) && !(softserialEnabled && (serialPinConfig()->ioTagTx[RESOURCE_SOFT_OFFSET + SOFTSERIAL1] ||
serialPinConfig()->ioTagRx[RESOURCE_SOFT_OFFSET + SOFTSERIAL1]))
#endif #endif
) || (serialPortUsageList[index].identifier == SERIAL_PORT_SOFTSERIAL2 ) || (serialPortUsageList[index].identifier == SERIAL_PORT_SOFTSERIAL2
#ifdef USE_SOFTSERIAL2 #ifdef USE_SOFTSERIAL2
&& !(softserialEnabled && serialPinConfig()->ioTagTx[RESOURCE_SOFT_OFFSET + SOFTSERIAL2]) && !(softserialEnabled && (serialPinConfig()->ioTagTx[RESOURCE_SOFT_OFFSET + SOFTSERIAL2] ||
serialPinConfig()->ioTagRx[RESOURCE_SOFT_OFFSET + SOFTSERIAL2]))
#endif #endif
)) { )) {
serialPortUsageList[index].identifier = SERIAL_PORT_NONE; serialPortUsageList[index].identifier = SERIAL_PORT_NONE;