aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2019-09-28 23:14:16 -0600
committerSelene ToyKeeper2019-09-28 23:14:16 -0600
commit0df827391ced9bb0b7114248c78b696de4676b25 (patch)
treed6e57c1ee063c0f7bd9186b80cc6a4fd889c2514 /spaghetti-monster
parentun-hardcoded 255 as the highest PWM level, and used a "PWM_TOP" value instead (diff)
downloadanduril-0df827391ced9bb0b7114248c78b696de4676b25.tar.gz
anduril-0df827391ced9bb0b7114248c78b696de4676b25.tar.bz2
anduril-0df827391ced9bb0b7114248c78b696de4676b25.zip
remapped D1S V2 pins to match new driver
(and changed a bit about how ADC / DIDR definitions work, since this now uses DIDR1 instead of DIDR0)
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/fsm-adc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/spaghetti-monster/fsm-adc.c b/spaghetti-monster/fsm-adc.c
index 6832e32..a5507a9 100644
--- a/spaghetti-monster/fsm-adc.c
+++ b/spaghetti-monster/fsm-adc.c
@@ -69,10 +69,10 @@ inline void ADC_on()
set_admux_voltage();
#ifdef USE_VOLTAGE_DIVIDER
// disable digital input on divider pin to reduce power consumption
- DIDR0 |= (1 << VOLTAGE_ADC_DIDR);
+ VOLTAGE_ADC_DIDR |= (1 << VOLTAGE_ADC);
#else
// disable digital input on VCC pin to reduce power consumption
- //DIDR0 |= (1 << ADC_DIDR); // FIXME: unsure how to handle for VCC pin
+ //VOLTAGE_ADC_DIDR |= (1 << VOLTAGE_ADC); // FIXME: unsure how to handle for VCC pin
#endif
#if (ATTINY == 1634)
ACSRA |= (1 << ACD); // turn off analog comparator to save power
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.