aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tk-attiny.h9
-rw-r--r--tk-delay.h3
2 files changed, 11 insertions, 1 deletions
diff --git a/tk-attiny.h b/tk-attiny.h
index e58c4bb..ea784f5 100644
--- a/tk-attiny.h
+++ b/tk-attiny.h
@@ -32,6 +32,7 @@
#define V_REF REFS0
#define BOGOMIPS 950
#define ADMUX_VCC 0b00001100
+ #define DELAY_ZERO_TIME 252
#elif (ATTINY == 25)
// TODO: Use 6.4 MHz instead of 8 MHz?
#define F_CPU 8000000UL
@@ -40,6 +41,7 @@
#define BOGOMIPS (F_CPU/4000)
#define ADMUX_VCC 0b00001100
#define ADMUX_THERM 0b10001111
+ #define DELAY_ZERO_TIME 1020
#elif (ATTINY == 85)
// TODO: Use 6.4 MHz instead of 8 MHz?
#define F_CPU 8000000UL
@@ -50,6 +52,7 @@
#define ADMUX_VCC 0b00001100
// (1 << V_REF) | (0 << ADLAR) | (THERM_CHANNEL)
#define ADMUX_THERM 0b10001111
+ #define DELAY_ZERO_TIME 1020
#else
#error Hey, you need to define ATTINY.
#endif
@@ -165,6 +168,12 @@
#endif // NANJG_LAYOUT
+// Q8 driver is the same as a D4, basically
+#ifdef FSM_BLF_Q8_DRIVER
+#define FSM_EMISAR_D4_DRIVER
+#endif
+
+
#ifdef FSM_EMISAR_D4_DRIVER
#define DRIVER_TYPE_DEFINED
/*
diff --git a/tk-delay.h b/tk-delay.h
index 0619419..7b00ac0 100644
--- a/tk-delay.h
+++ b/tk-delay.h
@@ -43,7 +43,8 @@ void _delay_ms(uint16_t n)
#if defined(USE_FINE_DELAY) || defined(USE_DELAY_ZERO)
#define delay_zero _delay_zero
void _delay_zero() {
- _delay_loop_2(BOGOMIPS/3);
+ //_delay_loop_2((BOGOMIPS/3) & 0xff00);
+ _delay_loop_2(DELAY_ZERO_TIME);
}
#endif
#ifdef USE_DELAY_4MS
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.