1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 03:20:00 +03:00
Open Source Flight Controller Firmware
Find a file
timecop@gmail.com 8003d06049 Totally rework software serial to provide tx at the same time as rx using only one timer.
First cut at polymorphic serial port implementation.  Split serialPort_t into uartPort_t and serialPort_t.  Calls to uartWrite() can now be replaced with calls to serialWrite().

Replacing calls to serialWriteByte(softSerial_t*, char) with calls to serialWrite(serialPort_t*, char).  This completes the proof of concept for polymorphic serial port implementations (uartPort and softSerialPort).

Renaming isSerialAvailable to uartTotalBytesWaiting.  Renaming serialAvailable to softSerialTotalBytesWaiting.  Adding serialTotalBytesWaiting to serial API and updating calls to the former methods to use the serial API.

Renaming serialRead to softSerialRead.  Adding serialRead to serial API and updating calls to uartRead and softSerialRead to use the serial API.  Renamed uartPrint to serialPrint which now works on any serialPort implementation.

Replacing calls to isUartTransmitEmpty with isSoftSerialTransmitBufferEmpty.  Replacing remaing calls to uartWrite with serialWrite.  Adding isSoftSerialTransmitBufferEmpty to the serial API.  Adding serialSet/GetBaudRate to the serial API.  Since softSerial does not implement serialSetBaudRate some GPS serial initialisation code has been updated.

At this point it is probably possible to switch around all the ports and use a software serial implementation if desired.

By Dominic Clifton / https://github.com/hydra/baseflight/

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@423 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61

Conflicts:

	src/drv_serial.c
	src/drv_serial.h
	src/main.c
2013-10-01 22:05:10 +01:00
lib a couple optimizations for dynamic HSE frequency - moved SetSysClock() to run after reset vector + bss init, and changed rcc which used hardcoded HSE_VALUE. 2013-07-02 00:58:50 +00:00
obj fixed mag gain during testmode (thanks pm1) and added some explicit float definitions to mag test code. 2013-09-12 10:50:13 +00:00
src Totally rework software serial to provide tx at the same time as rx using only one timer. 2013-10-01 22:05:10 +01:00
support Changing all line endings to WINDOWS line endings (CR+LF) and removing all End-Of-Line whitespace and using spaces instead of tabs. Please ensure you configure your editors and tools to follow suit. If using git please enable autocrlf in your .git/config file. 2013-09-06 23:14:48 +00:00
.gitignore [PATCH 2/4] gitignore 2013-05-29 00:08:38 +00:00
baseflight.uvproj Totally rework software serial to provide tx at the same time as rx using only one timer. 2013-10-01 22:05:10 +01:00
JLinkSettings.ini imported STM32 multiwii port into baseflight dir 2012-02-16 09:39:58 +00:00
Makefile Renaming serialRead to softSerialRead. Adding serialRead to serial API and updating calls to uartRead and softSerialRead to use the serial API. Renamed uartPrint to serialPrint which now works on any serialPort implementation. 2013-09-30 23:30:12 +01:00
stm32_flash.ld added test driver for software i2c. disabled by default. no, that wasn't the cause of cycletime jumps. 2012-07-14 02:00:39 +00:00