swift-nav/piksi_firmware — pull request #75 by gsmcmullin (2014-08-06 02:49:37+00:00)
Title: Rework to usart code to allow claiming of ports

This is for discussion rather than a request to be merged.

A 'None' option is provided for uart protocol which will just disable any sending on that port. The port will still receive SBP unless claimed by a driver.
Future drivers for Bluetooth and GPRS/3G must claim their configured port, this will prevent SBP from eating the received data. If initialization fails, the port must be released so that it can be reconfigured by SBP if needed.

If the usart_tx_state and usart_rx_state are merged, usart_chat could be simplified. The 'None' protocol option can also be removed, as sending from the existing protocol drivers could be disabled when the port is claimed.