1
// Noctigon KR4 w/ tint ramping
2
// Copyright (C) 2021-2023 Selene ToyKeeper
3
// SPDX-License-Identifier: GPL-3.0-or-later
7
* (same driver as emisar-2ch, but with the switch on a different pin)
9
* Pin / Name / Function
10
* 1 PA6 2nd LED PWM (linear) (PWM1B)
11
* 2 PA5 R: red aux LED (PWM0B)
12
* 3 PA4 G: green aux LED
13
* 4 PA3 B: blue aux LED
15
* 6 PA1 Opamp 2 enable (2nd LEDs)
16
* 7 PA0 Opamp 1 enable (main LEDs)
24
* 15 PC0 main LED PWM (FET) (PWM0A) (unused on some models because tint ramping)
25
* 16 PB3 main LED PWM (linear) (PWM1A)
26
* 17 PB2 MISO / e-switch (PCINT10)
27
* 18 PB1 MOSI / battery voltage (ADC6)
30
* ADC12 thermal sensor
36
// move the switch to a different pin
37
#define SWITCH_PIN PB2 // pin 17
38
#define SWITCH_PCINT PCINT10 // pin 17 pin change interrupt
39
#define SWITCH_PCIE PCIE1 // PCIE1 is for PCINT[11:8]
40
#define SWITCH_PCMSK PCMSK1 // PCMSK1 is for PCINT[11:8]
41
#define SWITCH_PORT PINB // PINA or PINB or PINC
42
#define SWITCH_PUE PUEB // pullup group B
43
#define PCINT_vect PCINT1_vect // ISR for PCINT[11:8]
45
// the rest of the config is the same as the generic Emisar 2ch build
46
#include "hwdef-emisar-2ch.h"