From 1153a7c8b4130abb62654476bc958399d687cbf2 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Thu, 30 Nov 2023 08:44:31 -0700 Subject: added a build target for FW3X with manually-fixed RGB aux wiring --- hw/lumintop/fw3x-lume1/hwdef.h | 12 +++++++++--- hw/lumintop/fw3x-lume1/rgbswap/anduril.h | 11 +++++++++++ hw/lumintop/fw3x-lume1/rgbswap/model | 1 + 3 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 hw/lumintop/fw3x-lume1/rgbswap/anduril.h create mode 100644 hw/lumintop/fw3x-lume1/rgbswap/model (limited to 'hw') diff --git a/hw/lumintop/fw3x-lume1/hwdef.h b/hw/lumintop/fw3x-lume1/hwdef.h index 92a177f..021c4cf 100644 --- a/hw/lumintop/fw3x-lume1/hwdef.h +++ b/hw/lumintop/fw3x-lume1/hwdef.h @@ -153,9 +153,15 @@ uint16_t temp_raw2cooked(uint16_t measurement); #define ADMUX_THERM_EXTERNAL_SENSOR 0b00001011 // this driver allows for aux LEDs under the optic -#define AUXLED_R_PIN PA3 // pin 2 -#define AUXLED_G_PIN PA4 // pin 3 -#define AUXLED_B_PIN PA5 // pin 4 +#ifdef FW3X_RGB_SWAP // wiring fixed by end user + #define AUXLED_R_PIN PA5 // pin 2 + #define AUXLED_G_PIN PA4 // pin 3 + #define AUXLED_B_PIN PA3 // pin 4 +#else // Lumintop's factory wiring + #define AUXLED_R_PIN PA3 // pin 4 + #define AUXLED_G_PIN PA4 // pin 3 + #define AUXLED_B_PIN PA5 // pin 2 +#endif #define AUXLED_RGB_PORT PORTA // PORTA or PORTB or PORTC #define AUXLED_RGB_DDR DDRA // DDRA or DDRB or DDRC #define AUXLED_RGB_PUE PUEA // PUEA or PUEB or PUEC diff --git a/hw/lumintop/fw3x-lume1/rgbswap/anduril.h b/hw/lumintop/fw3x-lume1/rgbswap/anduril.h new file mode 100644 index 0000000..2fba7ff --- /dev/null +++ b/hw/lumintop/fw3x-lume1/rgbswap/anduril.h @@ -0,0 +1,11 @@ +// FW3X (RGB aux swapped) config options for Anduril +// Copyright (C) 2023 Selene ToyKeeper +// SPDX-License-Identifier: GPL-3.0-or-later +#pragma once + +// Lumintop swapped red and blue wires. Some people fixed the wiring. +// Then the firmware fixed the pinouts to match Lumintop's wiring. +// This firmware exists for people who fixed their wiring. +#define FW3X_RGB_SWAP +#include "lumintop/fw3x-lume1/anduril.h" + diff --git a/hw/lumintop/fw3x-lume1/rgbswap/model b/hw/lumintop/fw3x-lume1/rgbswap/model new file mode 100644 index 0000000..44505ce --- /dev/null +++ b/hw/lumintop/fw3x-lume1/rgbswap/model @@ -0,0 +1 @@ +0315 -- cgit v1.2.3