Usage of ATTinyCore pin numbering scheme e.g. PIN_PB2.
This commit is contained in:
parent
e3cdf409d9
commit
a3423854f5
|
@ -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:megaavr@2.5.11 # 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:megaavr@2.5.11
|
||||
# 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
|
||||
|
|
|
@ -789,6 +789,7 @@ The code for the timer and the **timer selection** is located in [private/IRTime
|
|||
| [RP2040 / Pi Pico](https://github.com/earlephilhower/arduino-pico) | [default alarm pool](https://raspberrypi.github.io/pico-sdk-doxygen/group__repeating__timer.html) | All pins | No pin |
|
||||
| [RP2040 / Mbed based](https://github.com/arduino/ArduinoCore-mbed) | Mbed Ticker | All pins | No pin |
|
||||
|
||||
### No timer required for sending
|
||||
The **send PWM signal** is by default generated by software. **Therefore every pin can be used for sending**.
|
||||
The PWM pulse length is guaranteed to be constant by using `delayMicroseconds()`.
|
||||
Take care not to generate interrupts during sending with software generated PWM, otherwise you will get jitter in the generated PWM.
|
||||
|
|
|
@ -6,7 +6,8 @@ See also the commit log at github: https://github.com/Arduino-IRremote/Arduino-I
|
|||
- The old decode function is renamed to decode_old(decode_results *aResults). decode (decode_results *aResults) is only available in IRremote.h and prints a message.
|
||||
- Added DECODE_ONKYO, to force 16 bit command and data decoding.
|
||||
- Enable Bang&Olufsen 455 kHz if SEND_PWM_BY_TIMER is defined.
|
||||
- Fixed bug: TinyReceiver throwing ISR not in IRAM on ESP8266
|
||||
- Fixed bug: TinyReceiver throwing ISR not in IRAM on ESP8266.
|
||||
- Usage of ATTinyCore pin numbering scheme e.g. PIN_PB2.
|
||||
|
||||
## 4.1.2
|
||||
- Workaround for ESP32 RTOS delay() timing bug influencing the mark() function.
|
||||
|
@ -33,7 +34,7 @@ See also the commit log at github: https://github.com/Arduino-IRremote/Arduino-I
|
|||
- Added functions addTicksToInternalTickCounter() and addMicrosToInternalTickCounter().
|
||||
|
||||
## 4.0.0
|
||||
- Added decoding of PulseDistanceWidth protocols and therfore changed function decodeDistance() to decodeDistanceWidth() and filename ir_DistanceProtocol.hpp to ir_DistanceWidthProtocol.hpp.
|
||||
- Added decoding of PulseDistanceWidth protocols and therefore changed function decodeDistance() to decodeDistanceWidth() and filename ir_DistanceProtocol.hpp to ir_DistanceWidthProtocol.hpp.
|
||||
- Removed static function printIRSendUsage(), but kept class function printIRSendUsage().
|
||||
- Changed type of decodedRawData and decodedRawDataArray which is now 64 bit for 32 bit platforms.
|
||||
- Added receiver callback functionality and registerReceiveCompleteCallback() function.
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
// Based on the work by DFRobot
|
||||
|
||||
#include "Arduino.h"
|
||||
|
||||
#if defined(__AVR__) && !defined(USE_SOFT_I2C_MASTER) && __has_include("SoftI2CMasterConfig.h")
|
||||
#define USE_SOFT_I2C_MASTER // must be before #include "LiquidCrystal_I2C.h"
|
||||
#endif
|
||||
|
||||
#include "LiquidCrystal_I2C.h"
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "Arduino.h"
|
||||
|
||||
inline size_t LiquidCrystal_I2C::write(uint8_t value) {
|
||||
send(value, Rs);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if !defined(USE_SOFT_I2C_MASTER) && __has_include("SoftI2CMasterConfig.h")
|
||||
#define USE_SOFT_I2C_MASTER
|
||||
#endif
|
||||
|
||||
#if defined(USE_SOFT_I2C_MASTER)
|
||||
//#define USE_SOFT_I2C_MASTER_H_AS_PLAIN_INCLUDE
|
||||
#include "SoftI2CMasterConfig.h" // Include configuration for sources
|
||||
|
|
|
@ -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
|
||||
* armin.joachimsmeyer@gmail.com
|
||||
*
|
||||
* 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_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_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_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_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_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_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_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_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_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__) \
|
||||
|
|
|
@ -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
|
||||
* armin.joachimsmeyer@gmail.com
|
||||
*
|
||||
* 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_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_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_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_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_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_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_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_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_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__) \
|
||||
|
|
|
@ -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
|
||||
* armin.joachimsmeyer@gmail.com
|
||||
*
|
||||
* 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_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_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_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_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_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_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_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_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_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__) \
|
||||
|
|
|
@ -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
|
||||
* armin.joachimsmeyer@gmail.com
|
||||
*
|
||||
* 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_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_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_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_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_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_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_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_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_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__) \
|
||||
|
|
|
@ -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
|
||||
* armin.joachimsmeyer@gmail.com
|
||||
*
|
||||
* 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_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_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_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_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_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_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_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_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_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__) \
|
||||
|
|
|
@ -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
|
||||
* armin.joachimsmeyer@gmail.com
|
||||
*
|
||||
* 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_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_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_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_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_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_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_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_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_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__) \
|
||||
|
|
|
@ -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
|
||||
* armin.joachimsmeyer@gmail.com
|
||||
*
|
||||
* 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_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_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_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_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_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_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_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_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_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__) \
|
||||
|
|
|
@ -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
|
||||
* armin.joachimsmeyer@gmail.com
|
||||
*
|
||||
* 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_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_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_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_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_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_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_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_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_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__) \
|
||||
|
|
|
@ -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
|
||||
* armin.joachimsmeyer@gmail.com
|
||||
*
|
||||
* 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_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_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_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_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_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_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_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_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_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__) \
|
||||
|
|
|
@ -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
|
||||
* armin.joachimsmeyer@gmail.com
|
||||
*
|
||||
* 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_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_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_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_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_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_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_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_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_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__) \
|
||||
|
|
|
@ -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
|
||||
* armin.joachimsmeyer@gmail.com
|
||||
*
|
||||
* 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_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_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_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_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_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_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_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_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_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__) \
|
||||
|
|
|
@ -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
|
||||
* armin.joachimsmeyer@gmail.com
|
||||
*
|
||||
* 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_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_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_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_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_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_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_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_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_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__) \
|
||||
|
|
|
@ -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
|
||||
* armin.joachimsmeyer@gmail.com
|
||||
*
|
||||
* 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_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_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_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_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_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_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_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_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_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__) \
|
||||
|
|
|
@ -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
|
||||
* armin.joachimsmeyer@gmail.com
|
||||
*
|
||||
* 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_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_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_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_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_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_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_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_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_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__) \
|
||||
|
|
|
@ -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
|
||||
* armin.joachimsmeyer@gmail.com
|
||||
*
|
||||
* 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_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_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_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_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_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_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_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_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_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__) \
|
||||
|
|
|
@ -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
|
||||
* armin.joachimsmeyer@gmail.com
|
||||
*
|
||||
* 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_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_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_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_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_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_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_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_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_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__) \
|
||||
|
|
|
@ -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
|
||||
* armin.joachimsmeyer@gmail.com
|
||||
*
|
||||
* 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_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_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_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_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_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_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_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_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_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__) \
|
||||
|
|
|
@ -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
|
||||
* armin.joachimsmeyer@gmail.com
|
||||
*
|
||||
* 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_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_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_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_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_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_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_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_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_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__) \
|
||||
|
|
|
@ -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
|
||||
* armin.joachimsmeyer@gmail.com
|
||||
*
|
||||
* 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_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_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_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_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_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_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_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_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_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__) \
|
||||
|
|
|
@ -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
|
||||
* armin.joachimsmeyer@gmail.com
|
||||
*
|
||||
* 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_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_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_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_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_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_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_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_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_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__) \
|
||||
|
|
|
@ -299,11 +299,12 @@
|
|||
#define __digitalPinToPortReg(P) (((P) <= 7) ? &PORTA : &PORTB)
|
||||
#define __digitalPinToDDRReg(P) (((P) <= 7) ? &DDRA : &DDRB)
|
||||
#define __digitalPinToPINReg(P) (((P) <= 7) ? &PINA : &PINB)
|
||||
# if defined(__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__) || defined(__AVR_ATtiny441__) || defined(__AVR_ATtiny841__)
|
||||
# endif
|
||||
# if defined(__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__) || defined(__AVR_ATtiny441__) || defined(__AVR_ATtiny841__)
|
||||
// https://github.com/SpenceKonde/ATTinyCore/blob/v2.0.0-devThis-is-the-head-submit-PRs-against-this/avr/variants/tinyx41_cw/pins_arduino.h#L334
|
||||
// Clockwise layout
|
||||
#define __digitalPinToBit(P) (((P) <= 7) ? (P) : ((P) == 11 ? (3) : 10 - (P)))
|
||||
# endif
|
||||
# else
|
||||
#define __digitalPinToBit(P) (((P) <= 7) ? (P) : (P) - 8 )
|
||||
# endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue