some fixes for DEBUG

This commit is contained in:
Raphael Coeffic
2022-06-11 15:38:08 +02:00
committed by Raphael Coeffic
parent 2b2a4479e4
commit 69955e5dd1
2 changed files with 14 additions and 2 deletions
+12 -2
View File
@@ -25,11 +25,17 @@
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include "aux_serial_driver.h"
#include "hal/serial_port.h"
#include "opentx.h"
#include "lua/lua_api.h"
#if !defined(BOOT)
#include "opentx.h"
#include "lua/lua_api.h"
#else
#include "dataconstants.h"
#endif
#define PRINTF_BUFFER_SIZE 128
@@ -285,6 +291,7 @@ static void serialSetPowerState(uint8_t port_nr)
}
}
#if !defined(BOOT)
void serialSetPower(uint8_t port_nr, bool enabled)
{
if (port_nr >= MAX_SERIAL_PORTS) return;
@@ -295,6 +302,7 @@ void serialSetPower(uint8_t port_nr, bool enabled)
serialSetPowerState(port_nr);
}
#endif
void serialInit(uint8_t port_nr, int mode)
{
@@ -366,6 +374,7 @@ bool serialGetPower(uint8_t port_nr)
return getSerialPower(port_nr);
}
#if !defined(BOOT)
void serialSetMode(uint8_t port_nr, int mode)
{
if (port_nr >= MAX_SERIAL_PORTS) return;
@@ -375,6 +384,7 @@ void serialSetMode(uint8_t port_nr, int mode)
~(SERIAL_CONF_MODE_MASK << port_nr * SERIAL_CONF_BITS_PER_PORT)) |
(m << port_nr * SERIAL_CONF_BITS_PER_PORT);
}
#endif
// uint8_t serialTracesEnabled(int port_nr)
// {