Fixed some more mockup drivers
This commit is contained in:
@@ -193,7 +193,7 @@ static void extmoduleWaitForTxCompleted()
|
||||
#endif
|
||||
}
|
||||
|
||||
etx_serial_driver_t ExtmoduleSerialDriver = {
|
||||
const etx_serial_driver_t ExtmoduleSerialDriver = {
|
||||
.init = extmoduleSerialStart,
|
||||
.deinit = extmoduleSerialStop,
|
||||
.sendByte = extmoduleSendByte,
|
||||
|
||||
@@ -37,4 +37,4 @@ void extmoduleFifoError();
|
||||
void extmodulePxx1SerialStart();
|
||||
#endif
|
||||
|
||||
extern etx_serial_driver_t ExtmoduleSerialDriver;
|
||||
extern const etx_serial_driver_t ExtmoduleSerialDriver;
|
||||
|
||||
@@ -19,6 +19,8 @@ set(SIMU_SRC
|
||||
module_drivers.cpp
|
||||
led_driver.cpp
|
||||
backlight_driver.cpp
|
||||
gyro_driver.cpp
|
||||
bt_driver.cpp
|
||||
)
|
||||
|
||||
if(SIMU_DISKIO)
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (C) EdgeTX
|
||||
*
|
||||
* Based on code named
|
||||
* opentx - https://github.com/opentx/opentx
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "fifo.h"
|
||||
|
||||
//#define BT_TX_FIFO_SIZE 64
|
||||
Fifo<uint8_t, 2> btTxFifo;
|
||||
Fifo<uint8_t, 2> btRxFifo;
|
||||
|
||||
void bluetoothInit(unsigned int, bool) {}
|
||||
void bluetoothDisable() {}
|
||||
|
||||
void bluetoothWriteWakeup() {}
|
||||
bool bluetoothIsWriting() { return false; }
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) EdgeTX
|
||||
*
|
||||
* Based on code named
|
||||
* opentx - https://github.com/opentx/opentx
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
void gyroRead() {}
|
||||
void gyroRead(unsigned char*) {}
|
||||
@@ -21,19 +21,26 @@
|
||||
|
||||
#include "hal/serial_driver.h"
|
||||
#include "intmodule_serial_driver.h"
|
||||
#include "extmodule_serial_driver.h"
|
||||
|
||||
#include "io/frsky_pxx2.h"
|
||||
ModuleFifo intmoduleFifo;
|
||||
ModuleFifo extmoduleFifo;
|
||||
|
||||
void intmoduleStop() {}
|
||||
void intmoduleFifoError() {}
|
||||
void intmoduleFifoReceive(uint8_t){}
|
||||
|
||||
void intmodulePxx1PulsesStart() {}
|
||||
void intmoduleSendNextFramePxx1() {}
|
||||
|
||||
void extmoduleStop() {}
|
||||
void extmoduleFifoError() {}
|
||||
void extmoduleFifoReceive(uint8_t){}
|
||||
|
||||
void extmodulePpmStart() {}
|
||||
void extmoduleSerialStart() {}
|
||||
void extmodulePxx1SerialStart() {}
|
||||
void extmodulePxx1PulsesStart() {}
|
||||
void extmoduleSendInvertedByte(uint8_t) {}
|
||||
void extmoduleSendNextFramePxx1(void const*, unsigned short) {}
|
||||
@@ -70,3 +77,13 @@ const etx_serial_driver_t IntmoduleSerialDriver = {
|
||||
.setReceiveCb = nullptr,
|
||||
.setOnErrorCb = nullptr,
|
||||
};
|
||||
|
||||
const etx_serial_driver_t ExtmoduleSerialDriver = {
|
||||
.init = init,
|
||||
.deinit = deinit,
|
||||
.sendByte = sendByte,
|
||||
.sendBuffer = sendBuffer,
|
||||
.waitForTxCompleted = waitForTxCompleted,
|
||||
.setReceiveCb = nullptr,
|
||||
.setOnErrorCb = nullptr,
|
||||
};
|
||||
|
||||
@@ -64,6 +64,8 @@ if(GTEST_INCDIR AND GTEST_SRCDIR AND Qt5Widgets_FOUND)
|
||||
../targets/simu/module_drivers.cpp
|
||||
../targets/simu/led_driver.cpp
|
||||
../targets/simu/backlight_driver.cpp
|
||||
../targets/simu/gyro_driver.cpp
|
||||
../targets/simu/bt_driver.cpp
|
||||
)
|
||||
add_dependencies(gtests-radio ${RADIO_DEPENDENCIES} ${FIRMWARE_DEPENDENCIES} gtests-radio-lib)
|
||||
if(PCB STREQUAL X12S OR PCB STREQUAL X10)
|
||||
|
||||
Reference in New Issue
Block a user