User controllable serial port power.

Thx to @raphaelcoeffic for numerous tips with YAML.
Tested with TX16S mkII.
This commit is contained in:
rotorman
2022-04-18 13:19:33 +02:00
parent f39f7a87ed
commit b1a3bc834f
22 changed files with 115 additions and 59 deletions
+6
View File
@@ -25,9 +25,15 @@
#include <stdint.h>
#include "hal/serial_port.h"
#define SERIAL_CONF_BITS_PER_PORT 8
#define SERIAL_CONF_MODE_MASK 0x0F
#define SERIAL_CONF_POWER_BIT 4
const etx_serial_port_t* serialGetPort(uint8_t port_nr);
int serialGetMode(uint8_t port_nr);
void serialSetMode(uint8_t port_nr, int mode);
bool serialGetPower(uint8_t port_nr);
void serialSetPower(uint8_t port_nr, bool enabled);
void initSerialPorts();
void serialInit(uint8_t port_nr, int mode);