forked from Arduino-IRremote/Arduino-IRremote
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Usage of ATTinyCore pin numbering scheme e.g. PIN_PB2.
- Loading branch information
Showing
25 changed files
with
1,218 additions
and
943 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ jobs: | |
# | ||
# Examples: arduino:avr:uno, arduino:avr:leonardo, arduino:avr:nano, arduino:avr:mega | ||
# arduino:sam:arduino_due_x, arduino:samd:arduino_zero_native" | ||
# ATTinyCore:avr:attinyx5:chip=85,clock=1internal, digistump:avr:digispark-tiny, digistump:avr:digispark-pro | ||
# ATTinyCore:avr:attinyx5:chip=85,clock=1internal | ||
# STMicroelectronics:stm32:GenF1:pnum=BLUEPILL_F103C8 | ||
# esp8266:esp8266:huzzah:eesz=4M3M,xtal=80, esp32:esp32:featheresp32:FlashFreq=80 | ||
# You may add a suffix behind the fqbn with "|" to specify one board for e.g. different compile options like arduino:avr:uno|trace | ||
|
@@ -59,14 +59,13 @@ jobs: | |
- arduino:mbed:nano33ble | ||
- arduino:mbed_rp2040:pico | ||
- rp2040:rp2040:arduino_nano_connect | ||
- digistump:avr:digispark-tiny:clock=clock16 | ||
- ATTinyCore:avr:attinyx5micr:LTO=enable,sketchclock=16pll | ||
- ATTinyCore:avr:attinyx7micr:LTO=enable,sketchclock=16external,pinmapping=new,millis=enabled | ||
- ATTinyCore:avr:attinyx8micr:LTO=enable,sketchclock=16external,pinmapping=mhtiny,millis=enabled # ATtiny88 China clone board @16 MHz | ||
- MegaCore:avr:128:bootloader=no_bootloader,eeprom=keep,BOD=2v7,LTO=Os_flto,clock=8MHz_internal # ATmega128 | ||
- SparkFun:avr:promicro | ||
# - megaTinyCore:megaavr:atxy4:chip=1604,clock=16internal | ||
# - megaTinyCore:megaavr:atxy7:chip=3217,clock=16internal | ||
# - megaTinyCore:megaavr:atxy4:chip=1604,clock=16internal # https://github.com/SpenceKonde/megaTinyCore/issues/935 | ||
# - megaTinyCore:megaavr:atxy7:chip=3217,clock=16internal # https://github.com/SpenceKonde/megaTinyCore/issues/935 | ||
- esp8266:esp8266:d1_mini:eesz=4M3M,xtal=80 | ||
- esp32:esp32:featheresp32:FlashFreq=80 | ||
- STMicroelectronics:stm32:GenF1:pnum=BLUEPILL_F103C8 | ||
|
@@ -162,29 +161,22 @@ jobs: | |
SimpleSender: -DSEND_PWM_BY_TIMER | ||
All: -DRAW_BUFFER_LENGTH=700 | ||
|
||
# https://github.com/SpenceKonde/megaTinyCore/issues/935 | ||
# - arduino-boards-fqbn: megaTinyCore:megaavr:atxy4:chip=1604,clock=16internal | ||
# arduino-platform: megaTinyCore:[email protected] # The current 2.6.0 is broken see https://github.com/SpenceKonde/megaTinyCore/issues/805 | ||
# arduino-platform: megaTinyCore:megaavr | ||
# platform-url: http://drazzy.com/package_drazzy.com_index.json | ||
# sketches-exclude: AllProtocolsOnLCD | ||
# build-properties: # the flags were put in compiler.cpp.extra_flags | ||
# IRremoteExtensionTest: -DRAW_BUFFER_LENGTH=100 | ||
|
||
# https://github.com/SpenceKonde/megaTinyCore/issues/935 | ||
# - arduino-boards-fqbn: megaTinyCore:megaavr:atxy7:chip=3217,clock=16internal | ||
# arduino-platform: megaTinyCore:[email protected] | ||
# arduino-platform: megaTinyCore:megaavr | ||
# platform-url: http://drazzy.com/package_drazzy.com_index.json | ||
# sketches-exclude: AllProtocolsOnLCD | ||
# build-properties: # the flags were put in compiler.cpp.extra_flags | ||
# IRremoteExtensionTest: -DRAW_BUFFER_LENGTH=100 | ||
|
||
- arduino-boards-fqbn: digistump:avr:digispark-tiny:clock=clock16 | ||
platform-url: https://raw.githubusercontent.com/ArminJo/DigistumpArduino/master/package_digistump_index.json | ||
required-libraries: ATtinySerialOut | ||
sketch-names: TinyReceiver.ino,IRremoteInfo.ino,SimpleReceiver.ino,ControlRelay.ino,SimpleSender.ino,SendDemo.ino,SendRawDemo.ino,SendAndReceive.ino | ||
build-properties: # the flags were put in compiler.cpp.extra_flags | ||
SimpleSender: -DSEND_PWM_BY_TIMER | ||
|
||
- arduino-boards-fqbn: ATTinyCore:avr:attinyx5micr:LTO=enable,sketchclock=16pll | ||
platform-url: http://drazzy.com/package_drazzy.com_index.json | ||
required-libraries: ATtinySerialOut | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* Contains pin definitions for IRremote examples for various platforms | ||
* as well as definitions for feedback LED and tone() and includes | ||
* | ||
* Copyright (C) 2021-2022 Armin Joachimsmeyer | ||
* Copyright (C) 2021-2023 Armin Joachimsmeyer | ||
* [email protected] | ||
* | ||
* This file is part of IRremote https://github.com/Arduino-IRremote/Arduino-IRremote. | ||
|
@@ -32,7 +32,9 @@ | |
* DEFAULT/AVR 2 3 4 Arduino | ||
* ATtinyX5 0|PB0 4|PB4 3|PB3 ATTinyCore | ||
* ATtiny167 3|PA3 2|PA2 7|PA7 ATTinyCore | ||
* ATtiny167 9|PA3 8|PA2 5|PA7 Digispark pro | ||
* ATtiny167 9|PA3 8|PA2 5|PA7 Digispark original core | ||
* ATtiny84 |PB2 |PA4 |PA3 ATTinyCore | ||
* ATtiny88 3|PD3 4|PD4 9|PB1 ATTinyCore | ||
* ATtiny3217 18|PA1 19|PA2 20|PA3 MegaTinyCore | ||
* ATtiny1604 2 3|PA5 % | ||
* ATtiny816 14|PA1 16|PA3 1|PA5 MegaTinyCore | ||
|
@@ -47,66 +49,78 @@ | |
//#define _IR_MEASURE_TIMING // For debugging purposes. | ||
|
||
#if defined(__AVR__) | ||
#if defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) // Digispark board | ||
#include "ATtinySerialOut.hpp" // TX is at pin 2 - Available as Arduino library "ATtinySerialOut". Saves 700 bytes program memory and 70 bytes RAM for ATtinyCore | ||
#define IR_RECEIVE_PIN 0 | ||
#define IR_SEND_PIN 4 // Pin 2 is serial output with ATtinySerialOut. Pin 1 is internal LED and Pin3 is USB+ with pullup on Digispark board. | ||
#define TONE_PIN 3 | ||
#define _IR_TIMING_TEST_PIN 3 | ||
#if defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) // Digispark board. For use with ATTinyCore. | ||
#include "ATtinySerialOut.hpp" // TX is at pin 2 - Available as Arduino library "ATtinySerialOut". Saves 700 bytes program memory and 70 bytes RAM for ATtinyCore. | ||
#define IR_RECEIVE_PIN PIN_PB0 | ||
#define IR_SEND_PIN PIN_PB4 // Pin 2 is serial output with ATtinySerialOut. Pin 1 is internal LED and Pin3 is USB+ with pullup on Digispark board. | ||
#define TONE_PIN PIN_PB3 | ||
#define _IR_TIMING_TEST_PIN PIN_PB3 | ||
|
||
# elif defined(__AVR_ATtiny87__) || defined(__AVR_ATtiny167__) // Digispark pro board | ||
#include "ATtinySerialOut.hpp" // Available as Arduino library "ATtinySerialOut" | ||
// For ATtiny167 Pins PB6 and PA3 are usable as interrupt source. | ||
# if defined(ARDUINO_AVR_DIGISPARKPRO) | ||
// For use with Digispark original core | ||
#define IR_RECEIVE_PIN 9 // PA3 - on Digispark board labeled as pin 9 | ||
//#define IR_RECEIVE_PIN 14 // PB6 / INT0 is connected to USB+ on DigisparkPro boards | ||
#define IR_SEND_PIN 8 // PA2 - on Digispark board labeled as pin 8 | ||
#define TONE_PIN 5 // PA7 - on Digispark board labeled as pin 5 | ||
#define _IR_TIMING_TEST_PIN 10 // PA4 | ||
# else | ||
#define IR_RECEIVE_PIN 3 // PA3 - on Digispark board labeled as pin 9 | ||
#define IR_SEND_PIN 2 // PA2 - on Digispark board labeled as pin 8 | ||
#define TONE_PIN 7 // PA7 - on Digispark board labeled as pin 5 | ||
// For use with ATTinyCore | ||
#define IR_RECEIVE_PIN PIN_PA3 // On Digispark board labeled as pin 9 - INT0 is connected to USB+ on DigisparkPro boards | ||
#define IR_SEND_PIN PIN_PA2 // On Digispark board labeled as pin 8 | ||
#define TONE_PIN PIN_PA7 // On Digispark board labeled as pin 5 | ||
# endif | ||
|
||
# elif defined(__AVR_ATtiny88__) // MH-ET Tiny88 board | ||
#include "ATtinySerialOut.hpp" // Available as Arduino library "ATtinySerialOut". Saves 128 bytes program memory | ||
// Pin 6 is TX pin 7 is RX | ||
#define IR_RECEIVE_PIN 3 // INT1 | ||
#define IR_SEND_PIN 4 | ||
#define TONE_PIN 9 | ||
#define _IR_TIMING_TEST_PIN 8 | ||
|
||
# elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__) // Tiny Core Dev board | ||
#define IR_RECEIVE_PIN 18 | ||
#define IR_SEND_PIN 19 | ||
#define TONE_PIN 20 | ||
#define APPLICATION_PIN 0 // PA4 | ||
#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 | ||
#define LED_BUILTIN 2 // PA6 | ||
|
||
# elif defined(__AVR_ATtiny816__) // Tiny Core Micro | ||
#define IR_RECEIVE_PIN 14 // PA1 | ||
#define IR_SEND_PIN 16 // PA3 | ||
#define TONE_PIN 1 // PA5 | ||
#define APPLICATION_PIN 0 // PA4 | ||
#undef LED_BUILTIN // No LED available, take the one which is connected to the DAC output | ||
#define LED_BUILTIN 4 // PB5 | ||
|
||
# elif defined(__AVR_ATtiny1614__) | ||
#define IR_RECEIVE_PIN 8 // PA1 | ||
#define IR_SEND_PIN 10 // PA3 | ||
#define TONE_PIN 1 // PA5 | ||
#define APPLICATION_PIN 0 // PA4 | ||
|
||
# elif defined(__AVR_ATtiny1604__) | ||
#define IR_RECEIVE_PIN 2 // To be compatible with interrupt example, pin 2 is chosen here. | ||
#define IR_SEND_PIN 3 | ||
#define APPLICATION_PIN 5 | ||
# elif defined(__AVR_ATtiny84__) // For use with ATTinyCore | ||
#include "ATtinySerialOut.hpp" // Available as Arduino library "ATtinySerialOut". Saves 128 bytes program memory. | ||
#define IR_RECEIVE_PIN PIN_PB2 // INT0 | ||
#define IR_SEND_PIN PIN_PA4 | ||
#define TONE_PIN PIN_PA3 | ||
#define _IR_TIMING_TEST_PIN PIN_PA5 | ||
|
||
# elif defined(__AVR_ATtiny88__) // MH-ET Tiny88 board. For use with ATTinyCore. | ||
#include "ATtinySerialOut.hpp" // Available as Arduino library "ATtinySerialOut". Saves 128 bytes program memory. | ||
// Pin 6 is TX, pin 7 is RX | ||
#define IR_RECEIVE_PIN PIN_PD3 // 3 - INT1 | ||
#define IR_SEND_PIN PIN_PD4 // 4 | ||
#define TONE_PIN PIN_PB1 // 9 | ||
#define _IR_TIMING_TEST_PIN PIN_PB0 // 8 | ||
|
||
# elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__) // For use with megaTinyCore | ||
// Tiny Core Dev board | ||
// https://www.tindie.com/products/xkimi/tiny-core-16-dev-board-attiny1616/ | ||
// https://www.tindie.com/products/xkimi/tiny-core-32-dev-board-attiny3217/ | ||
#define IR_RECEIVE_PIN PIN_PA1 // use 18 for TinyCore32 | ||
#define IR_SEND_PIN PIN_PA2 // 19 | ||
#define TONE_PIN PIN_PA3 // 20 | ||
#define APPLICATION_PIN PIN_PA0 // 0 | ||
#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 | ||
#define LED_BUILTIN PIN_PA6 // use 2 for TinyCore32 | ||
|
||
# elif defined(__AVR_ATtiny816__) // For use with megaTinyCore | ||
#define IR_RECEIVE_PIN PIN_PA1 // 14 | ||
#define IR_SEND_PIN PIN_PA1 // 16 | ||
#define TONE_PIN PIN_PA5 // 1 | ||
#define APPLICATION_PIN PIN_PA4 // 0 | ||
#undef LED_BUILTIN // No LED available, take the one which is connected to the DAC output | ||
#define LED_BUILTIN PIN_PB5 // 4 | ||
|
||
# elif defined(__AVR_ATtiny1614__) // For use with megaTinyCore | ||
#define IR_RECEIVE_PIN PIN_PA1 // 8 | ||
#define IR_SEND_PIN PIN_PA3 // 10 | ||
#define TONE_PIN PIN_PA5 // 1 | ||
#define APPLICATION_PIN PIN_PA4 // 0 | ||
|
||
# elif defined(__AVR_ATtiny1604__) // For use with megaTinyCore | ||
#define IR_RECEIVE_PIN PIN_PA6 // 2 - To be compatible with interrupt example, pin 2 is chosen here. | ||
#define IR_SEND_PIN PIN_PA7 // 3 | ||
#define APPLICATION_PIN PIN_PB2 // 5 | ||
|
||
#define tone(...) void() // Define as void, since TCB0_INT_vect is also used by tone() | ||
#define noTone(a) void() | ||
#define TONE_PIN 42 // Dummy for examples using it | ||
#define TONE_PIN 42 // Dummy for examples using it | ||
|
||
# elif defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) \ | ||
|| defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) \ | ||
|
Oops, something went wrong.