Skip to content

Commit 48137fa

Browse files
committed
Added ATtiny1604 support.
1 parent ec94757 commit 48137fa

File tree

15 files changed

+146
-41
lines changed

15 files changed

+146
-41
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ The timer and the pin usage can be adjusted in [private/IRTimer.cpp.h](https://g
225225
|--------------------------------------------------------------------------|---------------------|-------------------|
226226
| [ATtiny84](https://github.com/SpenceKonde/ATTinyCore) | **6** | **1** |
227227
| [ATtiny85 > 1 MHz](https://github.com/SpenceKonde/ATTinyCore) | **1**, 4 | **0**, 1 |
228+
| [ATtiny1604](https://github.com/SpenceKonde/megaTinyCore) | % | **TCB0** |
228229
| [ATmega8](https://github.com/MCUdude/MiniCore) | **9** | **1** |
229230
| [ATmega48, ATmega88, ATmega168, **ATmega328**](https://github.com/MCUdude/MiniCore) | **3**, 9 | 1, **2** |
230231
| [ATmega1284](https://github.com/MCUdude/MightyCore) | 13, 14, 6 | 1, **2**, 3 |

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ The latest version may not be released!
66
- Added Onkyo protocol.
77
- Support for old 2.x code by backwards compatible `decode(decode_results *aResults)` function.
88
- Removed USE_OLD_DECODE macro and added NO_LEGACY_COMPATIBILITY macro.
9+
- Added ATtiny1604 support.
910

1011
## 3.1.0
1112
- Generation of PWM by software is active by default.

examples/ControlRelay/PinDefinitionsAndMore.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
* ATtin167 9 8 5 // Digispark pro number schema
3535
* ATtin167 3 2 7
3636
* ATtin3217 10 11 3 // TinyCore schema
37+
* ATtin1604 10 11 % // MegaTinyCore schema
3738
* SAMD21 3 4 5
3839
* ESP8266 14 // D5 12 // D6 %
3940
* ESP32 15 4 %
@@ -46,15 +47,15 @@
4647
#define FEEDBACK_LED_IS_ACTIVE_LOW // The LED on my board is active LOW
4748
#define IR_RECEIVE_PIN 14 // D5
4849
#define IR_SEND_PIN 12 // D6 - D4/2 is internal LED
49-
#define tone(a,b) void() // tone() inhibits receive timer
50+
#define tone(a,b,c) void() // tone() inhibits receive timer
5051
#define noTone(a) void()
5152
#define TONE_PIN 42 // Dummy for examples using it
5253
#define IR_TIMING_TEST_PIN 13 // D7
5354

5455
#elif defined(ESP32)
5556
#define IR_RECEIVE_PIN 15 // D15
5657
#define IR_SEND_PIN 4 // D4
57-
#define tone(a,b) void() // no tone() available on ESP32
58+
#define tone(a,b,c) void() // no tone() available on ESP32
5859
#define noTone(a) void()
5960
#define TONE_PIN 42 // Dummy for examples using it
6061

@@ -104,6 +105,13 @@
104105
#define IR_SEND_PIN 11
105106
#define TONE_PIN 3
106107

108+
#elif defined(__AVR_ATtiny1604__)
109+
#define IR_RECEIVE_PIN 2 // To be compatible with interrupt example, pin 2 is chosen here.
110+
#define IR_SEND_PIN 3
111+
#define TONE_PIN 42 // Dummy for examples using it
112+
#define tone(a,b,c) void() // tone() uses the same vector as receive timer
113+
#define noTone(a) void()
114+
107115
# elif defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) \
108116
|| defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) \
109117
|| defined(__AVR_ATmega324P__) || defined(__AVR_ATmega324A__) \

examples/ReceiveAndSend/PinDefinitionsAndMore.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
* ATtin167 9 8 5 // Digispark pro number schema
3535
* ATtin167 3 2 7
3636
* ATtin3217 10 11 3 // TinyCore schema
37+
* ATtin1604 10 11 % // MegaTinyCore schema
3738
* SAMD21 3 4 5
3839
* ESP8266 14 // D5 12 // D6 %
3940
* ESP32 15 4 %
@@ -46,15 +47,15 @@
4647
#define FEEDBACK_LED_IS_ACTIVE_LOW // The LED on my board is active LOW
4748
#define IR_RECEIVE_PIN 14 // D5
4849
#define IR_SEND_PIN 12 // D6 - D4/2 is internal LED
49-
#define tone(a,b) void() // tone() inhibits receive timer
50+
#define tone(a,b,c) void() // tone() inhibits receive timer
5051
#define noTone(a) void()
5152
#define TONE_PIN 42 // Dummy for examples using it
5253
#define IR_TIMING_TEST_PIN 13 // D7
5354

5455
#elif defined(ESP32)
5556
#define IR_RECEIVE_PIN 15 // D15
5657
#define IR_SEND_PIN 4 // D4
57-
#define tone(a,b) void() // no tone() available on ESP32
58+
#define tone(a,b,c) void() // no tone() available on ESP32
5859
#define noTone(a) void()
5960
#define TONE_PIN 42 // Dummy for examples using it
6061

@@ -104,6 +105,13 @@
104105
#define IR_SEND_PIN 11
105106
#define TONE_PIN 3
106107

108+
#elif defined(__AVR_ATtiny1604__)
109+
#define IR_RECEIVE_PIN 2 // To be compatible with interrupt example, pin 2 is chosen here.
110+
#define IR_SEND_PIN 3
111+
#define TONE_PIN 42 // Dummy for examples using it
112+
#define tone(a,b,c) void() // tone() uses the same vector as receive timer
113+
#define noTone(a) void()
114+
107115
# elif defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) \
108116
|| defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) \
109117
|| defined(__AVR_ATmega324P__) || defined(__AVR_ATmega324A__) \

examples/ReceiveDemo/PinDefinitionsAndMore.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
* ATtin167 9 8 5 // Digispark pro number schema
3535
* ATtin167 3 2 7
3636
* ATtin3217 10 11 3 // TinyCore schema
37+
* ATtin1604 10 11 % // MegaTinyCore schema
3738
* SAMD21 3 4 5
3839
* ESP8266 14 // D5 12 // D6 %
3940
* ESP32 15 4 %
@@ -46,15 +47,15 @@
4647
#define FEEDBACK_LED_IS_ACTIVE_LOW // The LED on my board is active LOW
4748
#define IR_RECEIVE_PIN 14 // D5
4849
#define IR_SEND_PIN 12 // D6 - D4/2 is internal LED
49-
#define tone(a,b) void() // tone() inhibits receive timer
50+
#define tone(a,b,c) void() // tone() inhibits receive timer
5051
#define noTone(a) void()
5152
#define TONE_PIN 42 // Dummy for examples using it
5253
#define IR_TIMING_TEST_PIN 13 // D7
5354

5455
#elif defined(ESP32)
5556
#define IR_RECEIVE_PIN 15 // D15
5657
#define IR_SEND_PIN 4 // D4
57-
#define tone(a,b) void() // no tone() available on ESP32
58+
#define tone(a,b,c) void() // no tone() available on ESP32
5859
#define noTone(a) void()
5960
#define TONE_PIN 42 // Dummy for examples using it
6061

@@ -104,6 +105,13 @@
104105
#define IR_SEND_PIN 11
105106
#define TONE_PIN 3
106107

108+
#elif defined(__AVR_ATtiny1604__)
109+
#define IR_RECEIVE_PIN 2 // To be compatible with interrupt example, pin 2 is chosen here.
110+
#define IR_SEND_PIN 3
111+
#define TONE_PIN 42 // Dummy for examples using it
112+
#define tone(a,b,c) void() // tone() uses the same vector as receive timer
113+
#define noTone(a) void()
114+
107115
# elif defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) \
108116
|| defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) \
109117
|| defined(__AVR_ATmega324P__) || defined(__AVR_ATmega324A__) \

examples/ReceiveDump/PinDefinitionsAndMore.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
* ATtin167 9 8 5 // Digispark pro number schema
3535
* ATtin167 3 2 7
3636
* ATtin3217 10 11 3 // TinyCore schema
37+
* ATtin1604 10 11 % // MegaTinyCore schema
3738
* SAMD21 3 4 5
3839
* ESP8266 14 // D5 12 // D6 %
3940
* ESP32 15 4 %
@@ -46,15 +47,15 @@
4647
#define FEEDBACK_LED_IS_ACTIVE_LOW // The LED on my board is active LOW
4748
#define IR_RECEIVE_PIN 14 // D5
4849
#define IR_SEND_PIN 12 // D6 - D4/2 is internal LED
49-
#define tone(a,b) void() // tone() inhibits receive timer
50+
#define tone(a,b,c) void() // tone() inhibits receive timer
5051
#define noTone(a) void()
5152
#define TONE_PIN 42 // Dummy for examples using it
5253
#define IR_TIMING_TEST_PIN 13 // D7
5354

5455
#elif defined(ESP32)
5556
#define IR_RECEIVE_PIN 15 // D15
5657
#define IR_SEND_PIN 4 // D4
57-
#define tone(a,b) void() // no tone() available on ESP32
58+
#define tone(a,b,c) void() // no tone() available on ESP32
5859
#define noTone(a) void()
5960
#define TONE_PIN 42 // Dummy for examples using it
6061

@@ -104,6 +105,13 @@
104105
#define IR_SEND_PIN 11
105106
#define TONE_PIN 3
106107

108+
#elif defined(__AVR_ATtiny1604__)
109+
#define IR_RECEIVE_PIN 2 // To be compatible with interrupt example, pin 2 is chosen here.
110+
#define IR_SEND_PIN 3
111+
#define TONE_PIN 42 // Dummy for examples using it
112+
#define tone(a,b,c) void() // tone() uses the same vector as receive timer
113+
#define noTone(a) void()
114+
107115
# elif defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) \
108116
|| defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) \
109117
|| defined(__AVR_ATmega324P__) || defined(__AVR_ATmega324A__) \

examples/SendBoseWaveDemo/PinDefinitionsAndMore.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
* ATtin167 9 8 5 // Digispark pro number schema
3535
* ATtin167 3 2 7
3636
* ATtin3217 10 11 3 // TinyCore schema
37+
* ATtin1604 10 11 % // MegaTinyCore schema
3738
* SAMD21 3 4 5
3839
* ESP8266 14 // D5 12 // D6 %
3940
* ESP32 15 4 %
@@ -46,15 +47,15 @@
4647
#define FEEDBACK_LED_IS_ACTIVE_LOW // The LED on my board is active LOW
4748
#define IR_RECEIVE_PIN 14 // D5
4849
#define IR_SEND_PIN 12 // D6 - D4/2 is internal LED
49-
#define tone(a,b) void() // tone() inhibits receive timer
50+
#define tone(a,b,c) void() // tone() inhibits receive timer
5051
#define noTone(a) void()
5152
#define TONE_PIN 42 // Dummy for examples using it
5253
#define IR_TIMING_TEST_PIN 13 // D7
5354

5455
#elif defined(ESP32)
5556
#define IR_RECEIVE_PIN 15 // D15
5657
#define IR_SEND_PIN 4 // D4
57-
#define tone(a,b) void() // no tone() available on ESP32
58+
#define tone(a,b,c) void() // no tone() available on ESP32
5859
#define noTone(a) void()
5960
#define TONE_PIN 42 // Dummy for examples using it
6061

@@ -104,6 +105,13 @@
104105
#define IR_SEND_PIN 11
105106
#define TONE_PIN 3
106107

108+
#elif defined(__AVR_ATtiny1604__)
109+
#define IR_RECEIVE_PIN 2 // To be compatible with interrupt example, pin 2 is chosen here.
110+
#define IR_SEND_PIN 3
111+
#define TONE_PIN 42 // Dummy for examples using it
112+
#define tone(a,b,c) void() // tone() uses the same vector as receive timer
113+
#define noTone(a) void()
114+
107115
# elif defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) \
108116
|| defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) \
109117
|| defined(__AVR_ATmega324P__) || defined(__AVR_ATmega324A__) \

examples/SendDemo/PinDefinitionsAndMore.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
* ATtin167 9 8 5 // Digispark pro number schema
3535
* ATtin167 3 2 7
3636
* ATtin3217 10 11 3 // TinyCore schema
37+
* ATtin1604 10 11 % // MegaTinyCore schema
3738
* SAMD21 3 4 5
3839
* ESP8266 14 // D5 12 // D6 %
3940
* ESP32 15 4 %
@@ -46,15 +47,15 @@
4647
#define FEEDBACK_LED_IS_ACTIVE_LOW // The LED on my board is active LOW
4748
#define IR_RECEIVE_PIN 14 // D5
4849
#define IR_SEND_PIN 12 // D6 - D4/2 is internal LED
49-
#define tone(a,b) void() // tone() inhibits receive timer
50+
#define tone(a,b,c) void() // tone() inhibits receive timer
5051
#define noTone(a) void()
5152
#define TONE_PIN 42 // Dummy for examples using it
5253
#define IR_TIMING_TEST_PIN 13 // D7
5354

5455
#elif defined(ESP32)
5556
#define IR_RECEIVE_PIN 15 // D15
5657
#define IR_SEND_PIN 4 // D4
57-
#define tone(a,b) void() // no tone() available on ESP32
58+
#define tone(a,b,c) void() // no tone() available on ESP32
5859
#define noTone(a) void()
5960
#define TONE_PIN 42 // Dummy for examples using it
6061

@@ -104,6 +105,13 @@
104105
#define IR_SEND_PIN 11
105106
#define TONE_PIN 3
106107

108+
#elif defined(__AVR_ATtiny1604__)
109+
#define IR_RECEIVE_PIN 2 // To be compatible with interrupt example, pin 2 is chosen here.
110+
#define IR_SEND_PIN 3
111+
#define TONE_PIN 42 // Dummy for examples using it
112+
#define tone(a,b,c) void() // tone() uses the same vector as receive timer
113+
#define noTone(a) void()
114+
107115
# elif defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) \
108116
|| defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) \
109117
|| defined(__AVR_ATmega324P__) || defined(__AVR_ATmega324A__) \

examples/SendLGAirConditionerDemo/PinDefinitionsAndMore.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
* ATtin167 9 8 5 // Digispark pro number schema
3535
* ATtin167 3 2 7
3636
* ATtin3217 10 11 3 // TinyCore schema
37+
* ATtin1604 10 11 % // MegaTinyCore schema
3738
* SAMD21 3 4 5
3839
* ESP8266 14 // D5 12 // D6 %
3940
* ESP32 15 4 %
@@ -46,15 +47,15 @@
4647
#define FEEDBACK_LED_IS_ACTIVE_LOW // The LED on my board is active LOW
4748
#define IR_RECEIVE_PIN 14 // D5
4849
#define IR_SEND_PIN 12 // D6 - D4/2 is internal LED
49-
#define tone(a,b) void() // tone() inhibits receive timer
50+
#define tone(a,b,c) void() // tone() inhibits receive timer
5051
#define noTone(a) void()
5152
#define TONE_PIN 42 // Dummy for examples using it
5253
#define IR_TIMING_TEST_PIN 13 // D7
5354

5455
#elif defined(ESP32)
5556
#define IR_RECEIVE_PIN 15 // D15
5657
#define IR_SEND_PIN 4 // D4
57-
#define tone(a,b) void() // no tone() available on ESP32
58+
#define tone(a,b,c) void() // no tone() available on ESP32
5859
#define noTone(a) void()
5960
#define TONE_PIN 42 // Dummy for examples using it
6061

@@ -104,6 +105,13 @@
104105
#define IR_SEND_PIN 11
105106
#define TONE_PIN 3
106107

108+
#elif defined(__AVR_ATtiny1604__)
109+
#define IR_RECEIVE_PIN 2 // To be compatible with interrupt example, pin 2 is chosen here.
110+
#define IR_SEND_PIN 3
111+
#define TONE_PIN 42 // Dummy for examples using it
112+
#define tone(a,b,c) void() // tone() uses the same vector as receive timer
113+
#define noTone(a) void()
114+
107115
# elif defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) \
108116
|| defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) \
109117
|| defined(__AVR_ATmega324P__) || defined(__AVR_ATmega324A__) \

examples/SendProntoDemo/PinDefinitionsAndMore.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
* ATtin167 9 8 5 // Digispark pro number schema
3535
* ATtin167 3 2 7
3636
* ATtin3217 10 11 3 // TinyCore schema
37+
* ATtin1604 10 11 % // MegaTinyCore schema
3738
* SAMD21 3 4 5
3839
* ESP8266 14 // D5 12 // D6 %
3940
* ESP32 15 4 %
@@ -46,15 +47,15 @@
4647
#define FEEDBACK_LED_IS_ACTIVE_LOW // The LED on my board is active LOW
4748
#define IR_RECEIVE_PIN 14 // D5
4849
#define IR_SEND_PIN 12 // D6 - D4/2 is internal LED
49-
#define tone(a,b) void() // tone() inhibits receive timer
50+
#define tone(a,b,c) void() // tone() inhibits receive timer
5051
#define noTone(a) void()
5152
#define TONE_PIN 42 // Dummy for examples using it
5253
#define IR_TIMING_TEST_PIN 13 // D7
5354

5455
#elif defined(ESP32)
5556
#define IR_RECEIVE_PIN 15 // D15
5657
#define IR_SEND_PIN 4 // D4
57-
#define tone(a,b) void() // no tone() available on ESP32
58+
#define tone(a,b,c) void() // no tone() available on ESP32
5859
#define noTone(a) void()
5960
#define TONE_PIN 42 // Dummy for examples using it
6061

@@ -104,6 +105,13 @@
104105
#define IR_SEND_PIN 11
105106
#define TONE_PIN 3
106107

108+
#elif defined(__AVR_ATtiny1604__)
109+
#define IR_RECEIVE_PIN 2 // To be compatible with interrupt example, pin 2 is chosen here.
110+
#define IR_SEND_PIN 3
111+
#define TONE_PIN 42 // Dummy for examples using it
112+
#define tone(a,b,c) void() // tone() uses the same vector as receive timer
113+
#define noTone(a) void()
114+
107115
# elif defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) \
108116
|| defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) \
109117
|| defined(__AVR_ATmega324P__) || defined(__AVR_ATmega324A__) \

0 commit comments

Comments
 (0)