Skip to content

Commit b512cdd

Browse files
committed
ATtiny3217 support
1 parent 47bdba1 commit b512cdd

File tree

22 files changed

+305
-279
lines changed

22 files changed

+305
-279
lines changed

.github/workflows/LibraryBuild.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ jobs:
6363
- MegaCore:avr:128:bootloader=no_bootloader,eeprom=keep,BOD=2v7,LTO=Os_flto,clock=8MHz_internal # ATmega128
6464
- SparkFun:avr:promicro
6565
- megaTinyCore:megaavr:atxy4:chip=1604,clock=16internal
66+
- megaTinyCore:megaavr:atxy7:chip=3217,clock=16internal
6667
- esp8266:esp8266:d1_mini:eesz=4M3M,xtal=80
6768
- esp32:esp32:featheresp32:FlashFreq=80
6869
- STMicroelectronics:stm32:GenF1:pnum=BLUEPILL_F103C8
@@ -136,6 +137,12 @@ jobs:
136137
build-properties: # the flags were put in compiler.cpp.extra_flags
137138
IRremoteExtensionTest: -DRAW_BUFFER_LENGTH=100
138139

140+
- arduino-boards-fqbn: megaTinyCore:megaavr:atxy7:chip=3217,clock=16internal
141+
platform-url: http://drazzy.com/package_drazzy.com_index.json
142+
# sketches-exclude: MinimalReceiver,IRDispatcherDemo,MicroGirs,UnitTest # digitalWriteFast.h not available for this board
143+
build-properties: # the flags were put in compiler.cpp.extra_flags
144+
IRremoteExtensionTest: -DRAW_BUFFER_LENGTH=100
145+
139146
- arduino-boards-fqbn: digistump:avr:digispark-tiny:clock=clock16
140147
platform-url: https://raw.githubusercontent.com/ArminJo/DigistumpArduino/master/package_digistump_index.json
141148
required-libraries: ATtinySerialOut
@@ -159,7 +166,8 @@ jobs:
159166
- arduino-boards-fqbn: TinyCore:avr:tiny32
160167
platform-url: https://raw.githubusercontent.com/xukangmin/TinyCore/master/avr/package/package_tinycore_index.json
161168
build-properties: # the flags were put in compiler.cpp.extra_flags
162-
IRremoteExtensionTest: -DRAW_BUFFER_LENGTH=100
169+
All: -DIR_USE_AVR_TIMER_D
170+
IRremoteExtensionTest: -DIR_USE_AVR_TIMER_D -DRAW_BUFFER_LENGTH=100
163171

164172
- arduino-boards-fqbn: MegaCore:avr:128:bootloader=no_bootloader,eeprom=keep,BOD=2v7,LTO=Os_flto,clock=8MHz_internal
165173
platform-url: https://mcudude.github.io/MegaCore/package_MCUdude_MegaCore_index.json

examples/ControlRelay/PinDefinitionsAndMore.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Contains pin definitions for IRremote examples for various platforms
55
* as well as definitions for feedback LED and tone() and includes
66
*
7-
* Copyright (C) 2021 Armin Joachimsmeyer
7+
* Copyright (C) 2021-2022 Armin Joachimsmeyer
88
99
*
1010
* This file is part of IRremote https://github.com/Arduino-IRremote/Arduino-IRremote.
@@ -27,14 +27,14 @@
2727
/*
2828
* Pin mapping table for different platforms
2929
*
30-
* Platform IR input IR output Tone
31-
* -----------------------------------------
30+
* Platform IR input IR output Tone Core/Pin schema
31+
* --------------------------------------------------------------
3232
* DEFAULT/AVR 2 3 4
33-
* ATtinyX5 0 4 3
34-
* ATtiny167 9 8 5 // Digispark pro number schema
35-
* ATtiny167 3 2 7
36-
* ATtiny3217 10 11 3 // TinyCore schema
37-
* ATtiny1604 2 PA5|3 %
33+
* ATtinyX5 0|PB0 4|PB4 3|PB3
34+
* ATtiny167 3|PA3 2|PA2 7|PA7 ATTinyCore
35+
* ATtiny167 9|PA3 8|PA2 5|PA7 Digispark pro
36+
* ATtiny3217 18|PA1 19|PA2 20|PA3 MegaTinyCore
37+
* ATtiny1604 2 3|PA5 %
3838
* SAMD21 3 4 5
3939
* ESP8266 14|D5 12|D6 %
4040
* ESP32 15 4 27
@@ -127,13 +127,13 @@ void noTone(uint8_t _pin){
127127
#define TONE_PIN 9
128128
#define _IR_TIMING_TEST_PIN 8
129129

130-
#elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__) // TinyCore boards
131-
#define IR_RECEIVE_PIN 10
132-
#define IR_SEND_PIN 11
133-
#define TONE_PIN 3
134-
#define APPLICATION_PIN 5
135-
136-
#define LED_BUILTIN 15 // No LED available on the board, take the one on the programming board which is connected to the DAC output
130+
#elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__)
131+
#define IR_RECEIVE_PIN 18
132+
#define IR_SEND_PIN 19
133+
#define TONE_PIN 20
134+
#define APPLICATION_PIN 0 // PA4
135+
#undef LED_BUILTIN // No LED available on the TinyCore 32 board, take the one on the programming board which is connected to the DAC output
136+
#define LED_BUILTIN 2 // PA6
137137

138138
#elif defined(__AVR_ATtiny1604__)
139139
#define IR_RECEIVE_PIN 2 // To be compatible with interrupt example, pin 2 is chosen here.

examples/IRDispatcherDemo/PinDefinitionsAndMore.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Contains pin definitions for IRremote examples for various platforms
55
* as well as definitions for feedback LED and tone() and includes
66
*
7-
* Copyright (C) 2021 Armin Joachimsmeyer
7+
* Copyright (C) 2021-2022 Armin Joachimsmeyer
88
99
*
1010
* This file is part of IRremote https://github.com/Arduino-IRremote/Arduino-IRremote.
@@ -27,14 +27,14 @@
2727
/*
2828
* Pin mapping table for different platforms
2929
*
30-
* Platform IR input IR output Tone
31-
* -----------------------------------------
30+
* Platform IR input IR output Tone Core/Pin schema
31+
* --------------------------------------------------------------
3232
* DEFAULT/AVR 2 3 4
33-
* ATtinyX5 0 4 3
34-
* ATtiny167 9 8 5 // Digispark pro number schema
35-
* ATtiny167 3 2 7
36-
* ATtiny3217 10 11 3 // TinyCore schema
37-
* ATtiny1604 2 PA5|3 %
33+
* ATtinyX5 0|PB0 4|PB4 3|PB3
34+
* ATtiny167 3|PA3 2|PA2 7|PA7 ATTinyCore
35+
* ATtiny167 9|PA3 8|PA2 5|PA7 Digispark pro
36+
* ATtiny3217 18|PA1 19|PA2 20|PA3 MegaTinyCore
37+
* ATtiny1604 2 3|PA5 %
3838
* SAMD21 3 4 5
3939
* ESP8266 14|D5 12|D6 %
4040
* ESP32 15 4 27
@@ -127,13 +127,13 @@ void noTone(uint8_t _pin){
127127
#define TONE_PIN 9
128128
#define _IR_TIMING_TEST_PIN 8
129129

130-
#elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__) // TinyCore boards
131-
#define IR_RECEIVE_PIN 10
132-
#define IR_SEND_PIN 11
133-
#define TONE_PIN 3
134-
#define APPLICATION_PIN 5
135-
136-
#define LED_BUILTIN 15 // No LED available on the board, take the one on the programming board which is connected to the DAC output
130+
#elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__)
131+
#define IR_RECEIVE_PIN 18
132+
#define IR_SEND_PIN 19
133+
#define TONE_PIN 20
134+
#define APPLICATION_PIN 0 // PA4
135+
#undef LED_BUILTIN // No LED available on the TinyCore 32 board, take the one on the programming board which is connected to the DAC output
136+
#define LED_BUILTIN 2 // PA6
137137

138138
#elif defined(__AVR_ATtiny1604__)
139139
#define IR_RECEIVE_PIN 2 // To be compatible with interrupt example, pin 2 is chosen here.

examples/IRremoteExtensionTest/PinDefinitionsAndMore.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Contains pin definitions for IRremote examples for various platforms
55
* as well as definitions for feedback LED and tone() and includes
66
*
7-
* Copyright (C) 2021 Armin Joachimsmeyer
7+
* Copyright (C) 2021-2022 Armin Joachimsmeyer
88
99
*
1010
* This file is part of IRremote https://github.com/Arduino-IRremote/Arduino-IRremote.
@@ -27,14 +27,14 @@
2727
/*
2828
* Pin mapping table for different platforms
2929
*
30-
* Platform IR input IR output Tone
31-
* -----------------------------------------
30+
* Platform IR input IR output Tone Core/Pin schema
31+
* --------------------------------------------------------------
3232
* DEFAULT/AVR 2 3 4
33-
* ATtinyX5 0 4 3
34-
* ATtiny167 9 8 5 // Digispark pro number schema
35-
* ATtiny167 3 2 7
36-
* ATtiny3217 10 11 3 // TinyCore schema
37-
* ATtiny1604 2 PA5|3 %
33+
* ATtinyX5 0|PB0 4|PB4 3|PB3
34+
* ATtiny167 3|PA3 2|PA2 7|PA7 ATTinyCore
35+
* ATtiny167 9|PA3 8|PA2 5|PA7 Digispark pro
36+
* ATtiny3217 18|PA1 19|PA2 20|PA3 MegaTinyCore
37+
* ATtiny1604 2 3|PA5 %
3838
* SAMD21 3 4 5
3939
* ESP8266 14|D5 12|D6 %
4040
* ESP32 15 4 27
@@ -127,13 +127,13 @@ void noTone(uint8_t _pin){
127127
#define TONE_PIN 9
128128
#define _IR_TIMING_TEST_PIN 8
129129

130-
#elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__) // TinyCore boards
131-
#define IR_RECEIVE_PIN 10
132-
#define IR_SEND_PIN 11
133-
#define TONE_PIN 3
134-
#define APPLICATION_PIN 5
135-
136-
#define LED_BUILTIN 15 // No LED available on the board, take the one on the programming board which is connected to the DAC output
130+
#elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__)
131+
#define IR_RECEIVE_PIN 18
132+
#define IR_SEND_PIN 19
133+
#define TONE_PIN 20
134+
#define APPLICATION_PIN 0 // PA4
135+
#undef LED_BUILTIN // No LED available on the TinyCore 32 board, take the one on the programming board which is connected to the DAC output
136+
#define LED_BUILTIN 2 // PA6
137137

138138
#elif defined(__AVR_ATtiny1604__)
139139
#define IR_RECEIVE_PIN 2 // To be compatible with interrupt example, pin 2 is chosen here.

examples/MicroGirs/PinDefinitionsAndMore.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Contains pin definitions for IRremote examples for various platforms
55
* as well as definitions for feedback LED and tone() and includes
66
*
7-
* Copyright (C) 2021 Armin Joachimsmeyer
7+
* Copyright (C) 2021-2022 Armin Joachimsmeyer
88
99
*
1010
* This file is part of IRremote https://github.com/Arduino-IRremote/Arduino-IRremote.
@@ -27,14 +27,14 @@
2727
/*
2828
* Pin mapping table for different platforms
2929
*
30-
* Platform IR input IR output Tone
31-
* -----------------------------------------
30+
* Platform IR input IR output Tone Core/Pin schema
31+
* --------------------------------------------------------------
3232
* DEFAULT/AVR 2 3 4
33-
* ATtinyX5 0 4 3
34-
* ATtiny167 9 8 5 // Digispark pro number schema
35-
* ATtiny167 3 2 7
36-
* ATtiny3217 10 11 3 // TinyCore schema
37-
* ATtiny1604 2 PA5|3 %
33+
* ATtinyX5 0|PB0 4|PB4 3|PB3
34+
* ATtiny167 3|PA3 2|PA2 7|PA7 ATTinyCore
35+
* ATtiny167 9|PA3 8|PA2 5|PA7 Digispark pro
36+
* ATtiny3217 18|PA1 19|PA2 20|PA3 MegaTinyCore
37+
* ATtiny1604 2 3|PA5 %
3838
* SAMD21 3 4 5
3939
* ESP8266 14|D5 12|D6 %
4040
* ESP32 15 4 27
@@ -127,13 +127,13 @@ void noTone(uint8_t _pin){
127127
#define TONE_PIN 9
128128
#define _IR_TIMING_TEST_PIN 8
129129

130-
#elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__) // TinyCore boards
131-
#define IR_RECEIVE_PIN 10
132-
#define IR_SEND_PIN 11
133-
#define TONE_PIN 3
134-
#define APPLICATION_PIN 5
135-
136-
#define LED_BUILTIN 15 // No LED available on the board, take the one on the programming board which is connected to the DAC output
130+
#elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__)
131+
#define IR_RECEIVE_PIN 18
132+
#define IR_SEND_PIN 19
133+
#define TONE_PIN 20
134+
#define APPLICATION_PIN 0 // PA4
135+
#undef LED_BUILTIN // No LED available on the TinyCore 32 board, take the one on the programming board which is connected to the DAC output
136+
#define LED_BUILTIN 2 // PA6
137137

138138
#elif defined(__AVR_ATtiny1604__)
139139
#define IR_RECEIVE_PIN 2 // To be compatible with interrupt example, pin 2 is chosen here.

examples/ReceiveAndSend/PinDefinitionsAndMore.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Contains pin definitions for IRremote examples for various platforms
55
* as well as definitions for feedback LED and tone() and includes
66
*
7-
* Copyright (C) 2021 Armin Joachimsmeyer
7+
* Copyright (C) 2021-2022 Armin Joachimsmeyer
88
99
*
1010
* This file is part of IRremote https://github.com/Arduino-IRremote/Arduino-IRremote.
@@ -27,14 +27,14 @@
2727
/*
2828
* Pin mapping table for different platforms
2929
*
30-
* Platform IR input IR output Tone
31-
* -----------------------------------------
30+
* Platform IR input IR output Tone Core/Pin schema
31+
* --------------------------------------------------------------
3232
* DEFAULT/AVR 2 3 4
33-
* ATtinyX5 0 4 3
34-
* ATtiny167 9 8 5 // Digispark pro number schema
35-
* ATtiny167 3 2 7
36-
* ATtiny3217 10 11 3 // TinyCore schema
37-
* ATtiny1604 2 PA5|3 %
33+
* ATtinyX5 0|PB0 4|PB4 3|PB3
34+
* ATtiny167 3|PA3 2|PA2 7|PA7 ATTinyCore
35+
* ATtiny167 9|PA3 8|PA2 5|PA7 Digispark pro
36+
* ATtiny3217 18|PA1 19|PA2 20|PA3 MegaTinyCore
37+
* ATtiny1604 2 3|PA5 %
3838
* SAMD21 3 4 5
3939
* ESP8266 14|D5 12|D6 %
4040
* ESP32 15 4 27
@@ -127,13 +127,13 @@ void noTone(uint8_t _pin){
127127
#define TONE_PIN 9
128128
#define _IR_TIMING_TEST_PIN 8
129129

130-
#elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__) // TinyCore boards
131-
#define IR_RECEIVE_PIN 10
132-
#define IR_SEND_PIN 11
133-
#define TONE_PIN 3
134-
#define APPLICATION_PIN 5
135-
136-
#define LED_BUILTIN 15 // No LED available on the board, take the one on the programming board which is connected to the DAC output
130+
#elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__)
131+
#define IR_RECEIVE_PIN 18
132+
#define IR_SEND_PIN 19
133+
#define TONE_PIN 20
134+
#define APPLICATION_PIN 0 // PA4
135+
#undef LED_BUILTIN // No LED available on the TinyCore 32 board, take the one on the programming board which is connected to the DAC output
136+
#define LED_BUILTIN 2 // PA6
137137

138138
#elif defined(__AVR_ATtiny1604__)
139139
#define IR_RECEIVE_PIN 2 // To be compatible with interrupt example, pin 2 is chosen here.

examples/ReceiveDemo/PinDefinitionsAndMore.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Contains pin definitions for IRremote examples for various platforms
55
* as well as definitions for feedback LED and tone() and includes
66
*
7-
* Copyright (C) 2021 Armin Joachimsmeyer
7+
* Copyright (C) 2021-2022 Armin Joachimsmeyer
88
99
*
1010
* This file is part of IRremote https://github.com/Arduino-IRremote/Arduino-IRremote.
@@ -27,14 +27,14 @@
2727
/*
2828
* Pin mapping table for different platforms
2929
*
30-
* Platform IR input IR output Tone
31-
* -----------------------------------------
30+
* Platform IR input IR output Tone Core/Pin schema
31+
* --------------------------------------------------------------
3232
* DEFAULT/AVR 2 3 4
33-
* ATtinyX5 0 4 3
34-
* ATtiny167 9 8 5 // Digispark pro number schema
35-
* ATtiny167 3 2 7
36-
* ATtiny3217 10 11 3 // TinyCore schema
37-
* ATtiny1604 2 PA5|3 %
33+
* ATtinyX5 0|PB0 4|PB4 3|PB3
34+
* ATtiny167 3|PA3 2|PA2 7|PA7 ATTinyCore
35+
* ATtiny167 9|PA3 8|PA2 5|PA7 Digispark pro
36+
* ATtiny3217 18|PA1 19|PA2 20|PA3 MegaTinyCore
37+
* ATtiny1604 2 3|PA5 %
3838
* SAMD21 3 4 5
3939
* ESP8266 14|D5 12|D6 %
4040
* ESP32 15 4 27
@@ -127,13 +127,13 @@ void noTone(uint8_t _pin){
127127
#define TONE_PIN 9
128128
#define _IR_TIMING_TEST_PIN 8
129129

130-
#elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__) // TinyCore boards
131-
#define IR_RECEIVE_PIN 10
132-
#define IR_SEND_PIN 11
133-
#define TONE_PIN 3
134-
#define APPLICATION_PIN 5
135-
136-
#define LED_BUILTIN 15 // No LED available on the board, take the one on the programming board which is connected to the DAC output
130+
#elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__)
131+
#define IR_RECEIVE_PIN 18
132+
#define IR_SEND_PIN 19
133+
#define TONE_PIN 20
134+
#define APPLICATION_PIN 0 // PA4
135+
#undef LED_BUILTIN // No LED available on the TinyCore 32 board, take the one on the programming board which is connected to the DAC output
136+
#define LED_BUILTIN 2 // PA6
137137

138138
#elif defined(__AVR_ATtiny1604__)
139139
#define IR_RECEIVE_PIN 2 // To be compatible with interrupt example, pin 2 is chosen here.

examples/ReceiveDump/PinDefinitionsAndMore.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Contains pin definitions for IRremote examples for various platforms
55
* as well as definitions for feedback LED and tone() and includes
66
*
7-
* Copyright (C) 2021 Armin Joachimsmeyer
7+
* Copyright (C) 2021-2022 Armin Joachimsmeyer
88
99
*
1010
* This file is part of IRremote https://github.com/Arduino-IRremote/Arduino-IRremote.
@@ -27,14 +27,14 @@
2727
/*
2828
* Pin mapping table for different platforms
2929
*
30-
* Platform IR input IR output Tone
31-
* -----------------------------------------
30+
* Platform IR input IR output Tone Core/Pin schema
31+
* --------------------------------------------------------------
3232
* DEFAULT/AVR 2 3 4
33-
* ATtinyX5 0 4 3
34-
* ATtiny167 9 8 5 // Digispark pro number schema
35-
* ATtiny167 3 2 7
36-
* ATtiny3217 10 11 3 // TinyCore schema
37-
* ATtiny1604 2 PA5|3 %
33+
* ATtinyX5 0|PB0 4|PB4 3|PB3
34+
* ATtiny167 3|PA3 2|PA2 7|PA7 ATTinyCore
35+
* ATtiny167 9|PA3 8|PA2 5|PA7 Digispark pro
36+
* ATtiny3217 18|PA1 19|PA2 20|PA3 MegaTinyCore
37+
* ATtiny1604 2 3|PA5 %
3838
* SAMD21 3 4 5
3939
* ESP8266 14|D5 12|D6 %
4040
* ESP32 15 4 27
@@ -127,13 +127,13 @@ void noTone(uint8_t _pin){
127127
#define TONE_PIN 9
128128
#define _IR_TIMING_TEST_PIN 8
129129

130-
#elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__) // TinyCore boards
131-
#define IR_RECEIVE_PIN 10
132-
#define IR_SEND_PIN 11
133-
#define TONE_PIN 3
134-
#define APPLICATION_PIN 5
135-
136-
#define LED_BUILTIN 15 // No LED available on the board, take the one on the programming board which is connected to the DAC output
130+
#elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__)
131+
#define IR_RECEIVE_PIN 18
132+
#define IR_SEND_PIN 19
133+
#define TONE_PIN 20
134+
#define APPLICATION_PIN 0 // PA4
135+
#undef LED_BUILTIN // No LED available on the TinyCore 32 board, take the one on the programming board which is connected to the DAC output
136+
#define LED_BUILTIN 2 // PA6
137137

138138
#elif defined(__AVR_ATtiny1604__)
139139
#define IR_RECEIVE_PIN 2 // To be compatible with interrupt example, pin 2 is chosen here.

0 commit comments

Comments
 (0)