1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 05:15:25 +03:00
Commit graph

7 commits

Author SHA1 Message Date
Dominic Clifton
0fd127bf60 Allow the user to specify their serial port scenarios. 2014-05-10 14:11:01 +01:00
Dominic Clifton
1777d8feda First cut of configurable serial port functionality.
Currently port usage is hard-coded to the default port layout, cli
commands are coming in a future commit.

This decouples all code from the global 'serialPorts' structure which
has been removed.  Any code that needs to use a serial port can use
findOpenSerialPort() and openSerialPort() and maintain it's own
reference to the port.

Ports can switch between functions.  e.g. by default
cli/msp/telemetry/gps
passthrough all use USART1.  Each port maintains it's current function.
see begin/endSerialPortFunction.

There are only certain combinations of serial port functions that are
supported, these are listed in serialPortFunctionScenario_e.

This commit also adds a few 'static' keywords to variables that should
have been.

There a a few other minor fixes and tweaks to various bits of code that
this uncovered too.
2014-05-09 23:39:10 +01:00
Dominic Clifton
10f3835491 CHEBUZZF3 - Use timer configuration that matches the hardware. 2014-05-08 01:28:31 +01:00
Dominic Clifton
92bed4a33d STM32F30x - Working parallel PWM. Timer IRQ handle was not defined for
TIM8 correctly. Software serial conficted with parallel PWM input. Fixed
crash due to incorrect timerConfig index calculation code.

The crash occurred when capture compare interrupt handlers attempted to
call an invalid callback.

Note: the crash does not affect existing baseflight code since the
formula is OK when using a 2 dimensional array with equal dimensions.

Formula details here:
https://docs.google.com/spreadsheets/d/1UuxnC0VKiprvt1wt3KXffefEWJUb_-ILFLQuP377Anw
2014-05-02 17:09:41 +01:00
Dominic Clifton
133f75a17b Update PWM driver so that all 10 PWM outputs work. Softserial also now
works as expected.  PWM/PPM input untested.  UART2 probably broken.
2014-05-01 15:09:32 +01:00
Dominic Clifton
1e9186d3a1 Update serial drivers so they do not include "board.h". It is now clear
what all serial drivers need to compile and what was unnecessarily
included before.
2014-04-17 14:27:30 +01:00
Dominic Clifton
3bd4cd2ed2 Use slightly flatter directory structure since some developers did not
like too many folders.
Extracted code from some files into separate files to fit with the new
layout.
2014-04-08 22:07:37 +01:00
Renamed from src/drivers/serial/drv_softserial.c (Browse further)