From cdbd0919de569bab76f8458be37c5769829c5e8b Mon Sep 17 00:00:00 2001 From: John Steensen <2449496+jrsteensen@users.noreply.github.com> Date: Mon, 7 Oct 2024 13:58:59 -0600 Subject: [PATCH] UIP ABSIS Bus Master Sketch Signed-off-by: John Steensen <2449496+jrsteensen@users.noreply.github.com> --- .../1A1-UIP_ABSIS_BUS_MASTER.ino | 87 +++++++++++++++++++ .../1A1-UIP_ABSIS_BUS_MASTER/Makefile | 8 ++ 2 files changed, 95 insertions(+) create mode 100644 embedded/OH1_Upper_Instrument_Panel/1A1-UIP_ABSIS_BUS_MASTER/1A1-UIP_ABSIS_BUS_MASTER.ino create mode 100644 embedded/OH1_Upper_Instrument_Panel/1A1-UIP_ABSIS_BUS_MASTER/Makefile diff --git a/embedded/OH1_Upper_Instrument_Panel/1A1-UIP_ABSIS_BUS_MASTER/1A1-UIP_ABSIS_BUS_MASTER.ino b/embedded/OH1_Upper_Instrument_Panel/1A1-UIP_ABSIS_BUS_MASTER/1A1-UIP_ABSIS_BUS_MASTER.ino new file mode 100644 index 0000000..f83deef --- /dev/null +++ b/embedded/OH1_Upper_Instrument_Panel/1A1-UIP_ABSIS_BUS_MASTER/1A1-UIP_ABSIS_BUS_MASTER.ino @@ -0,0 +1,87 @@ +/************************************************************************************** + * ____ _ _ _ + * / __ \ | | | | | | + * | | | |_ __ ___ _ __ | |__| | ___ _ __ _ __ ___| |_ + * | | | | '_ \ / _ \ '_ \| __ |/ _ \| '__| '_ \ / _ \ __| + * | |__| | |_) | __/ | | | | | | (_) | | | | | | __/ |_ + * \____/| .__/ \___|_| |_|_| |_|\___/|_| |_| |_|\___|\__| + * | | + * |_| + * ---------------------------------------------------------------------------------- + * Copyright 2016-2024 OpenHornet + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ---------------------------------------------------------------------------------- + * Note: All other portions of OpenHornet not within the 'OpenHornet-Software' + * GitHub repository is released under the Creative Commons Attribution - + * Non-Commercial - Share Alike License. (CC BY-NC-SA 4.0) + * ---------------------------------------------------------------------------------- + * This Project uses Doxygen as a documentation generator. + * Please use Doxygen capable comments. + **************************************************************************************/ + +/** + * @file 1A1-UIP_ABSIS_BUS_MASTER.ino + * @author John Steensen (john.steensen@openhornet.com) + * @date 10.07.2024 + * @version 1.0.0 + * @copyright Copyright 2016-2024 OpenHornet. Licensed under the Apache License, Version 2.0. + * @brief Functions as the DCS-BIOS RS485 Master of the UIP. + * + * @details This sketch is for the UIP ABSIS Master. + * _Based off DCS-BIOS Skunkworks `RS485Master.ino` sample code._ + * + * * **Reference Designator:** 1A1 + * * **Intended Board:** ABSIS Bus Master + * * **RS485 Bus Address:** N/A + * + * ###Wiring diagram: + * + * PIN | Function + * --- | --- + * 2 | UART1_TXENABLE_PIN (ABSIS BUS #1) + * 3 | UART2_TXENABLE_PIN (ABSIS BUS #2) + * 4 | UART3_TXENABLE_PIN (ABSIS BUS #3) + * + */ + +// The following #define tells DCS-BIOS that this is a RS-485 master device. +#define DCSBIOS_RS485_MASTER + +// Define where the TX_ENABLE signals are connected. +#define UART1_TXENABLE_PIN 2 +#define UART2_TXENABLE_PIN 3 +#define UART3_TXENABLE_PIN 4 + +#include "DcsBios.h" + +/** + * @brief +* Arduino Setup Function +* +* Arduino standard Setup Function. Code who should be executed +* only once at the program start, belongs in this function. +*/ +void setup() { + DcsBios::setup(); +} + +/** +* @brief Arduino Loop Function +* +* Arduino standard Loop Function. Code who should be executed +* over and over in a loop, belongs in this function. +*/ +void loop() { + DcsBios::loop(); +} \ No newline at end of file diff --git a/embedded/OH1_Upper_Instrument_Panel/1A1-UIP_ABSIS_BUS_MASTER/Makefile b/embedded/OH1_Upper_Instrument_Panel/1A1-UIP_ABSIS_BUS_MASTER/Makefile new file mode 100644 index 0000000..d14ae92 --- /dev/null +++ b/embedded/OH1_Upper_Instrument_Panel/1A1-UIP_ABSIS_BUS_MASTER/Makefile @@ -0,0 +1,8 @@ +# Any extra libraries included by this sketch (space separated) +LIBRARIES = Servo dcs-bios-arduino-library Wire + +# Uncomment one of the following to choose the target board +include $(ROOTDIR)/include/mega2560.mk +# include $(ROOTDIR)/include/promicro.mk +# include $(ROOTDIR)/include/promini.mk +# include $(ROOTDIR)/include/s2mini.mk