feat: trainer SBUS processing in IDLE IRQ (#5672)

This commit is contained in:
3djc
2024-11-25 10:58:53 +10:00
committed by GitHub
parent b35baecfb9
commit 7594a47a2d
5 changed files with 65 additions and 102 deletions
+9 -10
View File
@@ -21,18 +21,17 @@
#pragma once
#include "hal/serial_driver.h"
#define SBUS_BAUDRATE 100000
#define SBUS_FRAME_SIZE 25
// Setup SBUS AUX serial input
void sbusSetAuxGetByte(void* ctx, int (*fct)(void*, uint8_t*));
// SBUS serial driver + context
void sbusSetReceiveCtx(void* ctx, const etx_serial_driver_t* drv);
// SBUS AUX serial getter:
// if set, it will fetch data from the handler set
// with sbusSetAuxGetByte()
int sbusAuxGetByte(uint8_t* byte);
// SBUS AUX idle callback
void sbusAuxFrameReceived(void* param);
// Setup general SBUS input source
void sbusSetGetByte(int (*fct)(uint8_t*));
// Enable / disable SBUS AUX
void sbusAuxSetEnabled(bool enabled);
void processSbusInput();
void sbusFrameReceived(void* param);