diff options
| author | Gabriel Hart | 2022-04-11 09:29:31 -0500 |
|---|---|---|
| committer | Gabriel Hart | 2022-04-11 09:29:31 -0500 |
| commit | 4d558992d4cc6434ec3ee94d535cd4b61a92a128 (patch) | |
| tree | 8ffc3723da4657518aa340dca5fdd7ef7fc8ad28 /hwdef-Emisar_D4Sv2-tintramp.h | |
| parent | Tweak a few MT35Mini settings (diff) | |
| parent | revert spurious change to version.h (diff) | |
| download | anduril-4d558992d4cc6434ec3ee94d535cd4b61a92a128.tar.gz anduril-4d558992d4cc6434ec3ee94d535cd4b61a92a128.tar.bz2 anduril-4d558992d4cc6434ec3ee94d535cd4b61a92a128.zip | |
Merge from TK's main A2 branch thru Rev 647 which includes several patches for the Sofirn SP10 Pro after TK merge that branch in
Diffstat (limited to 'hwdef-Emisar_D4Sv2-tintramp.h')
| -rw-r--r-- | hwdef-Emisar_D4Sv2-tintramp.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hwdef-Emisar_D4Sv2-tintramp.h b/hwdef-Emisar_D4Sv2-tintramp.h index 76f6097..90545f4 100644 --- a/hwdef-Emisar_D4Sv2-tintramp.h +++ b/hwdef-Emisar_D4Sv2-tintramp.h @@ -47,12 +47,15 @@ #define USE_DYN_PWM // dynamic frequency and speed #define PWM_DATATYPE2 uint32_t // only needs 32-bit if ramp values go over 255 +#ifndef SWITCH_PIN #define SWITCH_PIN PA7 // pin 20 #define SWITCH_PCINT PCINT7 // pin 20 pin change interrupt #define SWITCH_PCIE PCIE0 // PCIE1 is for PCINT[7:0] #define SWITCH_PCMSK PCMSK0 // PCMSK1 is for PCINT[7:0] #define SWITCH_PORT PINA // PINA or PINB or PINC +#define SWITCH_PUE PUEA // pullup group A #define PCINT_vect PCINT0_vect // ISR for PCINT[7:0] +#endif // usually PWM1_LVL would be a hardware register, but we need to abstract // it out to a soft brightness value, in order to handle tint ramping @@ -173,7 +176,7 @@ inline void hwdef_setup() { PWM1_TOP = PWM_TOP; // set up e-switch - PUEA = (1 << SWITCH_PIN); // pull-up for e-switch + SWITCH_PUE = (1 << SWITCH_PIN); // pull-up for e-switch SWITCH_PCMSK = (1 << SWITCH_PCINT); // enable pin change interrupt } |
