mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 20:35:33 +03:00
Remove spektrum and sumd's dependencies on the mw.h/board.h files.
This commit is contained in:
parent
0f02e12f40
commit
c658e31b62
2 changed files with 26 additions and 6 deletions
|
@ -1,5 +1,13 @@
|
||||||
#include "board.h"
|
#include <stdbool.h>
|
||||||
#include "mw.h"
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
#include "drivers/system_common.h"
|
||||||
|
|
||||||
|
#include "drivers/serial_common.h"
|
||||||
|
#include "drivers/serial_uart.h"
|
||||||
|
#include "runtime_config.h"
|
||||||
|
|
||||||
#include "rx_common.h"
|
#include "rx_common.h"
|
||||||
|
|
||||||
|
@ -22,9 +30,9 @@ static uint16_t spektrumReadRawRC(rxConfig_t *rxConfig, uint8_t chan);
|
||||||
// external vars (ugh)
|
// external vars (ugh)
|
||||||
extern int16_t failsafeCnt;
|
extern int16_t failsafeCnt;
|
||||||
|
|
||||||
void spektrumInit(rcReadRawDataPtr *callback)
|
void spektrumInit(rxConfig_t*rxConfig, rcReadRawDataPtr *callback)
|
||||||
{
|
{
|
||||||
switch (mcfg.rxConfig.serialrx_type) {
|
switch (rxConfig->serialrx_type) {
|
||||||
case SERIALRX_SPEKTRUM2048:
|
case SERIALRX_SPEKTRUM2048:
|
||||||
// 11 bit frames
|
// 11 bit frames
|
||||||
spek_chan_shift = 3;
|
spek_chan_shift = 3;
|
||||||
|
|
|
@ -1,5 +1,17 @@
|
||||||
#include "board.h"
|
#include <stdbool.h>
|
||||||
#include "mw.h"
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
#include "drivers/system_common.h"
|
||||||
|
|
||||||
|
#include "drivers/serial_common.h"
|
||||||
|
#include "drivers/serial_uart.h"
|
||||||
|
#include "runtime_config.h"
|
||||||
|
|
||||||
|
#include "failsafe.h"
|
||||||
|
|
||||||
|
#include "rx_common.h"
|
||||||
|
|
||||||
// driver for SUMD receiver using UART2
|
// driver for SUMD receiver using UART2
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue