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

40 commits

Author SHA1 Message Date
Andrey Mironov
b8855d3a71
G4 LPUART rework (#11821)
* Extracted SOTSERIAL_TX & RX resources

* Fixed LPUART1 on G4
2023-06-15 17:18:20 +02:00
Steve Evans
4dc04d6a33
Tri-state USART TX output if load due to powered down peripheral is detected (#12760)
Tri-state USART TX output if loaded due to powered down peripheral being detected
2023-05-10 11:53:35 +10:00
J Blackman
74be33dfbc
AT32 development, introduction of AT32F435 target (#12247)
* AT32F435: new target (#12159)
* AT32F435: New target (WIP)
* IO and Timer Updates
* Adding pseudonyms for the STM TypeDef items.
- implementation to follow
* Adding config_streamer support for AT32
* Implementation for IO
* Adding in Peripheral mapping from emsr.
* Warnings cleanup for AT drivers
* Getting things to the linking stage
* Add AT-START-F435 LEDs as default in AT32F435 as a temporary measure to aid bringup
* Remove tabs
* Enable selection of serial port to use for MSP
* Setup defaults for AT-START-F435 to use MSP on UART1
* Fix for most recent 4.5.0 Makefile changes
* Solve for sanity check.
* Add AT32F435 MCU type
* Fix compilation issue with SITL
* Merge conflict resolution
* Minor cleanup
* Adding line feed.

---------

Co-authored-by: Steve Evans <Steve@SCEvans.com>
2023-01-31 11:31:23 +11: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
jflyper
d9d878d88e UART DMA refactor
- Add UART DMA configurability

- Consolidation of DMA settings code
  DMA setting code for all MCUs is now in serial_uart.c

- Consolidation of UART buffer
  UART buffers are not embedded in uartDevice[] array anymore for all MCUs.

- Consolidation of HAL DMA IRQ handler

- Add missing defs for DMA on UART4 for F3
2019-10-04 12:58:11 +09:00
jflyper
7ddfd7dea6 Unify DMA stream and channel handling 2019-07-27 21:20:34 +09:00
jflyper
f58b3eab03 [H7] Enable UART 2019-05-07 22:21:31 +09:00
jflyper
1c76469251 Add and handle USE_DMA 2019-05-05 19:42:50 +09:00
jflyper
00dab4288f More strict application of USE_UART and USE_INVERTER 2018-10-08 15:06:42 +09: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
jflyper
18c29a2b6e Make VTable functions static
jetiexbus.c: Use serialRxBytesWaiting instead of uartTotalRxBytesWaiting
2017-12-27 22:08:23 +09:00
Martin Budden
8cb7abd15f Added data parameter to UART RX callback 2017-11-25 10:11:37 +00:00
Martin Budden
944fe0761c Tidied UART enum definitions 2017-07-29 13:30:37 +01:00
jflyper
fdfe9e8af3 Configurable UART 2017-05-24 11:49:21 +09:00
jflyper
0cf5161ec4 Remove reference to USART_TypeDef in io, refactor uartOpen and serialUART 2017-05-11 09:59:43 +09:00
Sami Korhonen
1f8805cdf0 squash betaflightF7
Parts and driver boost from @npsm
2016-10-21 08:51:02 +03:00
Martin Budden
1dea28002e Further rxCallback parameter renames 2016-10-12 09:17:16 +01:00
Martin Budden
661aa7469d Made serial const correct 2016-10-03 23:00:16 +01:00
blckmn
9c303d6669 VCP improvements to remove need for delay in serial_cli for F4 targets. 2016-08-13 11:23:35 +10:00
Martin Budden
97fe5afd6c Converted tabs to spaces. 2016-06-27 19:26:02 +01:00
Scott Shawcroft
a4e5e30152 Stop using uint8_t to determine if bytes are available from USB. If we buffer more than that we'll never be able to read it all. 2016-06-25 10:52:54 -07:00
blckmn
51a99e74c6 STM32F4: USARTS 4,5,6 added
Flag initialisation for motor_pwm_protocol
Fixes for AlienFlightF4 and timers
2016-06-08 05:43:28 +10:00
blckmn
7ca39bbde6 STM32F4: Drivers 2016-06-08 05:37:08 +10:00
Nicholas Sherlock
6e504ca52a Ability to see how many Tx bytes are free in serial port buffer 2015-10-01 16:48:56 +13:00
Nicholas Sherlock
159f57f583 Add new serial port options field (inversion, stop bits, etc) 2015-03-19 12:56:11 +13:00
Petr Ledvina
7c62ec9755 Move internal serial interface into separate header file
Declaring function from other file is quite dangerous - there is no warning if interfaces get out of sync
2015-02-23 09:17:06 +01:00
Dominic Clifton
d8b5f6c60c GPS - Add satellite strength bargraphs to OLED display. 2014-12-13 21:58:54 +00:00
Dominic Clifton
9b81dea320 Fix USART total bytes waiting when tx/rx buffer sizes are not equal.
Avoid using % operator.  Allow buffer sizes that are not powers of two.
2014-12-13 03:29:24 +00:00
Dominic Clifton
62134057f0 GPS - handling incoming data as soon as possible to avoid observed GPS
packet loss.
2014-12-13 01:45:48 +00:00
Petr Ledvina
bf50cbb1a8 NVIC priority change
Use 'better' macros to handle priority. This simplifies passing priority to function and new ATOMIC_BLOCK macro
2014-11-04 16:23:21 +01:00
Dominic Clifton
8f80f86bc9 Reduce serial port memory usage.
The largest MSP command is 160 bytes.
2014-10-29 19:18:51 +00:00
Dominic Clifton
d76a414985 Ensure each serial port has enough buffer space to write out the largest
MSP response.
2014-10-29 00:52:00 +00:00
Dominic Clifton
d60183d91d Normalize all the line endings 2014-09-15 23:40:17 +01:00
Dominic Clifton
b01724681a CC3D - Support USART3 instead of USART2.
This has highlighted that the existing codebase is quite targeted
towards systems that use USART1 and 2.  Annoyingly the inverter is on
USART1 and the sbus code requires callbacks so still won't work yet.
2014-08-07 19:17:46 +01:00
Dominic Clifton
e867af8c4b Correct project name in GPL notices. 2014-06-05 00:47:47 +01:00
Dominic Clifton
fab23debe8 Removing old FIXME comment from uartPort_t now that the structure it was
previously referring to has been cleaned up.
2014-06-04 23:02:03 +01:00
Dominic Clifton
0bbcd6570f Updated source files to include the GPL v3 notices. Include a copy of
the GPL v3.
2014-06-04 16:48:23 +01:00
Dominic Clifton
d19a5e7046 Cleanup project structure. Update unit test Makefile to place object
files in obj/test
2014-05-31 22:43:06 +01:00
Renamed from src/drivers/serial_uart_common.h (Browse further)