I want to use AltSoftSerial for a half-duplex TTL level serial link. The simplest way to do this would be to have the Rx pin directly hooked to the line, but that requires being able to temporarily disable reception while a transmission is in progress (to avoid self-reception).
It looks like I should be able to do this just by calling DISABLE_INT_INPUT_CAPTURE(); to disable the input capture interrupt before calling write(), and then enabling it again with ENABLE_INT_INPUT_CAPTURE(); when the transmission is over.
Hi,
I want to use AltSoftSerial for a half-duplex TTL level serial link. The simplest way to do this would be to have the Rx pin directly hooked to the line, but that requires being able to temporarily disable reception while a transmission is in progress (to avoid self-reception).
It looks like I should be able to do this just by calling DISABLE_INT_INPUT_CAPTURE(); to disable the input capture interrupt before calling write(), and then enabling it again with ENABLE_INT_INPUT_CAPTURE(); when the transmission is over.
Do you see any problems with this approach?
Thanks,
/Patrik J.