aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2015-10-05 18:09:06 -0600
committerSelene ToyKeeper2015-10-05 18:09:06 -0600
commit116b84f659773647333bed942bd5ce5bd96752c2 (patch)
treebc6f7d2ba35c3915512a9aec65727ddb2530c4d9
parentmerged tiny25 branch (diff)
downloadanduril-116b84f659773647333bed942bd5ce5bd96752c2.tar.gz
anduril-116b84f659773647333bed942bd5ce5bd96752c2.tar.bz2
anduril-116b84f659773647333bed942bd5ce5bd96752c2.zip
Added nanjg board/pin layout definition to tk-attiny.h.
(at least works for s7.c, haven't tried others yet)
-rw-r--r--tk-attiny.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/tk-attiny.h b/tk-attiny.h
index 9415a97..4fee640 100644
--- a/tk-attiny.h
+++ b/tk-attiny.h
@@ -84,6 +84,19 @@
// TODO: fill in this section, update Ferrero_Rocher code to use it.
#endif // FERRERO_ROCHER_LAYOUT
+#ifdef NANJG_LAYOUT
+#define STAR2_PIN PB0
+#define STAR3_PIN PB4
+#define STAR4_PIN PB3
+#define PWM_PIN PB1
+#define VOLTAGE_PIN PB2
+#define ADC_CHANNEL 0x01 // MUX 01 corresponds with PB2
+#define ADC_DIDR ADC1D // Digital input disable bit corresponding with PB2
+#define ADC_PRSCL 0x06 // clk/64
+
+#define PWM_LVL OCR0B // OCR0B is the output compare register for PB1
+#endif // NANJG_LAYOUT
+
#ifndef PWM_LVL
Hey, you need to define an I/O pin layout.
#endif
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.