Commit Graph
145 Commits
Author SHA1 Message Date
Raphael CoefficandGitHub 72193eda82 chore: New module/serial API (#3055)
* WiP: new module interface

* WiP: softserial timer DMA

* WiP: setup() and send() in one step

and remove methods specific to internal or external module

* fixes and extra port config

* horus targets

* module ports have moved

* T8 support (only internal module)

* fix nv14

* stupid GCC....

* disable BT

* remove nv14 telem driver

* remove old aux serial driver

* Move module buffers out of pulses.h

* Soft serial fixes and PXX1 support

* Fixed PPM module output

* Fixed CLI

* compilation fixes

* Ported bluetooth and flysky gimbal to new serial driver

* Re-enable soft-serial RX

* fixes and cleanup

* nv14 fixes

* Fix flysky gimbals

* Ghost module

* 16 bytes of RAM

* Remove getByte from module API

* Ghost cleanup

* fix: _half_duplex_input() must be called after usart init

* WiP

* more cleanup

* Remove board specific settings from PXX1 / PXX2 drivers

* A bit of PXX2 header cleanup

* Add support for OVER8 and ONEBIT

* Add some support for inverters (NV14 / EL18)

* Support NV14 power fixes in generic board

* Fix polarity handling

* Fix RX DMA

* Fix mixer not running

* Add soft-serial polarity control

* Quick fix for telemetry polling while module port is changed

* Fix bootloader DEBUG

* Fix MPM telemetry

* Fix pulse start

* DSM2 soft-serial fallback

* DSMP async module restart

* Fix CRSF LUA upstream

* Remove global variable telemetryProtocol

* Use HAL/LL constants

* Fix various issue with AFHDS3 and NV14/EL18 internal module

* Fixed S.PORT unit tests

* fix: update widx after writing at current index

* fix: init error condition

* Fix: possible infinite loop in _find_port()

* Add support for bidir S.PORT init

* Add support for "getLastByte" in HW serial driver

* PXX1: Add support for S.PORT based on IDLE callback

* Fix rebase error

* Fix softserial _rx_fifo_push()

* Add softserial support for waitForTxCompleted()

* Fix MPM flashing (internal / external)

* Fixed external MPM

* Activate RX DMA on internal module

Seems to work with serial passthrough without issues, at least on the L3R PRO.

* Fix softserial DMA on stdlcd F4 targets

* Add softserial support for 32bit timers (mostly TIM2)

* More precise soft-serial

* Fix MPM update using inverters & HW uart

* Raise S.PORT DMA/USART IRQ prio to achieve faster switching to input

* Remove useless delays

* Fix flashing external ELRS module

* Added a retry mechanism for FrSky S.PORT update

* Remove useless enableRx()

* External FrSky modules are all flashed via S.PORT

* Remove power management unit update

This was only used on the first batch of X-lite.
2023-02-09 19:44:32 +10:00
MichaelandGitHub 34ea422e39 chore: freeRTOS task stack diagnostics (#2976)
* migrated stack diagnostics (available, free) to using built in FreeRTOS builtin function

Note: main stack must be and is treated differently as it is not under FreeRTOS control. main stack is painted by the STM32 startup routine. free main stack is calculated checking the remaining painted stack area.

* corrected my merge error

* missed a blank
2023-01-15 11:48:04 +10:00
Raphael CoefficandGitHub 78e99311c8 feat(GT911): Add CLI command to reset touch panel cfg (#2351)
* GT911: add CLI command to reset config

Related to #2063

* X12S: touch coordinate inversion in GT911 config

Note: config reset with CLI "reset_gt911" required.

* Remove touch sensor software inversion
2022-09-25 20:27:22 +10:00
RistoGitHubNiel Horne (elecpower), Raphael Coeffic (raphaelcoeffic) and Peter Feerick (pfeerick).
9dc4065525 feat: Add support for SpaceMouse mod (6D input knob) (#1853)
Use `-DSPACEMOUSE=YES` CMake option to activate on Horus color targets.
Co-authored-by: Niel Horne (elecpower), Raphael Coeffic (raphaelcoeffic) and Peter Feerick (pfeerick).
2022-09-18 09:23:48 +02:00
Raphael CoefficandRaphael Coeffic c56b62bd1d Fix passthrough baudrate detection 2022-08-11 12:15:46 +02:00
Raphael CoefficandRaphael Coeffic 4e08e8f6ad Fix UART context in serial passthrough 2022-08-11 12:15:46 +02:00
Raphael CoefficandRaphael Coeffic f952c5f7c7 Internal and external module buffers are now private 2022-08-11 12:15:46 +02:00
Raphael CoefficandRaphael Coeffic 69955e5dd1 some fixes for DEBUG 2022-06-11 15:38:08 +02:00
Raphael CoefficandRaphael Coeffic f6565c6826 Horus fixes 2022-06-11 15:38:08 +02:00
Raphael CoefficandRaphael Coeffic ee0c37157d Remove legacy fonts and make the bootloader compile with LVGL 2022-06-11 15:38:08 +02:00
Raphael Coeffic c11d7d58ae Moved FreeRTOS to an object library
This also allows for reducing the propagated includes and thus avoid name clashes to FreeRTOS.
2022-04-03 17:50:53 +02:00
Peter FeerickandGitHub dbb9a5e4b2 chore: Introduce FreeRTOS Software timers
Introduce FreeRTOS Software timers
2022-03-31 16:26:38 +10:00
Peter FeerickandGitHub 7b617c1b50 fix: LUA=N compile fixes, radio hardware tab bottom padding (for touch) (#1755)
* Fix `LUA=N` compile breakage and tidyup on NV14

* Alignment and padding
Resolves #1751 but incomplete solution,
as the real cuplrit appears to somehow
be in `InternalModuleWindow`
2022-03-31 11:52:17 +10:00
Raphael Coeffic a994fc708a WiP internal module buffer 2022-03-25 18:15:56 +01:00
Jonathan HudsonandGitHub 3732d7623f implement canonial terminal back delete (#1712) 2022-03-21 12:58:10 +10:00
Raphael Coeffic 4bdd7e7ea7 GPS support at runtime 2022-03-20 16:30:58 +01:00
Raphael Coeffic b39baa2360 Use USB VCP as a normal serial driver as well 2022-03-20 16:22:14 +01:00
Raphael Coeffic 530d395204 WiP 2022-03-20 16:22:14 +01:00
Raphael Coeffic 025659ac36 Add support for RX DMA 2022-03-20 16:22:14 +01:00
Raphael Coeffic f733810c79 WiP: refactor serial ports 2022-03-20 16:22:12 +01:00
Peter Feerick f0077d4f7e fix: cli typo from b2eb299d04 2022-02-02 12:19:50 +10:00
Peter Feerick b2eb299d04 fix: cli rfmod serial output glitch + add err msgs
Thanks to @CapnBry for spotting this ;)
2022-02-02 12:17:26 +10:00
Raphael CoefficandPeter Feerick 09c49e24ee Remove SKY9X target 2022-01-29 14:40:17 +10:00
Raphael CoefficandGitHub 0ee144dd25 Remove useless DEBUG_TASKS (not supported on FreeRTOS) (#1448) 2022-01-21 12:59:45 +10:00
Raphael Coeffic 37dd890714 Reverted BOOTCMD pin 2021-12-17 15:17:49 +01:00
Raphael Coeffic 1fb06a7c3a Do not use DMA based send in passthrough mode
The USB buffer could be located and CCM, which does not work with DMA.
2021-12-17 15:17:49 +01:00
Raphael Coeffic cd4b782cfe Prepare intmodule bootpin 2021-12-17 15:17:49 +01:00
Raphael CoefficandRaphael Coeffic 5bbc055f3e Remove debug pins 2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic a2b7f88e41 Added command to start/stop the pulses 2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic 81da0bf587 Added power and bootpin commands (Thx @pkendall64) 2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic 85ec133ff3 Auto baudrate on serialpassthrough
baudrate param becomes optional
2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic c5c2829c24 Added baud rate changing on the fly to serial pass through 2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic f3301e6210 Added control line and bitrate callbacks
And some additional clean-up
2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic 01059da849 Fixed serial passthrough exit when pulling USB cable 2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic aa7b0143bd Add active polling on UART buffer and bigger USB buffers 2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic 96743a9fc4 PoC: connect USB/serial ISR directly to the respective serial send
This assumes that USB IRQ has a lower logical prio as the UART IRQ so that it can be pre-empted by the USART ISR.
2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic 3e390bd582 Cleanup debug pin toggle 2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic 73790c1654 Use FreeRTOS stream buffers and task notifications 2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic 4124d0a950 Quick and dirty: use a memory address actually usable with DMA 2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic 0cef967912 Fix typo 2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic ffd537a28b Fixed compiling with DEBUG=ON 2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic c8a4a80ffd Serial pass-through 2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic 6b94c2f45d Small fixes for TX16S 2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic b1b3423844 Use stream buffer for CLI 2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic 7cfcac3e1e Fix compiling with CLI and define most commands away 2021-11-21 11:18:35 +01:00
rotormanandRisto fc2142ec78 Changed uniformly to EdgeTX boiler plate (also added boiler for files that were missing it). 2021-10-02 14:22:01 +02:00
jfrickmannandRaphael Coeffic 95b87db3e0 Did a scripted search and replace to replace 40 existing theme colors with 11 new theme colors. 2021-08-22 19:39:50 +02:00
Raphael Coeffic d4edb7713e WiP: FreeRTOS integration 2021-07-31 17:31:49 +02:00
Raphael Coeffic 00e4194a70 Replace proprietary libAccess 2021-07-20 13:52:29 +02:00
3djc 70d24506da Merge branch '2.3' into 2.4
# Conflicts:
#	radio/src/fonts/480x272/font_dblsize.png
#	radio/src/fonts/480x272/font_xxlsize.png
#	radio/src/gui/128x64/model_setup.cpp
#	radio/src/gui/128x64/radio_setup.cpp
#	radio/src/gui/480x272/model_receiver_options.cpp
#	radio/src/gui/480x272/model_setup.cpp
#	radio/src/gui/480x272/radio_calibration.cpp
#	radio/src/gui/480x272/radio_hardware.cpp
#	radio/src/gui/common/stdlcd/draw_functions.cpp
#	radio/src/gui/gui_common.cpp
#	radio/src/keys.h
#	radio/src/lua/interface.cpp
#	radio/src/pulses/afhds3.h
#	radio/src/rtos.h
#	radio/src/switches.cpp
#	radio/src/targets/common/arm/stm32/aux_serial_driver.cpp
#	radio/src/targets/horus/CMakeLists.txt
#	radio/src/targets/horus/lcd_driver.cpp
#	radio/src/targets/horus/startup_stm32f42_43xxx.s
#	radio/src/targets/taranis/CMakeLists.txt
#	radio/src/telemetry/crossfire.h
#	radio/src/telemetry/multi.cpp
#	radio/src/translations.cpp
#	radio/src/translations/it.h.txt
#	radio/src/translations/untranslated.h
#	radio/util/font2png.py
#	tools/commit-tests.sh
2021-04-08 11:42:28 +02:00