diff --git a/src/main/target/JHEMCUF435/config.c b/src/main/target/JHEMCUF435/config.c new file mode 100644 index 00000000000..bb6078293ed --- /dev/null +++ b/src/main/target/JHEMCUF435/config.c @@ -0,0 +1,35 @@ +/* + * This file is part of INAV Project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * Alternatively, the contents of this file may be used under the terms + * of the GNU General Public License Version 3, as described below: + * + * This file is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This file 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://www.gnu.org/licenses/. + */ + +#include + +#include "platform.h" + +#include "io/serial.h" + +void targetConfiguration(void) +{ + serialConfigMutable()->portConfigs[findSerialPortIndexByIdentifier(SERIAL_PORT_USART2)].functionMask = FUNCTION_RX_SERIAL; + serialConfigMutable()->portConfigs[findSerialPortIndexByIdentifier(SERIAL_PORT_USART7)].functionMask = FUNCTION_ESCSERIAL; +} \ No newline at end of file diff --git a/src/main/target/JHEMCUF435/target.h b/src/main/target/JHEMCUF435/target.h index edbc3d0bbda..e061f67cd76 100644 --- a/src/main/target/JHEMCUF435/target.h +++ b/src/main/target/JHEMCUF435/target.h @@ -137,7 +137,7 @@ #define UART6_TX_PIN PC6 #define USE_UART7 -//#define USE_UART7_PIN_SWAP +#define USE_UART7_PIN_SWAP #define UART7_RX_PIN PC0 #define UART7_TX_PIN PC1 @@ -149,7 +149,7 @@ #define DEFAULT_RX_TYPE RX_TYPE_SERIAL #define SERIALRX_PROVIDER SERIALRX_CRSF -#define SERIALRX_UART SERIAL_PORT_USART5 +#define SERIALRX_UART SERIAL_PORT_USART2 // *************** ADC ***************************** #define USE_ADC