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

154 commits

Author SHA1 Message Date
phobos-
f10413392b VtxDevice over msp 2022-09-07 14:41:36 +02:00
Mark Haslinghuis
3009a13355 Fix UARTS and LPUART 2022-01-24 21:41:19 +01:00
Dominic Clifton
76459de83e Fix UART/USART mismatch for USART10. 2021-07-02 12:52:31 +02:00
Michael Keller
ae5aaa3c79 Fixed bugs in UART configuration introduced by #10704. 2021-06-11 00:27:54 +12:00
Dominic Clifton
263c5fa373 Add UART9/10 support.
* UART9 was supported as LPUART on some H7s.
* Newer 100-pin H7 CPUs support UART9 and USART10.
* 100+ pin devices support higher numbered UARTS than UART10.

Use USE_LPUART instead of hacking into UART9 for clarity.

* LPUARTS are different from other types of UARTS.
* They need different ID ranges.
* They have and different capabilities.
* Renumber LPUART1 to 40.

0-19 reserved for UART1-20
40-49 onwards for LPUART instances.

It makes sense to treat them as a different class of UART.  Just like we
do for softserial, vcp, etc.
2021-04-22 06:13:09 +02:00
jflyper
fecc1a5ca8 [G4] Treat LPUART1 as UART9 2020-03-01 19:37:02 +09:00
Alberto García Hierro
37e66b3dda Add support for FrSky OSD
- Add displayWriteFontCharacter() for font writing, removing all max7456
specific code.
- Add displayIsReady() for asynchronous display initialization
- Add displayBeginTransaction()/displayCommitTransaction() for display
transactions, which allow performing complex drawing operations without
flickering
- Add displayGetCanvas(), which retrieves the canvas associated with a
display (if it has it)
- Add canvas implementation for pixel based access for a display
- Add FrSkyOSD driver and displayPort driver
- Enable FrSkyOSD driver for targets with flash > 256
- Rename max7456_symbols.h to osd_symbols.h
2019-11-30 22:06:36 +00:00
mikeller
99f77fa88d Moved configuration validation into 'config.c'. 2019-11-24 21:19:26 +13:00
mikeller
4a7904695e Moved 'config.[ch]' into the 'config/' directory. 2019-10-28 11:17:25 +13:00
mikeller
4ef9743d1b Fixed RX / telemetry port sharing for iBus. 2019-10-08 00:05:32 +13:00
Bruce Luckcuck
64ddbd9924 Change serial port config validation to require MSP on VCP port
Will hopefully reduce the number of cases where users incorrectly disable MSP on the VCP port and then can no longer connect.

Should be supplemented with changes to the configurator that prevents turning off MSP on the VCP port.
2019-04-09 14:47:58 -04:00
mikeller
38e1ce04df Reorganised interfaces, putting them where they are used. 2019-01-27 13:38:22 +13:00
mikeller
a03f30efa0 Converted 'SKIP_' defines to 'USE_'. 2018-10-25 00:38:05 +13:00
mikeller
ede204aa81 Removed some target dependencies, and added makefile target 'check-target-independence' to find dependencies. 2018-05-14 19:13:37 +12:00
jflyper
58ea3a8180
Merge pull request #5860 from mikeller/eliminate_inefficient_serial_runtime_calls
Eliminated inefficient serial function calls at runtime.
2018-05-12 09:56:24 +09:00
Michael Keller
f8bec77c58
Merge pull request #5850 from jflyper/bfdev-serialinit-nopin-uart
UART Treat uarts without a pin as non-existent
2018-05-12 12:01:52 +12:00
jflyper
b8e0d22d01 Treat uarts without a pin as non-existent 2018-05-09 22:39:02 +09:00
mikeller
032f3b501b Eliminated inefficient serial function calls at runtime. 2018-05-10 01:32:36 +12:00
mikeller
19a360b867 Removed 'tlm_switch', replaced with 'isModeActivationConditionPresent(BOXTELEMETRY)'. 2018-05-08 01:14:18 +12:00
blckmn
a9f74cd6df Removed excess trailing spaces before new lines on licenses. 2018-04-25 20:58:00 +10:00
blckmn
46fe22b4bd Direct license replacement 2018-04-22 09:22:46 +10:00
SteveCEvans
5558174d33 Support programming of Arduino devices in serial passthrough mode (#5129)
* Support DTR in serial passthrough mode to enable programming of Arduino
based devices such as MinimOSD.

Use 'serialpassthrough 5 57600 rxtx 56' and then use Ardino to program MinimOSD
Use 'serialpassthrough 5 115200' and then use MWOSD configurator to setup

* Fix comment for CDC_SetCtrlLineStateCb routine

* Handle F7 CDC interface

* Use strToPin() to allow easy port/pin specification

* Fix use of CDC_SetCtrlLineStateCb for all processor types

* Only set baud when specified

* Fix unit tests for cli

* Only register callback if needed

* Fix white space

* Provide implementation of IOConfigGPIO in SITL

* Update serialpassthrough help text

* DTR handling through serial drivers

* Fix F3, F7 and SITL builds

* If serialpassthrough command specifies baud rate of 0, set baud rate over USB. MWOSD configurator can now access config and reflash MinimOSD without rebooting and changing baud rate.

* Fix F3 build

* Fix failing unit tests

* Use resources to declare DTR pin assignment

* Don't assert DTR during normal operation as MW_OSD doesn't like it

* MW_OSD must be built with MAX_SOFTRESET defined in order to support DTR resets

* Minimise changes after dropping DTR pin param from serialpassthrough cmd

* Remove DTR pin param from serialpassthrough cmd

* Treat ioDtrTag as boolean in conditional statements

* Tidy buffer check

* Check buffer size in CDC_Itf_Control

* Fix unit test

* Add documentation for DTR

* Add note on MAX_SOFTRESET to documentation

* Remove superfluous function definitions

* Fix tabs

* Fix tabs

* Removed superfluous entried from vtable

* Backout whitespace changes unrelated to this PR

* Pass true/false to IOWrite()

* Fix line coding packing

* Add LINE_CODING structure defintion

* Revise serial documentation

* Prevent tx buffer overflow in serialPassthrough()

* Revert change unrelated to PR

* Review feedback from ledvinap

* Fix unit test

* Use PINIO to drive DTR

* Fix unit test

* Remove change unrelated to PR

* Fix SITL build

* Use shifted bits for mask definition

* Fix serialpassthrough documentation

* Only compile PINIO functionality if USE_PINIO defined

* IOConfigGPIO not needed

* Move cbCtrlLine callback to cli.c

* serialPassthrough params changed

* Check packed structure size

* Fix unit test

* Tidy up baud rate handling
2018-03-21 23:17:31 +13:00
Andrey Mironov
63af8cdede Allowed RX-only softserial 2018-02-09 14:49:57 +03:00
Konstantin Sharlaimov (DigitalEntity)
5fa8971b1c Handle MSP out of band data with guard interval 2018-01-30 12:11:12 +10:00
mikeller
b489d0ba9d Renamed 'parameter_group' to 'pg'. 2017-12-19 23:36:31 +13:00
Martin Budden
8cb7abd15f Added data parameter to UART RX callback 2017-11-25 10:11:37 +00:00
Martin Budden
e3ee9a5588 Created new interface directory 2017-11-12 12:20:58 +00:00
mikeller
b78d8ad83e Converted more 'feature' type defines to use the 'USE_<x>' convention: LED_STRIP TARGET_CONFIG BRUSHED_ESC_AUTODETECT SERIAL_RX TELEMETRY TELEMETRY_CRSF TELEMETRY_FRSKY TELEMETRY_HOTT TELEMETRY_IBUS TELEMETRY_JETIEXBUS TELEMETRY_LTM TELEMETRY_MAVLINK TELEMETRY_SMARTPORT TELEMETRY_SRXL TELEMETRY_NRF24_LTM TELEMETRY_LTM SPEKTRUM_BIND NAV BUTTONS 2017-11-07 18:49:12 +13:00
mikeller
a8d34dabb0 Changed defines for GYRO/ACC/MAG/BARO/GPS/SONAR/OSD/BLACKBOX/CMS to conform to the USE_ convention. 2017-11-05 10:15:24 +13:00
Dominic Clifton
262890896e Merge pull request #2952 from balrog-kun/master
Fix Mavlink port sharing with MSP
2017-10-05 20:44:09 +13:00
mikeller
6d69b053e3 Fixed conflict between USE_MSP_UART and other UART defines. 2017-09-03 23:09:36 +12:00
Martin Budden
944fe0761c Tidied UART enum definitions 2017-07-29 13:30:37 +01:00
borisbstyle
3e0d17e6ea Add SBUS_TELEMETRY_UART initialisation // Change BFF4 target 2017-07-20 13:10:22 +02:00
Martin Budden
3d4f0bb137 Whitespace tidy 2017-07-05 06:36:22 +01:00
Michael Keller
6dfff4ac4d Fixed OSD tests after GPS changes. 2017-06-28 12:45:54 +12:00
Michael Keller
671d453709 Merge pull request #3097 from jflyper/bfdev-uart-refactor-and-configurable
UART refactor and configurable
2017-06-05 08:35:29 +12:00
Martin Budden
23f158913e Moved time functions out of system.h into time.h 2017-05-26 14:03:28 +01:00
jflyper
6c5997ef9f Rebased on to master (conflict in Makefile) 2017-05-24 11:54:53 +09:00
jflyper
fdfe9e8af3 Configurable UART 2017-05-24 11:49:21 +09:00
Petr Ledvina
00bd8d91d5 Fix SITL
uartOpen signature got changed, breaking SITL (hard way)

This cleans up serial_tcp a bit and uses new function name.
2017-05-19 23:19:46 +02:00
jflyper
0cf5161ec4 Remove reference to USART_TypeDef in io, refactor uartOpen and serialUART 2017-05-11 09:59:43 +09:00
Michael Keller
bd2fc2c5f8 Re-added setting of serialRx default UART from 'SERIALRX_UART'. 2017-04-06 09:49:52 +12:00
mikeller
4af589f9fd Fixed warning about unused parameter 'softserialEnabled'. 2017-03-19 10:40:00 +00:00
DieHertz
4ad8e36bc8 Disabled MSP on first UART unless USE_MSP_UART defined 2017-03-17 02:56:52 +03:00
DieHertz
2e98279369 Set default GPS baud rate back to 57600 2017-03-17 02:56:51 +03:00
borisbstyle
9f60b69567 Merge pull request #2599 from mikeller/suppress_listing_of_softserials_without_resources
Suppress listing SOFTSERIAL ports if they don't have pins assigned.
2017-03-15 22:07:19 +01:00
DieHertz
393b30979f Added serialConfig rate setting into reset function for task rescheduling 2017-03-14 12:35:06 +03:00
mikeller
c47ea3dc84 Switched to parameter groups. 2017-03-09 23:29:43 +13:00
Michael Keller
a33cc7d038 Fixed copy / pasta bug, changed to checko only TX pin assignment. 2017-03-09 18:24:29 +13:00
Michael Keller
2b2229fe61 Suppress listing SOFTSERIAL ports if they don't have pins assigned. 2017-03-09 14:41:32 +13:00