1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 00:35:39 +03:00

Added support to turn inversion off for UART1

will need to look at controlling it within configuration once param groups are in place.
This commit is contained in:
blckmn 2016-07-30 12:02:07 +10:00
parent 0e8d375a1c
commit 0a9beee25d
2 changed files with 23 additions and 5 deletions

View file

@ -27,11 +27,16 @@
#include "inverter.h"
static const IO_t pin = DEFIO_IO(INVERTER);
/*
TODO: move this to support multiple inverters on different UARTs etc
possibly move to put it in the UART driver itself.
*/
static IO_t pin = IO_NONE;
void initInverter(void)
{
IOInit(pin, OWNER_INVERTER, RESOURCE_OUTPUT, 0);
pin = IOGetByTag(IO_TAG(INVERTER));
IOInit(pin, OWNER_INVERTER, RESOURCE_OUTPUT, 1);
IOConfigGPIO(pin, IOCFG_OUT_PP);
inverterSet(false);