chore: New module/serial API (#3055)
* WiP: new module interface * WiP: softserial timer DMA * WiP: setup() and send() in one step and remove methods specific to internal or external module * fixes and extra port config * horus targets * module ports have moved * T8 support (only internal module) * fix nv14 * stupid GCC.... * disable BT * remove nv14 telem driver * remove old aux serial driver * Move module buffers out of pulses.h * Soft serial fixes and PXX1 support * Fixed PPM module output * Fixed CLI * compilation fixes * Ported bluetooth and flysky gimbal to new serial driver * Re-enable soft-serial RX * fixes and cleanup * nv14 fixes * Fix flysky gimbals * Ghost module * 16 bytes of RAM * Remove getByte from module API * Ghost cleanup * fix: _half_duplex_input() must be called after usart init * WiP * more cleanup * Remove board specific settings from PXX1 / PXX2 drivers * A bit of PXX2 header cleanup * Add support for OVER8 and ONEBIT * Add some support for inverters (NV14 / EL18) * Support NV14 power fixes in generic board * Fix polarity handling * Fix RX DMA * Fix mixer not running * Add soft-serial polarity control * Quick fix for telemetry polling while module port is changed * Fix bootloader DEBUG * Fix MPM telemetry * Fix pulse start * DSM2 soft-serial fallback * DSMP async module restart * Fix CRSF LUA upstream * Remove global variable telemetryProtocol * Use HAL/LL constants * Fix various issue with AFHDS3 and NV14/EL18 internal module * Fixed S.PORT unit tests * fix: update widx after writing at current index * fix: init error condition * Fix: possible infinite loop in _find_port() * Add support for bidir S.PORT init * Add support for "getLastByte" in HW serial driver * PXX1: Add support for S.PORT based on IDLE callback * Fix rebase error * Fix softserial _rx_fifo_push() * Add softserial support for waitForTxCompleted() * Fix MPM flashing (internal / external) * Fixed external MPM * Activate RX DMA on internal module Seems to work with serial passthrough without issues, at least on the L3R PRO. * Fix softserial DMA on stdlcd F4 targets * Add softserial support for 32bit timers (mostly TIM2) * More precise soft-serial * Fix MPM update using inverters & HW uart * Raise S.PORT DMA/USART IRQ prio to achieve faster switching to input * Remove useless delays * Fix flashing external ELRS module * Added a retry mechanism for FrSky S.PORT update * Remove useless enableRx() * External FrSky modules are all flashed via S.PORT * Remove power management unit update This was only used on the first batch of X-lite.
This commit is contained in:
@@ -21,6 +21,9 @@
|
||||
|
||||
#if !defined(DISABLE_MULTI_UPDATE)
|
||||
|
||||
#include "hal.h"
|
||||
#include "hal/module_port.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include "opentx.h"
|
||||
#include "multi_firmware_update.h"
|
||||
@@ -40,181 +43,121 @@
|
||||
#include "io/multi_protolist.h"
|
||||
#endif
|
||||
|
||||
#if defined(INTMODULE_USART)
|
||||
#include "intmodule_serial_driver.h"
|
||||
#endif
|
||||
|
||||
#include "extmodule_driver.h"
|
||||
|
||||
#define UPDATE_MULTI_EXT_BIN ".bin"
|
||||
|
||||
class MultiFirmwareUpdateDriver
|
||||
{
|
||||
public:
|
||||
MultiFirmwareUpdateDriver() {}
|
||||
virtual ~MultiFirmwareUpdateDriver() {}
|
||||
const char* flashFirmware(FIL* file, const char* label,
|
||||
ProgressHandler progressHandler);
|
||||
ModuleIndex module;
|
||||
MultiModuleType type;
|
||||
|
||||
protected:
|
||||
virtual void moduleOn() const = 0;
|
||||
virtual void init(bool inverted) = 0;
|
||||
virtual bool getByte(uint8_t & byte) const = 0;
|
||||
virtual void sendByte(uint8_t byte) const = 0;
|
||||
virtual void clear() const = 0;
|
||||
virtual void deinit(bool inverted) {}
|
||||
etx_module_state_t* mod_st = nullptr;
|
||||
|
||||
private:
|
||||
bool getRxByte(uint8_t & byte) const;
|
||||
bool checkRxByte(uint8_t byte) const;
|
||||
const char * waitForInitialSync(bool& inverted);
|
||||
const char * getDeviceSignature(uint8_t * signature) const;
|
||||
const char * loadAddress(uint32_t offset) const;
|
||||
const char * progPage(uint8_t * buffer, uint16_t size) const;
|
||||
void leaveProgMode(bool inverted);
|
||||
bool init();
|
||||
bool getByte(uint8_t& byte) const;
|
||||
void sendByte(uint8_t byte) const;
|
||||
void sendBuffer(uint8_t* buffer, uint16_t size) const;
|
||||
void clear() const;
|
||||
void deinit();
|
||||
|
||||
bool getRxByte(uint8_t& byte) const;
|
||||
bool checkRxByte(uint8_t byte) const;
|
||||
const char* waitForInitialSync();
|
||||
const char* getDeviceSignature(uint8_t* signature) const;
|
||||
const char* loadAddress(uint32_t offset) const;
|
||||
const char* progPage(uint8_t* buffer, uint16_t size) const;
|
||||
void leaveProgMode();
|
||||
|
||||
public:
|
||||
MultiFirmwareUpdateDriver(ModuleIndex module, MultiModuleType type) :
|
||||
module(module), type(type)
|
||||
{
|
||||
}
|
||||
|
||||
const char* flashFirmware(FIL* file, const char* label,
|
||||
ProgressHandler progressHandler);
|
||||
};
|
||||
|
||||
#if defined(INTERNAL_MODULE_MULTI)
|
||||
|
||||
static const etx_serial_init serialInitParams = {
|
||||
.baudrate = 0,
|
||||
.parity = ETX_Parity_None,
|
||||
.stop_bits = ETX_StopBits_One,
|
||||
.word_length = ETX_WordLength_8,
|
||||
.rx_enable = true,
|
||||
.baudrate = 57600,
|
||||
.encoding = ETX_Encoding_8N1,
|
||||
.direction = ETX_Dir_TX_RX,
|
||||
.polarity = ETX_Pol_Normal,
|
||||
};
|
||||
|
||||
class MultiInternalUpdateDriver: public MultiFirmwareUpdateDriver
|
||||
bool MultiFirmwareUpdateDriver::init()
|
||||
{
|
||||
public:
|
||||
MultiInternalUpdateDriver() {}
|
||||
|
||||
protected:
|
||||
void* uart_ctx = nullptr;
|
||||
|
||||
void moduleOn() const override
|
||||
{
|
||||
INTERNAL_MODULE_ON();
|
||||
if (type == MULTI_TYPE_MULTIMODULE && module == INTERNAL_MODULE) {
|
||||
// duplex internal USART
|
||||
mod_st = modulePortInitSerial(INTERNAL_MODULE, ETX_MOD_PORT_UART, &serialInitParams);
|
||||
} else if (type == MULTI_TYPE_MULTIMODULE && module == EXTERNAL_MODULE) {
|
||||
// TX on PPM (inverted softserial)
|
||||
etx_serial_init params(serialInitParams);
|
||||
params.direction = ETX_Dir_TX;
|
||||
params.polarity = ETX_Pol_Inverted;
|
||||
mod_st = modulePortInitSerial(EXTERNAL_MODULE, ETX_MOD_PORT_UART, ¶ms);
|
||||
if (!mod_st) {
|
||||
params.polarity = ETX_Pol_Normal;
|
||||
mod_st = modulePortInitSerial(EXTERNAL_MODULE, ETX_MOD_PORT_SOFT_INV, ¶ms);
|
||||
if (!mod_st) return false;
|
||||
}
|
||||
|
||||
void init(bool inverted) override
|
||||
{
|
||||
etx_serial_init params(serialInitParams);
|
||||
params.baudrate = 57600;
|
||||
uart_ctx = IntmoduleSerialDriver.init(¶ms);
|
||||
// RX on S.PORT (inverted softserial)
|
||||
params.direction = ETX_Dir_RX;
|
||||
params.polarity = ETX_Pol_Inverted;
|
||||
if (!modulePortInitSerial(EXTERNAL_MODULE, ETX_MOD_PORT_SPORT, ¶ms)) {
|
||||
params.polarity = ETX_Pol_Normal;
|
||||
if (!modulePortInitSerial(EXTERNAL_MODULE, ETX_MOD_PORT_SPORT_INV, ¶ms)) {
|
||||
modulePortDeInit(mod_st);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else if (type == MULTI_TYPE_ELRS && module == EXTERNAL_MODULE) {
|
||||
// half-duplex on S.PORT USART
|
||||
mod_st = modulePortInitSerial(EXTERNAL_MODULE, ETX_MOD_PORT_SPORT, &serialInitParams);
|
||||
}
|
||||
|
||||
bool getByte(uint8_t & byte) const override
|
||||
{
|
||||
return IntmoduleSerialDriver.getByte(uart_ctx, &byte) > 0;
|
||||
}
|
||||
if (!mod_st) return false;
|
||||
|
||||
void sendByte(uint8_t byte) const override
|
||||
{
|
||||
IntmoduleSerialDriver.sendByte(uart_ctx, byte);
|
||||
}
|
||||
modulePortSetPower(module, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
void clear() const override
|
||||
{
|
||||
IntmoduleSerialDriver.clearRxBuffer(uart_ctx);
|
||||
}
|
||||
|
||||
void deinit(bool inverted) override
|
||||
{
|
||||
IntmoduleSerialDriver.deinit(uart_ctx);
|
||||
clear();
|
||||
uart_ctx = nullptr;
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(HARDWARE_EXTERNAL_MODULE)
|
||||
class MultiExternalUpdateDriver: public MultiFirmwareUpdateDriver
|
||||
bool MultiFirmwareUpdateDriver::getByte(uint8_t & byte) const
|
||||
{
|
||||
public:
|
||||
MultiExternalUpdateDriver() {}
|
||||
auto drv = modulePortGetSerialDrv(mod_st->rx);
|
||||
auto ctx = modulePortGetCtx(mod_st->rx);
|
||||
return drv->getByte(ctx, &byte) > 0;
|
||||
}
|
||||
|
||||
protected:
|
||||
void moduleOn() const override
|
||||
{
|
||||
EXTERNAL_MODULE_ON();
|
||||
}
|
||||
|
||||
void init(bool inverted) override
|
||||
{
|
||||
extmoduleInitTxPin();
|
||||
|
||||
if (inverted)
|
||||
telemetryPortInvertedInit(57600);
|
||||
else
|
||||
telemetryPortInit(57600, TELEMETRY_SERIAL_WITHOUT_DMA);
|
||||
}
|
||||
|
||||
bool getByte(uint8_t & byte) const override
|
||||
{
|
||||
return sportGetByte(&byte);
|
||||
}
|
||||
|
||||
void sendByte(uint8_t byte) const override
|
||||
{
|
||||
extmoduleSendInvertedByte(byte);
|
||||
}
|
||||
|
||||
void clear() const override
|
||||
{
|
||||
telemetryClearFifo();
|
||||
}
|
||||
|
||||
void deinit(bool inverted) override
|
||||
{
|
||||
if (inverted)
|
||||
telemetryPortInvertedInit(0);
|
||||
else
|
||||
telemetryPortInit(0, 0);
|
||||
|
||||
clear();
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
class MultiExtSportUpdateDriver: public MultiFirmwareUpdateDriver
|
||||
void MultiFirmwareUpdateDriver::sendByte(uint8_t byte) const
|
||||
{
|
||||
public:
|
||||
MultiExtSportUpdateDriver(): MultiFirmwareUpdateDriver() {}
|
||||
auto drv = modulePortGetSerialDrv(mod_st->tx);
|
||||
auto ctx = modulePortGetCtx(mod_st->tx);
|
||||
drv->sendByte(ctx, byte);
|
||||
}
|
||||
|
||||
protected:
|
||||
void moduleOn() const override
|
||||
{
|
||||
EXTERNAL_MODULE_ON();
|
||||
}
|
||||
void MultiFirmwareUpdateDriver::sendBuffer(uint8_t* buffer, uint16_t size) const
|
||||
{
|
||||
auto drv = modulePortGetSerialDrv(mod_st->tx);
|
||||
auto ctx = modulePortGetCtx(mod_st->tx);
|
||||
|
||||
void init(bool inverted) override
|
||||
{
|
||||
telemetryPortInit(57600, TELEMETRY_SERIAL_WITHOUT_DMA);
|
||||
}
|
||||
drv->waitForTxCompleted(ctx);
|
||||
drv->sendBuffer(ctx, buffer, size);
|
||||
drv->waitForTxCompleted(ctx);
|
||||
}
|
||||
|
||||
bool getByte(uint8_t & byte) const override
|
||||
{
|
||||
return sportGetByte(&byte);
|
||||
}
|
||||
void MultiFirmwareUpdateDriver::clear() const
|
||||
{
|
||||
auto drv = modulePortGetSerialDrv(mod_st->rx);
|
||||
auto ctx = modulePortGetCtx(mod_st->rx);
|
||||
drv->clearRxBuffer(ctx);
|
||||
}
|
||||
|
||||
void sendByte(uint8_t byte) const override
|
||||
{
|
||||
sportSendByte(byte);
|
||||
telemetryPortSetDirectionInput();
|
||||
}
|
||||
|
||||
void clear() const override
|
||||
{
|
||||
telemetryClearFifo();
|
||||
}
|
||||
|
||||
void deinit(bool inverted) override
|
||||
{
|
||||
telemetryPortInit(0, 0);
|
||||
clear();
|
||||
}
|
||||
};
|
||||
void MultiFirmwareUpdateDriver::deinit()
|
||||
{
|
||||
clear();
|
||||
modulePortSetPower(module, false);
|
||||
modulePortDeInit(mod_st);
|
||||
}
|
||||
|
||||
bool MultiFirmwareUpdateDriver::getRxByte(uint8_t & byte) const
|
||||
{
|
||||
@@ -241,7 +184,7 @@ bool MultiFirmwareUpdateDriver::checkRxByte(uint8_t byte) const
|
||||
return getRxByte(rxchar) ? rxchar == byte : false;
|
||||
}
|
||||
|
||||
const char * MultiFirmwareUpdateDriver::waitForInitialSync(bool & inverted)
|
||||
const char * MultiFirmwareUpdateDriver::waitForInitialSync()
|
||||
{
|
||||
uint8_t byte;
|
||||
int retries = 200;
|
||||
@@ -253,13 +196,6 @@ const char * MultiFirmwareUpdateDriver::waitForInitialSync(bool & inverted)
|
||||
clear();
|
||||
do {
|
||||
|
||||
// Invert at half-time
|
||||
if (retries == 100) {
|
||||
deinit(inverted);
|
||||
inverted = !inverted;
|
||||
init(inverted);
|
||||
}
|
||||
|
||||
// Send sync request
|
||||
sendByte(STK_GET_SYNC);
|
||||
sendByte(CRC_EOP);
|
||||
@@ -300,7 +236,6 @@ const char * MultiFirmwareUpdateDriver::getDeviceSignature(uint8_t * signature)
|
||||
// Read signature
|
||||
sendByte(STK_READ_SIGN);
|
||||
sendByte(CRC_EOP);
|
||||
clear();
|
||||
|
||||
if (!checkRxByte(STK_INSYNC))
|
||||
return STR_DEVICE_NO_RESPONSE;
|
||||
@@ -343,9 +278,7 @@ const char * MultiFirmwareUpdateDriver::progPage(uint8_t * buffer, uint16_t size
|
||||
// flash/eeprom flag
|
||||
sendByte(0);
|
||||
|
||||
for (uint16_t i = 0; i < size; i++) {
|
||||
sendByte(buffer[i]);
|
||||
}
|
||||
sendBuffer(buffer, size);
|
||||
|
||||
sendByte(CRC_EOP);
|
||||
|
||||
@@ -365,14 +298,14 @@ const char * MultiFirmwareUpdateDriver::progPage(uint8_t * buffer, uint16_t size
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void MultiFirmwareUpdateDriver::leaveProgMode(bool inverted)
|
||||
void MultiFirmwareUpdateDriver::leaveProgMode()
|
||||
{
|
||||
sendByte(STK_LEAVE_PROGMODE);
|
||||
sendByte(CRC_EOP);
|
||||
|
||||
// eat last sync byte
|
||||
checkRxByte(STK_INSYNC);
|
||||
deinit(inverted);
|
||||
deinit();
|
||||
}
|
||||
|
||||
const char* MultiFirmwareUpdateDriver::flashFirmware(
|
||||
@@ -388,25 +321,22 @@ const char* MultiFirmwareUpdateDriver::flashFirmware(
|
||||
#endif
|
||||
|
||||
const char * result = nullptr;
|
||||
moduleOn();
|
||||
|
||||
bool inverted = true; //false; // true
|
||||
init(inverted);
|
||||
if (!init()) return "Initialisation error";
|
||||
|
||||
/* wait 500ms for power on */
|
||||
watchdogSuspend(500 /*5s*/);
|
||||
RTOS_WAIT_MS(500);
|
||||
|
||||
result = waitForInitialSync(inverted);
|
||||
result = waitForInitialSync();
|
||||
if (result) {
|
||||
leaveProgMode(inverted);
|
||||
leaveProgMode();
|
||||
return result;
|
||||
}
|
||||
|
||||
unsigned char signature[4]; // 3 bytes signature + STK_OK
|
||||
result = getDeviceSignature(signature);
|
||||
if (result) {
|
||||
leaveProgMode(inverted);
|
||||
leaveProgMode();
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -415,7 +345,7 @@ const char* MultiFirmwareUpdateDriver::flashFirmware(
|
||||
uint32_t writeOffset = 0;
|
||||
|
||||
if (signature[0] != 0x1E) {
|
||||
leaveProgMode(inverted);
|
||||
leaveProgMode();
|
||||
return STR_DEVICE_FILE_WRONG_SIG;
|
||||
}
|
||||
|
||||
@@ -456,7 +386,7 @@ const char* MultiFirmwareUpdateDriver::flashFirmware(
|
||||
progressHandler(label, STR_WRITING, file->fptr, file->obj.objsize);
|
||||
}
|
||||
|
||||
leaveProgMode(inverted);
|
||||
leaveProgMode();
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -591,6 +521,7 @@ bool MultiDeviceFirmwareUpdate::flashFirmware(const char * filename, ProgressHan
|
||||
}
|
||||
f_lseek(&file, 0);
|
||||
|
||||
#if defined(HARDWARE_EXTERNAL_MODULE)
|
||||
if (module == EXTERNAL_MODULE) {
|
||||
if (!firmwareFile.isMultiExternalFirmware()) {
|
||||
f_close(&file);
|
||||
@@ -598,43 +529,29 @@ bool MultiDeviceFirmwareUpdate::flashFirmware(const char * filename, ProgressHan
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
#endif
|
||||
|
||||
#if defined(HARDWARE_INTERNAL_MODULE)
|
||||
if (module == INTERNAL_MODULE) {
|
||||
if (!firmwareFile.isMultiInternalFirmware()) {
|
||||
f_close(&file);
|
||||
POPUP_WARNING(STR_NEEDS_FILE, STR_INT_MULTI_SPEC);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
std::unique_ptr<MultiFirmwareUpdateDriver> driver;
|
||||
#if defined(INTERNAL_MODULE_MULTI)
|
||||
if (type == MULTI_TYPE_MULTIMODULE && module == INTERNAL_MODULE)
|
||||
driver.reset(new MultiInternalUpdateDriver());
|
||||
#endif
|
||||
#if defined(HARDWARE_EXTERNAL_MODULE)
|
||||
if (type == MULTI_TYPE_MULTIMODULE && module == EXTERNAL_MODULE)
|
||||
driver.reset(new MultiExternalUpdateDriver());
|
||||
if (type == MULTI_TYPE_ELRS && module == EXTERNAL_MODULE)
|
||||
driver.reset(new MultiExtSportUpdateDriver());
|
||||
pulsesStop();
|
||||
|
||||
#if defined(MULTI_PROTOLIST)
|
||||
for (uint8_t i = 0; i < MAX_MODULES; i++) {
|
||||
MultiRfProtocols::removeInstance(i);
|
||||
}
|
||||
#endif
|
||||
|
||||
pausePulses();
|
||||
|
||||
#if defined(HARDWARE_INTERNAL_MODULE)
|
||||
uint8_t intPwr = IS_INTERNAL_MODULE_ON();
|
||||
INTERNAL_MODULE_OFF();
|
||||
#endif
|
||||
|
||||
#if defined(HARDWARE_EXTERNAL_MODULE)
|
||||
uint8_t extPwr = IS_EXTERNAL_MODULE_ON();
|
||||
EXTERNAL_MODULE_OFF();
|
||||
#endif
|
||||
|
||||
#if defined(SPORT_UPDATE_PWR_GPIO)
|
||||
uint8_t spuPwr = IS_SPORT_UPDATE_POWER_ON();
|
||||
SPORT_UPDATE_POWER_OFF();
|
||||
#endif
|
||||
// switch S.PORT power OFF if supported
|
||||
modulePortSetPower(SPORT_MODULE, false);
|
||||
|
||||
progressHandler(getBasename(filename), STR_DEVICE_RESET, 0, 0);
|
||||
|
||||
@@ -642,22 +559,13 @@ bool MultiDeviceFirmwareUpdate::flashFirmware(const char * filename, ProgressHan
|
||||
watchdogSuspend(500 /*5s*/);
|
||||
RTOS_WAIT_MS(3000);
|
||||
|
||||
const char * result = driver->flashFirmware(&file, getBasename(filename), progressHandler);
|
||||
MultiFirmwareUpdateDriver driver(module, type);
|
||||
const char * result = driver.flashFirmware(&file, getBasename(filename), progressHandler);
|
||||
f_close(&file);
|
||||
|
||||
AUDIO_PLAY(AU_SPECIAL_SOUND_BEEP1);
|
||||
BACKLIGHT_ENABLE();
|
||||
|
||||
#if defined(HARDWARE_INTERNAL_MODULE)
|
||||
INTERNAL_MODULE_OFF();
|
||||
#endif
|
||||
EXTERNAL_MODULE_OFF();
|
||||
SPORT_UPDATE_POWER_OFF();
|
||||
|
||||
/* wait 2s off */
|
||||
watchdogSuspend(500 /*5s*/);
|
||||
RTOS_WAIT_MS(2000);
|
||||
|
||||
if (result) {
|
||||
POPUP_WARNING(STR_FIRMWARE_UPDATE_ERROR, result);
|
||||
}
|
||||
@@ -665,36 +573,17 @@ bool MultiDeviceFirmwareUpdate::flashFirmware(const char * filename, ProgressHan
|
||||
POPUP_INFORMATION(STR_FIRMWARE_UPDATE_SUCCESS);
|
||||
}
|
||||
|
||||
// reset telemetry protocol
|
||||
telemetryInit(255);
|
||||
watchdogSuspend(50 /*500ms*/);
|
||||
pulsesStart();
|
||||
|
||||
#if defined(HARDWARE_INTERNAL_MODULE)
|
||||
if (intPwr) {
|
||||
#if defined(MULTI_PROTOLIST)
|
||||
MultiRfProtocols::removeInstance(INTERNAL_MODULE);
|
||||
#endif
|
||||
INTERNAL_MODULE_ON();
|
||||
setupPulsesInternalModule();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HARDWARE_EXTERNAL_MODULE)
|
||||
if (extPwr) {
|
||||
#if defined(MULTI_PROTOLIST)
|
||||
MultiRfProtocols::removeInstance(EXTERNAL_MODULE);
|
||||
#endif
|
||||
EXTERNAL_MODULE_ON();
|
||||
setupPulsesExternalModule();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(SPORT_UPDATE_PWR_GPIO)
|
||||
if (spuPwr) {
|
||||
SPORT_UPDATE_POWER_ON();
|
||||
}
|
||||
#endif
|
||||
|
||||
resumePulses();
|
||||
// TODO: S.PORT power control
|
||||
// -> where is it actually turned ON normally?
|
||||
//
|
||||
// #if defined(SPORT_UPDATE_PWR_GPIO)
|
||||
// if (spuPwr) {
|
||||
// SPORT_UPDATE_POWER_ON();
|
||||
// }
|
||||
// #endif
|
||||
|
||||
return result == nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user