From 7cb4fe0944b839f28dfd96a88a772cd6a8b58019 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Thu, 2 Nov 2023 17:16:25 -0600 Subject: reorganized project files (part 1) (just moved files, didn't change the contents yet, and nothing will work without updating #includes and build scripts and stuff) --- hwdef-noctigon-dm11-boost.h | 206 -------------------------------------------- 1 file changed, 206 deletions(-) delete mode 100644 hwdef-noctigon-dm11-boost.h (limited to 'hwdef-noctigon-dm11-boost.h') diff --git a/hwdef-noctigon-dm11-boost.h b/hwdef-noctigon-dm11-boost.h deleted file mode 100644 index d56a5f5..0000000 --- a/hwdef-noctigon-dm11-boost.h +++ /dev/null @@ -1,206 +0,0 @@ -// Noctigon DM11 boost driver layout (attiny1634) -// Copyright (C) 2021-2023 Selene ToyKeeper -// SPDX-License-Identifier: GPL-3.0-or-later -#pragma once - -/* - * (based on Noctigon K1) - * - * Pin / Name / Function - * 1 PA6 (none) (PWM1B) (reserved for DD drivers) - * 2 PA5 R: red aux LED (PWM0B) - * 3 PA4 G: green aux LED - * 4 PA3 B: blue aux LED - * 5 PA2 L: button LED - * 6 PA1 (none) - * 7 PA0 (none) - * 8 GND GND - * 9 VCC VCC - * 10 PC5 (none) - * 11 PC4 (none) - * 12 PC3 RESET - * 13 PC2 (none) - * 14 PC1 SCK - * 15 PC0 boost PMIC enable (PWM0A not used) - * 16 PB3 main LED PWM (PWM1A) - * 17 PB2 MISO (PCINT10) - * 18 PB1 MOSI / battery voltage (ADC6) - * 19 PB0 Opamp power - * 20 PA7 e-switch (PCINT7) - * ADC12 thermal sensor - * - * Main LED power uses one pin to turn the Opamp on/off, - * and one pin to control Opamp power level. - * Regulated brightness control uses the power level pin, with PWM+DSM. - * The on/off pin is only used to turn the main LED on and off, - * not to change brightness. - */ - -#define ATTINY 1634 -#include - -#define HWDEF_C_FILE hwdef-noctigon-dm11-boost.c - -// allow using aux LEDs as extra channel modes -#include "chan-rgbaux.h" - -// channel modes: -// * 0. main LEDs -// * 1+. aux RGB -#define NUM_CHANNEL_MODES (1 + NUM_RGB_AUX_CHANNEL_MODES) -enum CHANNEL_MODES { - CM_MAIN = 0, - RGB_AUX_ENUMS -}; - -#define DEFAULT_CHANNEL_MODE CM_MAIN - -// right-most bit first, modes are in fedcba9876543210 order -#define CHANNEL_MODES_ENABLED 0b0000000000000001 -// no args -//#define USE_CHANNEL_MODE_ARGS -//#define CHANNEL_MODE_ARGS 0,0,0,0,0,0,0,0 - - -#define PWM_CHANNELS 1 // old, remove this - -#define PWM_BITS 16 // 0 to 32640 (0 to 255 PWM + 0 to 127 DSM) at constant kHz -#define PWM_GET PWM_GET16 -#define PWM_DATATYPE uint16_t -#define PWM_DATATYPE2 uint32_t // only needs 32-bit if ramp values go over 255 -#define PWM1_DATATYPE uint16_t // 15-bit PWM+DSM ramp - -#define PWM_TOP ICR1 // holds the TOP value for variable-resolution PWM -#define PWM_TOP_INIT 255 -#define PWM_CNT TCNT1 // for checking / resetting phase -// (max is (255 << 7), because it's 8-bit PWM plus 7 bits of DSM) -#define DSM_TOP (255<<7) // 15-bit resolution leaves 1 bit for carry - -// timer interrupt for DSM -#define DSM_vect TIMER1_OVF_vect -#define DSM_INTCTRL TIMSK -#define DSM_OVF_bm (1<