multiwii/baseflight — pull request #50 by hydra (2014-04-03 21:47:55+00:00)
Title: Add support for 2 softserial ports and avoid polling of software serial RX pins

Add support for 2 softserial ports on PWM4+5/TIM3_CH1+2/PA6+PA7 and PWM6+7/TIM3_CH3+4/PB0+PB1.

The software serial ports share the same baud rate both both are independently invertible.

The configuration parameter for inverting software serial ports changed. Use 'softserial_1_inverted' and 'softserial_2_inverted'.

Updated software serial to monitor serial pins for signal changes instead
of periodically sampling pin signals.

When reading the data the timer used is synchronized to the falling edge
of the start bit which allows for better synchronization at higher
speeds. The code has been tested OK from 1200 baud to 19200. 38400
baud was tested and partially usable but has been disabled because there
are too many transmit and receive errors, especially when transmitting
and receiving at the same time.

Due to the way a single timer is used for transmitting and receiving, if
data comes in while transmitting the system may incorrectly transmit a
short or long bit. However at 19200 and below this didn't cause a
problem in the limited testing I performed.