feat: Flysky PL18 Support (#4105)

Co-authored-by: raphaelcoeffic <raphael.coeffic@frafos.com>
Co-authored-by: rotorman <risto.koiva@web.de>
Co-authored-by: Xy201207 <yaoxu@flysky.com>
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
This commit is contained in:
richardclli
2023-12-06 09:00:44 +10:00
committed by GitHub
co-authored by raphaelcoeffic rotorman Xy201207 Peter Feerick
parent 5153aaeea0
commit cc17046e7a
128 changed files with 9178 additions and 171 deletions
@@ -47,6 +47,9 @@ constexpr uint8_t n_ADC_spi = DIM(_ADC_spi);
constexpr uint8_t n_GPIO = DIM(_ADC_GPIOs);
constexpr uint8_t n_inputs = DIM(_ADC_inputs);
static_assert(n_inputs <= MAX_ADC_INPUTS, "Too many ADC inputs");
static_assert(n_inputs <= MAX_ANALOG_INPUTS, "Too many analog inputs");
static bool adc_init()
{
bool success = stm32_hal_adc_init(_ADC_adc, n_ADC, _ADC_inputs, _ADC_GPIOs, n_GPIO);
+7 -3
View File
@@ -26,23 +26,27 @@
#include "stm32_keys.inc"
void keysInit()
#define __weak __attribute__((weak))
__weak void keysInit()
{
_init_keys();
_init_trims();
}
uint32_t readKeys()
__weak uint32_t readKeys()
{
return _read_keys();
}
uint32_t readTrims()
__weak uint32_t readTrims()
{
uint32_t trims = _read_trims();
#if defined(PCBXLITE)
if (_read_keys() & (1 << KEY_SHIFT))
return ((trims & 0x03) << 6) | ((trims & 0x0c) << 2);
#endif
return trims;
}
@@ -28,6 +28,7 @@
#include "board.h"
#include "dataconstants.h"
#if defined (HARDWARE_INTERNAL_MODULE)
#if defined(INTMODULE_USART)
#define INTMODULE_USART_IRQ_PRIORITY 5
@@ -110,7 +111,8 @@ extern "C" void INTMODULE_TIMER_IRQHandler()
DEFINE_STM32_SOFTSERIAL_PORT(InternalModule, intmoduleTimer);
#endif
#endif // INTMODULE_USART
#endif // HARDWARE_INTERNAL_MODULE
#include "module_timer_driver.h"