WiP: refactor serial ports
This commit is contained in:
@@ -411,6 +411,7 @@ if(INTERNAL_MODULE_SERIAL)
|
||||
set(TARGET_SRC
|
||||
${TARGET_SRC}
|
||||
../common/arm/stm32/intmodule_serial_driver.cpp
|
||||
../common/arm/stm32/stm32_usart_driver.cpp
|
||||
)
|
||||
|
||||
else()
|
||||
|
||||
@@ -115,12 +115,8 @@ uint32_t isFirmwareStart(const uint8_t * buffer);
|
||||
uint32_t isBootloaderStart(const uint8_t * buffer);
|
||||
|
||||
// Pulses driver
|
||||
#define INTERNAL_MODULE_ON() GPIO_SetBits(INTMODULE_PWR_GPIO, INTMODULE_PWR_GPIO_PIN)
|
||||
#if defined(INTMODULE_USART)
|
||||
#define INTERNAL_MODULE_OFF() intmoduleStop()
|
||||
#else
|
||||
#define INTERNAL_MODULE_OFF() GPIO_ResetBits(INTMODULE_PWR_GPIO, INTMODULE_PWR_GPIO_PIN)
|
||||
#endif
|
||||
#define INTERNAL_MODULE_ON() GPIO_SetBits(INTMODULE_PWR_GPIO, INTMODULE_PWR_GPIO_PIN)
|
||||
#define INTERNAL_MODULE_OFF() GPIO_ResetBits(INTMODULE_PWR_GPIO, INTMODULE_PWR_GPIO_PIN)
|
||||
|
||||
#if (defined(INTERNAL_MODULE_PXX1) || defined(INTERNAL_MODULE_PXX2)) && (!defined(PCBX9LITE) || defined(PCBX9LITES))
|
||||
#define HARDWARE_INTERNAL_RAS
|
||||
|
||||
@@ -350,7 +350,9 @@ void extmoduleSendNextFrame()
|
||||
|
||||
#if defined(CROSSFIRE)
|
||||
case PROTOCOL_CHANNELS_CROSSFIRE:
|
||||
sportSendBuffer(extmodulePulsesData.crossfire.pulses, extmodulePulsesData.crossfire.length);
|
||||
if (CrossfireModuleDriver.sendPulses) {
|
||||
CrossfireModuleDriver.sendPulses((void*)EXTERNAL_MODULE);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user