feat: support for RadioMaster GX12 (#5703)
Co-authored-by: raphaelcoeffic <1050031+raphaelcoeffic@users.noreply.github.com> Co-authored-by: philmoz <phil.a.mitchell@gmail.com> Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
This commit is contained in:
co-authored by
raphaelcoeffic
philmoz
Peter Feerick
parent
0f86cd9a95
commit
36cdd93a1a
@@ -35,10 +35,10 @@
|
||||
|
||||
static const stm32_usart_t fsUSART = {
|
||||
.USARTx = FLYSKY_HALL_SERIAL_USART,
|
||||
.txGPIO = GPIO_UNDEF,
|
||||
.txGPIO = FLYSKY_HALL_SERIAL_TX_GPIO,
|
||||
.rxGPIO = FLYSKY_HALL_SERIAL_RX_GPIO,
|
||||
.IRQn = FLYSKY_HALL_SERIAL_USART_IRQn,
|
||||
.IRQ_Prio = 6,
|
||||
.IRQ_Prio = 4,
|
||||
.txDMA = nullptr,
|
||||
.txDMA_Stream = 0,
|
||||
.txDMA_Channel = 0,
|
||||
@@ -49,6 +49,13 @@ static const stm32_usart_t fsUSART = {
|
||||
|
||||
DEFINE_STM32_SERIAL_PORT(FSGimbal, fsUSART, HALLSTICK_BUFF_SIZE, 0);
|
||||
|
||||
static const etx_serial_port_t _fs_gimbal_serial_port = {
|
||||
.name = "gimbals",
|
||||
.uart = &STM32SerialDriver,
|
||||
.hw_def = REF_STM32_SERIAL_PORT(FSGimbal),
|
||||
.set_pwr = nullptr,
|
||||
};
|
||||
|
||||
static STRUCT_HALL HallProtocol = { 0 };
|
||||
|
||||
static void* _fs_usart_ctx = nullptr;
|
||||
@@ -150,7 +157,7 @@ static void flysky_gimbal_loop(void*)
|
||||
}
|
||||
}
|
||||
|
||||
static void flysky_gimbal_deinit()
|
||||
void flysky_gimbal_deinit()
|
||||
{
|
||||
STM32SerialDriver.deinit(_fs_usart_ctx);
|
||||
}
|
||||
@@ -181,3 +188,8 @@ bool flysky_gimbal_init()
|
||||
flysky_gimbal_deinit();
|
||||
return false;
|
||||
}
|
||||
|
||||
const etx_serial_port_t* flysky_gimbal_get_port()
|
||||
{
|
||||
return &_fs_gimbal_serial_port;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user