1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-12 19:10:32 +03:00
Commit graph

191 commits

Author SHA1 Message Date
Kevin Plaizier
0d94108068
Update the google olc code to not have compiler warnings (#14484)
* Update the google olc code to not have compiler warnings

* With newer BF updates (double) is no longer needed in olc.c
2025-06-30 19:18:29 +02:00
Jay Blackman
7fed816cb3
Removing -fsingle-precision-constant (#14444)
* Removing -fsingle-precision-constant

This is so that -Wdouble-promotion raises a warning as it should.

* Adding -Wunsuffixed-float-constants

* Not ideal.

* Moving to a named constant

* Named constant update

* Using M_PIf

* Updated following feedback from @ledvinap
2025-06-17 20:45:47 +02:00
Jay Blackman
748217f424
PICO: Adding pico-sdk as sub module (#14400) 2025-05-24 07:54:47 +10:00
Steve Evans
b1604e8459
AT32F435 SD card support (#14018)
Support either USE_FLASH or USE_SDCARD on AT32F435
2025-01-02 20:04:58 +01:00
Jay Blackman
53d44aa1b1
Adding common source location in ./src/platform (#14044)
* Adding common source location in ./src/platform

To enable the continued clean up of multiple files still in ./src/main/driver (more PRs to follow) that are specifically for AT32, APM32 and STM32

Source will be moved to MCU_COMMON_SRC where it is specifically for that MCU (or variant). The test will be to ensure no files in the MCU_EXCLUDES for SITL.

* Use of +=
2024-11-25 21:16:45 +01:00
J Blackman
2dd6f95aad
Adding RP2350 SDK and target framework (#13988)
* Adding RP2350 SDK and target framework

* Spacing

* Removing board definitions
2024-10-23 01:02:48 +02:00
Morro
14bcc13150
Initiate APM32F40X MCU Support in Betaflight (#13709)
* Add APM32F4 driver libraries and USB middleware
* Remove all duplicated APM32 driver files and retaining only the APM32 LIB directory
2024-06-28 15:03:34 +10:00
J Blackman
6080bffccc
Preparations for release of H563 target (#13657)
Adding H5 middle ware
2024-06-04 09:03:14 +10:00
Mark Haslinghuis
5a28ce5129
Make Cppcheck happier revived (#13566)
Co-authored-by: Štěpán Dalecký <daleckystepan@gmail.com>
2024-05-10 13:23:32 +10:00
Steve Evans
43c645a006
Fix error in I2C write operation on AT32 (#13228) 2023-12-17 10:04:30 +11:00
Steve Evans
ab1559cf20
Make AT32 I2C accesses fully interrupt driven (#13171)
Make I2C accesses fully interrupt driven
2023-11-17 23:45:04 +01:00
Steve Evans
6ff80a471a
Add USB MSC support to AT32 (#12481) 2023-03-15 04:29:38 +01:00
J Blackman
c224c075f8
Cleanup of USB drivers for AT32F4 (#12441)
* Cleanup of USB drivers for AT32F4
* F4 has different directories
2023-03-09 18:14:16 +11:00
Steve Evans
3cc056f192
Rename ACC to ACC_REGS (#12429) 2023-03-03 20:20:21 +11:00
Steve Evans
97487905ee
Add AT32F435 I2C support (#12423) 2023-02-28 12:25:03 +11:00
James
4019369ec0
Initial ADC support for AT32 (#12356)
Reads internal and external ADC channels.
Internal Vref and temperature tested, external Vbat tested.
Expect temperature to be inaccurate as the AT chips don't come with
per chip calibration.
External current and the generic 'external' channels haven't been tested.
2023-02-14 21:40:00 +01: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
J Blackman
8900a831e5
AT32F435/7 Libraries (#12158) (#12263)
Source: https://github.com/ArteryTek/AT32F435_437_Firmware_Library
Version: 2.1.1
2023-01-30 22:05:32 +01:00
Dominic Clifton
ea58885441 MSC - Fix MSC on H7. Commit 9629f96676
broke MSC.

Details on https://github.com/betaflight/betaflight/pull/10747
2022-08-21 16:46:48 +02:00
J Blackman
2bb3fef844
Merge pull request #11761 from SteveCEvans/semicolon
Remove superfluous double ;
2022-08-05 08:28:20 +10:00
Steve Evans
aa833b2b2f Simplify cliWriter structure definition as use of uint8_t data[] (flexible array member) at the end of the bufWriter_t structure is breaking the F411 build 2022-07-24 16:15:51 +01:00
Steve Evans
cf3615938b Remove superfluous double ; 2022-07-24 14:49:35 +01:00
Steve Evans
a3a3b74fd5 Refactor USB serial ring buffer code 2022-07-24 10:42:30 +01:00
haslinghuis
88ae4e907e
Merge pull request #11669 from SteveCEvans/hal_usb_timeout
Use timed timeouts for USB HAL functions, not simple counts, as per H7
2022-06-28 02:13:05 +02:00
Štěpán Dalecký
be8fbcdaac Remove unused STM32 USB FS lib 2022-06-21 14:01:32 +02:00
Steve Evans
49a7d0f9e4 Use timed timeouts for USB HAL functions, not simple counts as per H7 2022-06-17 19:56:23 +01:00
Steve Evans
701b0ae55c Remove F1 and F3 support 2022-06-14 19:10:13 +01:00
Dominic Clifton
115a584713 HAL - Fix issues with HAL USB timeouts on fast processors.
* Occurs more frequently on >=480Mhz CPUs.
* Occurs more frequently on RELEASE builds due to optimizations.

Patch comes from here:

https://community.st.com/s/question/0D50X0000BCMFx0SQH/usbhs-ulpi-on-stm32h750

Confirmed fixed on H730 @ 520Mhz RELEASE build.
2021-12-23 12:36:02 +01:00
Mathias Rasmussen
87c259a26e Fix use of floating point math functions 2021-12-21 04:18:59 +01:00
Dominic Clifton
91483d2e8e STM32H7 - SDMMC Fix the short busy loop being compiled out by newer
versions of GCC.

STM32H7 - Don't go into an infinite loop if an SDIO read fails.

STM32H7 - Generate compiliation error for non-8Mhz crystals when SDCARD
via SDIO is used.  Prevents accidental overclocking of hardware.

Avoid double-init of SD card when CONFIG_IN_SDCARD is used.

Note: There's no SD_DeInit() function.

STM32H7 - Fix MSC SD initialisation when using USE_DMA_SPEC.
2021-09-10 02:28:29 +12:00
Steve Evans
fb97b44a33 Tidy up SPI sequence indexing
Advance fdevice->currentWriteAddress in m25p16_callbackWriteComplete()
2021-09-07 00:11:49 +12:00
Steve Evans
ab66795eeb G4 SPI DMA support 2021-08-31 23:29:51 +12:00
Steve Evans
f39467c396 Use static definition for ClassData to support USB MSC DMA on G4 2021-08-30 12:54:04 +01:00
Steve Evans
9629f96676 New memory section types for DMA 2021-05-17 23:36:04 +01:00
mikeller
53187c5367 Switched to 'maximum FIFO' version of the BMI270 microcode. 2021-04-28 01:10:45 +12:00
Bruce Luckcuck
37dbbd0755 Add GPS coordinates OSD elements display variants; add support for Open Location Code display
Adds variations in GPS coordinate OSD element display:
1. Fractional degrees with 7 digits (default) - 000.0000000
2. Fractional degrees with 4 digits - 000.0000
3. Degrees, minutes, seconds - 000^00'00.0"E
4. Open Location Code (sometimed called Google Plus Code) - 23ABC4R8+M37

Uses Open Location Code library from:
https://github.com/google/open-location-code

Added support for `STATE(GPS_FIX_EVER)` to differentiate from having a fix now (`STATE(GPS_FIX)`) vs. ever having a fix.

Logic change to only display coordinates from the GPS module once a fix has been initially established. This prevents displaying interim coordinates supplied by the GPS while the fix is still being establised as these coordinates can be inaccurate by hundreds of miles. Once a fix is established initially then the coordinates will continue to be displayed even if the fix is lost or degrades in quality.

Add logic to "blink" the coordinates if the 3D fix is lost after initially being established. Alerts the user that the coordinate display may be inaccurate or no longer being updated. We want to keep the coordinates displayed to aid recovery if the user loses the fix (like crashing upside down).

Replace GPS defines `LAT` and `LON` used throughout the code with the enumeration:
```
typedef enum {
    GPS_LATITUDE,
    GPS_LONGITUDE
} gpsCoordinateType_e;
```

The Open Location Code option is bounded with `USE_GPS_PLUS_CODE` to allow it to be excluded if needed for targets with limited flash space. It currently fits for F411 but we may have to remove it in the future.
2021-04-26 23:43:11 +12:00
Steve Evans
823d0edf99 [H7][LIB] Remove duplicate definition of assert_param from LL spi 2021-04-03 14:03:54 +01:00
Steve Evans
f71bb41166 Fix H7 USB MSC support to use same structure naming as F7, and to ensure that data buffers are cache aligned so that USB, SD card and QSPI DMAs function correctly 2020-10-08 21:08:10 +01:00
jflyper
f2810551e7 [H7][LIB][SDMMC] Workaround for SDMMC Errata 2.11.4
Application of

STM32H750 - Apply workaround to the SDMMC Errata 2.11.4 (8446832)

to V1.6.0
2020-09-14 11:09:37 +09:00
jflyper
0397a1618a [H7][LIB][USB] Middlewares change: Fix memory corruption
Application of
[H7] USB LIB Middlewares change: Avoid null hhid from being deferenced
to V1.6.0
2020-09-14 11:09:37 +09:00
jflyper
fd11348dce [H7][LIB][USB] Modify USB Library for composite device
Includes changes from 4e487f6
2020-09-14 11:09:21 +09:00
jflyper
c3f2632405 [H7][LIB] Remove duplicate definition of assert_param from LL dma & Tim 2020-09-14 11:07:25 +09:00
jflyper
5b75338aff [H7][LIB] Revert some function in stm32h7xx_hal_tim.h to global
TIM_DMADelayPulseCplt (HAL_TIM_DMADelayPulseCplt) was changed to static
in 1.7 or 1.8, but this will cause timer_hal.c which uses
HAL_TIM_DMADelayPulseCplt not to build.
2020-09-14 11:07:25 +09:00
jflyper
c4fbe44e28 [H7][LIB] Take care of UNUSED parameters in V1.8.0 2020-09-14 11:07:25 +09:00
jflyper
2b16f050ab [H7][LIB] Modify HAL SPI driver for const-ness 2020-09-14 11:07:25 +09:00
jflyper
a88bc07769 [H7][LIB][USB] usbd_def: disable insane defs of MIN and MAX 2020-09-14 11:07:25 +09:00
jflyper
8d74d61b70 [H7][LIB][USB] Import "Middleware" from V1.8.0 distribution 2020-09-14 11:07:24 +09:00
jflyper
b1172b9cd2 [H7][LIB] Import FW V1.8.0 library 2020-09-14 11:07:24 +09:00
jflyper
35cdd784fa [H7][LIB] Remove V1.6.0 FW library 2020-09-14 11:07:16 +09:00
Davor Kustec
3c6a37007d Fixes from review + new PR 2020-08-31 16:40:38 +02:00