Skip to content

Commit

Permalink
updated config
Browse files Browse the repository at this point in the history
  • Loading branch information
felias-fogg committed Sep 25, 2023
1 parent 90b98c7 commit ad0221b
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/SingleWireSerial_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@


#if (ICTIMER == 0)
#if !defined(__AVR_ATtiny861__) && !defined(__AVR_ATtiny461__) && !defined(__AVR_ATtiny261__)
#define TCCRA TCCR0A
#define TCCRB TCCR0B
#define TCCRC TCCR0C
Expand All @@ -25,13 +24,13 @@
#define ICF ICF0
#define ICIE ICIE0
#define OCFA OCF0A
#define CS2 CS02
#define CS1 CS01
#define CS0 CS00
#define ICES ICES0
#define WGM2 WGM02
#define WGM3 WGM03
#define TIMER_CAPT_vect TIMER0_CAPT_vect
#endif
#elif (ICTIMER == 1)
#define TCCRA TCCR1A
#define TCCRB TCCR1B
Expand All @@ -40,14 +39,13 @@
#define OCRA OCR1A
#define ICR ICR1
#define ICNC ICNC1
#if !defined(__AVR_ATtiny1634__) && !defined(__AVR_ATtiny2313__) && !defined(__AVR_ATtiny2313A__) && !defined(__AVR_ATtiny4313__)
#define TIMSK TIMSK1
#define TIFR TIFR1
#endif
#define TOV TOV1
#define ICF ICF1
#define ICIE ICIE1
#define OCFA OCF1A
#define CS2 CS12
#define CS1 CS11
#define CS0 CS10
#define ICES ICES1
Expand All @@ -68,6 +66,7 @@
#define ICF ICF2
#define ICIE ICIE2
#define OCFA OCF2A
#define CS2 CS22
#define CS1 CS21
#define CS0 CS20
#define ICES ICES2
Expand All @@ -88,6 +87,7 @@
#define ICF ICF3
#define ICIE ICIE3
#define OCFA OCF3A
#define CS2 CS32
#define CS1 CS31
#define CS0 CS30
#define ICES ICES3
Expand All @@ -108,6 +108,7 @@
#define ICF ICF4
#define ICIE ICIE4
#define OCFA OCF4A
#define CS2 CS42
#define CS1 CS41
#define CS0 CS40
#define ICES ICES4
Expand All @@ -128,6 +129,7 @@
#define ICF ICF5
#define ICIE ICIE5
#define OCFA OCF5A
#define CS2 CS52
#define CS1 CS51
#define CS0 CS50
#define ICES ICES5
Expand Down Expand Up @@ -249,8 +251,7 @@
#else
#error "ATtiny167/ATtiny87 has only Timer1!"
#endif
#elif defined(__AVR_ATtiny1634__)
#error "TIFR register is not among the first 32 I/O regs, sorry"
#elif defined(__AVR_ATtiny1634__)
#if (ICTIMER == 1)
#define ICArduinoPin 12
#define ICDDR DDRC
Expand Down Expand Up @@ -282,8 +283,7 @@
#else
#error "ATtiny88/ATtiny48 has only Timer1 and Timer2!"
#endif
#elif defined(__AVR_ATtiny2313__) || defined(__AVR_ATtiny4313__)
#error "TIFR register is not among the first 32 I/O regs, sorry"
#elif defined(__AVR_ATtiny2313__) || defined(__AVR_ATtiny4313__)
#if (ICTIMER == 1)
#define ICArduinoPin 8
#define ICDDR DDRD
Expand All @@ -295,8 +295,7 @@
#else
#error "ATtiny2313/4313 has only Timer1!"
#endif
#elif defined(__AVR_ATtiny861__) || defined(__AVR_ATtiny461__) || defined(__AVR_ATtiny261__)
#error "TIFR register is not among the first 32 I/O regs, sorry"
#elif defined(__AVR_ATtiny861__) || defined(__AVR_ATtiny461__) || defined(__AVR_ATtiny261__)
#if (ICTIMER == 0)
#define ICArduinoPin 4
#define ICDDR DDRA
Expand Down

0 comments on commit ad0221b

Please sign in to comment.