aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hwdef-Noctigon_K1-12V.h6
-rw-r--r--spaghetti-monster/fsm-eeprom.c8
-rw-r--r--spaghetti-monster/fsm-ramping.c8
3 files changed, 11 insertions, 11 deletions
diff --git a/hwdef-Noctigon_K1-12V.h b/hwdef-Noctigon_K1-12V.h
index 8781d8e..b17aad0 100644
--- a/hwdef-Noctigon_K1-12V.h
+++ b/hwdef-Noctigon_K1-12V.h
@@ -56,8 +56,8 @@
#define LED_ENABLE_PIN PB0 // pin 19, Opamp power
#define LED_ENABLE_PORT PORTB // control port for PB0
-#define LED_ENABLE2_PIN PC0 // pin 15, boost PMIC enable
-#define LED_ENABLE2_PORT PORTC // control port for PC0
+#define LED2_ENABLE_PIN PC0 // pin 15, boost PMIC enable
+#define LED2_ENABLE_PORT PORTC // control port for PC0
#define USE_VOLTAGE_DIVIDER // use a dedicated pin, not VCC, because VCC input is flattened
@@ -103,7 +103,7 @@
inline void hwdef_setup() {
// enable output ports
// boost PMIC on/off
- DDRC = (1 << LED_ENABLE2_PIN);
+ DDRC = (1 << LED2_ENABLE_PIN);
// Opamp level and Opamp on/off
DDRB = (1 << PWM1_PIN)
| (1 << LED_ENABLE_PIN);
diff --git a/spaghetti-monster/fsm-eeprom.c b/spaghetti-monster/fsm-eeprom.c
index 0de7e05..4c734a2 100644
--- a/spaghetti-monster/fsm-eeprom.c
+++ b/spaghetti-monster/fsm-eeprom.c
@@ -30,7 +30,7 @@ uint8_t eeprom[EEPROM_BYTES];
#endif
uint8_t load_eeprom() {
- #ifdef LED_ENABLE_PIN
+ #if defined(LED_ENABLE_PIN) || defined(LED2_ENABLE_PIN)
delay_4ms(2); // wait for power to stabilize
#endif
@@ -48,7 +48,7 @@ uint8_t load_eeprom() {
}
void save_eeprom() {
- #ifdef LED_ENABLE_PIN
+ #if defined(LED_ENABLE_PIN) || defined(LED2_ENABLE_PIN)
delay_4ms(2); // wait for power to stabilize
#endif
@@ -70,7 +70,7 @@ uint8_t eeprom_wl[EEPROM_WL_BYTES];
uint8_t * eep_wl_prev_offset;
uint8_t load_eeprom_wl() {
- #ifdef LED_ENABLE_PIN
+ #if defined(LED_ENABLE_PIN) || defined(LED2_ENABLE_PIN)
delay_4ms(2); // wait for power to stabilize
#endif
@@ -99,7 +99,7 @@ uint8_t load_eeprom_wl() {
}
void save_eeprom_wl() {
- #ifdef LED_ENABLE_PIN
+ #if defined(LED_ENABLE_PIN) || defined(LED2_ENABLE_PIN)
delay_4ms(2); // wait for power to stabilize
#endif
diff --git a/spaghetti-monster/fsm-ramping.c b/spaghetti-monster/fsm-ramping.c
index 6c6d0cb..5ea4a47 100644
--- a/spaghetti-monster/fsm-ramping.c
+++ b/spaghetti-monster/fsm-ramping.c
@@ -72,8 +72,8 @@ void set_level(uint8_t level) {
#ifdef LED_ENABLE_PIN
LED_ENABLE_PORT &= ~(1 << LED_ENABLE_PIN);
#endif
- #ifdef LED_ENABLE2_PIN
- LED_ENABLE2_PORT &= ~(1 << LED_ENABLE2_PIN);
+ #ifdef LED2_ENABLE_PIN
+ LED2_ENABLE_PORT &= ~(1 << LED2_ENABLE_PIN);
#endif
} else {
level --;
@@ -82,8 +82,8 @@ void set_level(uint8_t level) {
#ifdef LED_ENABLE_PIN
LED_ENABLE_PORT |= (1 << LED_ENABLE_PIN);
#endif
- #ifdef LED_ENABLE2_PIN
- LED_ENABLE2_PORT |= (1 << LED_ENABLE2_PIN);
+ #ifdef LED2_ENABLE_PIN
+ LED2_ENABLE_PORT |= (1 << LED2_ENABLE_PIN);
#endif
#ifdef USE_TINT_RAMPING