Skip to content

Commit 1f04488

Browse files
committed
Documentation
1 parent b512cdd commit 1f04488

File tree

23 files changed

+232
-185
lines changed

23 files changed

+232
-185
lines changed

.github/workflows/LibraryBuild.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
# This is the name of the workflow, visible on GitHub UI.
1111
name: LibraryBuild
12-
on:
12+
on:
1313
push: # see: https://help.github.com/en/actions/reference/events-that-trigger-workflows#pull-request-event-pull_request
1414
paths:
1515
- '**.ino'
@@ -139,7 +139,6 @@ jobs:
139139

140140
- arduino-boards-fqbn: megaTinyCore:megaavr:atxy7:chip=3217,clock=16internal
141141
platform-url: http://drazzy.com/package_drazzy.com_index.json
142-
# sketches-exclude: MinimalReceiver,IRDispatcherDemo,MicroGirs,UnitTest # digitalWriteFast.h not available for this board
143142
build-properties: # the flags were put in compiler.cpp.extra_flags
144143
IRremoteExtensionTest: -DRAW_BUFFER_LENGTH=100
145144

LICENSE.txt

Lines changed: 0 additions & 26 deletions
This file was deleted.

README.md

Lines changed: 40 additions & 18 deletions
Large diffs are not rendered by default.

examples/ControlRelay/PinDefinitionsAndMore.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ void noTone(uint8_t _pin){
8686
#define TONE_PIN 27 // D27 25 & 26 are DAC0 and 1
8787
#define APPLICATION_PIN 16 // RX2 pin
8888

89-
#elif defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_STM32F1)
90-
// BluePill in 2 flavors
89+
#elif defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_STM32F1) // BluePill
9190
// Timer 3 blocks PA6, PA7, PB0, PB1 for use by Servo or tone()
9291
#define IR_RECEIVE_PIN PA6
9392
#define IR_RECEIVE_PIN_STRING "PA6"
@@ -97,14 +96,14 @@ void noTone(uint8_t _pin){
9796
#define _IR_TIMING_TEST_PIN PA5
9897
#define APPLICATION_PIN PA2
9998

100-
#elif defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__)
99+
#elif defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) // Digispark board
101100
#include "ATtinySerialOut.hpp" // Available as Arduino library "ATtinySerialOut". saves 370 bytes program space and 38 bytes RAM for digistump core
102101
#define IR_RECEIVE_PIN 0
103102
#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.
104103
#define TONE_PIN 3
105104
#define _IR_TIMING_TEST_PIN 3
106105

107-
#elif defined(__AVR_ATtiny87__) || defined(__AVR_ATtiny167__)
106+
#elif defined(__AVR_ATtiny87__) || defined(__AVR_ATtiny167__) // Digispark pro board
108107
#include "ATtinySerialOut.hpp" // Available as Arduino library "ATtinySerialOut"
109108
// For ATtiny167 Pins PB6 and PA3 are usable as interrupt source.
110109
# if defined(ARDUINO_AVR_DIGISPARKPRO)
@@ -127,7 +126,7 @@ void noTone(uint8_t _pin){
127126
#define TONE_PIN 9
128127
#define _IR_TIMING_TEST_PIN 8
129128

130-
#elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__)
129+
#elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__) // Tiny Core Dev board
131130
#define IR_RECEIVE_PIN 18
132131
#define IR_SEND_PIN 19
133132
#define TONE_PIN 20
@@ -160,20 +159,20 @@ void noTone(uint8_t _pin){
160159
#define ALTERNATIVE_IR_FEEDBACK_LED_PIN 6 // E.g. used for examples which use LED_BUILDIN for example output.
161160
#define _IR_TIMING_TEST_PIN 7
162161

163-
#elif defined(ARDUINO_ARCH_APOLLO3)
162+
#elif defined(ARDUINO_ARCH_APOLLO3) // Sparkfun Apollo boards
164163
#define IR_RECEIVE_PIN 11
165164
#define IR_SEND_PIN 12
166165
#define TONE_PIN 5
167166

168-
#elif defined(ARDUINO_ARCH_MBED) && defined(ARDUINO_ARCH_MBED_NANO)
167+
#elif defined(ARDUINO_ARCH_MBED) && defined(ARDUINO_ARCH_MBED_NANO) // Arduino Nano 33 BLE
169168
#define IR_RECEIVE_PIN 3 // GPIO15 Start with pin 3 since pin 2|GPIO25 is connected to LED on Pi pico
170169
#define IR_SEND_PIN 4 // GPIO16
171170
#define TONE_PIN 5
172171
#define APPLICATION_PIN 6
173172
#define ALTERNATIVE_IR_FEEDBACK_LED_PIN 7 // E.g. used for examples which use LED_BUILDIN for example output.
174173
#define _IR_TIMING_TEST_PIN 8
175174

176-
#elif defined(ARDUINO_ARCH_RP2040) // Pi Pico with arduino-pico core https://github.com/earlephilhower/arduino-pico
175+
#elif defined(ARDUINO_ARCH_RP2040) // Arduino Nano Connect, Pi Pico with arduino-pico core https://github.com/earlephilhower/arduino-pico
177176
#define IR_RECEIVE_PIN 15 // to be compatible with the Arduino Nano RP2040 Connect (pin3)
178177
#define IR_SEND_PIN 16
179178
#define TONE_PIN 17
@@ -273,5 +272,7 @@ void noTone(uint8_t _pin){
273272
/*
274273
* Helper macro for getting a macro definition as string
275274
*/
275+
#if !defined(STR_HELPER)
276276
#define STR_HELPER(x) #x
277277
#define STR(x) STR_HELPER(x)
278+
#endif

examples/IRDispatcherDemo/IRCommandDispatcher.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ struct IRDataForCommandDispatcherStruct {
6666
#define COMMAND_EMPTY 0xFE // code no command received
6767
#define COMMAND_INVALID 0xFF // code for command received, but not in mapping
6868

69-
#define RETURN_IF_STOP if (IRDispatcher.requestToStopReceived) return
70-
#define DELAY_AND_RETURN_IF_STOP(aDurationMillis) if (IRDispatcher.delayAndCheckForStop(aDurationMillis)) return
69+
#define RETURN_IF_STOP if (IRDispatcher.requestToStopReceived) return
70+
#define BREAK_IF_STOP if (IRDispatcher.requestToStopReceived) break
71+
#define DELAY_AND_RETURN_IF_STOP(aDurationMillis) if (IRDispatcher.delayAndCheckForStop(aDurationMillis)) return
7172

7273
class IRCommandDispatcher {
7374
public:

examples/IRDispatcherDemo/PinDefinitionsAndMore.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ void noTone(uint8_t _pin){
8686
#define TONE_PIN 27 // D27 25 & 26 are DAC0 and 1
8787
#define APPLICATION_PIN 16 // RX2 pin
8888

89-
#elif defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_STM32F1)
90-
// BluePill in 2 flavors
89+
#elif defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_STM32F1) // BluePill
9190
// Timer 3 blocks PA6, PA7, PB0, PB1 for use by Servo or tone()
9291
#define IR_RECEIVE_PIN PA6
9392
#define IR_RECEIVE_PIN_STRING "PA6"
@@ -97,14 +96,14 @@ void noTone(uint8_t _pin){
9796
#define _IR_TIMING_TEST_PIN PA5
9897
#define APPLICATION_PIN PA2
9998

100-
#elif defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__)
99+
#elif defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) // Digispark board
101100
#include "ATtinySerialOut.hpp" // Available as Arduino library "ATtinySerialOut". saves 370 bytes program space and 38 bytes RAM for digistump core
102101
#define IR_RECEIVE_PIN 0
103102
#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.
104103
#define TONE_PIN 3
105104
#define _IR_TIMING_TEST_PIN 3
106105

107-
#elif defined(__AVR_ATtiny87__) || defined(__AVR_ATtiny167__)
106+
#elif defined(__AVR_ATtiny87__) || defined(__AVR_ATtiny167__) // Digispark pro board
108107
#include "ATtinySerialOut.hpp" // Available as Arduino library "ATtinySerialOut"
109108
// For ATtiny167 Pins PB6 and PA3 are usable as interrupt source.
110109
# if defined(ARDUINO_AVR_DIGISPARKPRO)
@@ -127,7 +126,7 @@ void noTone(uint8_t _pin){
127126
#define TONE_PIN 9
128127
#define _IR_TIMING_TEST_PIN 8
129128

130-
#elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__)
129+
#elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__) // Tiny Core Dev board
131130
#define IR_RECEIVE_PIN 18
132131
#define IR_SEND_PIN 19
133132
#define TONE_PIN 20
@@ -160,20 +159,20 @@ void noTone(uint8_t _pin){
160159
#define ALTERNATIVE_IR_FEEDBACK_LED_PIN 6 // E.g. used for examples which use LED_BUILDIN for example output.
161160
#define _IR_TIMING_TEST_PIN 7
162161

163-
#elif defined(ARDUINO_ARCH_APOLLO3)
162+
#elif defined(ARDUINO_ARCH_APOLLO3) // Sparkfun Apollo boards
164163
#define IR_RECEIVE_PIN 11
165164
#define IR_SEND_PIN 12
166165
#define TONE_PIN 5
167166

168-
#elif defined(ARDUINO_ARCH_MBED) && defined(ARDUINO_ARCH_MBED_NANO)
167+
#elif defined(ARDUINO_ARCH_MBED) && defined(ARDUINO_ARCH_MBED_NANO) // Arduino Nano 33 BLE
169168
#define IR_RECEIVE_PIN 3 // GPIO15 Start with pin 3 since pin 2|GPIO25 is connected to LED on Pi pico
170169
#define IR_SEND_PIN 4 // GPIO16
171170
#define TONE_PIN 5
172171
#define APPLICATION_PIN 6
173172
#define ALTERNATIVE_IR_FEEDBACK_LED_PIN 7 // E.g. used for examples which use LED_BUILDIN for example output.
174173
#define _IR_TIMING_TEST_PIN 8
175174

176-
#elif defined(ARDUINO_ARCH_RP2040) // Pi Pico with arduino-pico core https://github.com/earlephilhower/arduino-pico
175+
#elif defined(ARDUINO_ARCH_RP2040) // Arduino Nano Connect, Pi Pico with arduino-pico core https://github.com/earlephilhower/arduino-pico
177176
#define IR_RECEIVE_PIN 15 // to be compatible with the Arduino Nano RP2040 Connect (pin3)
178177
#define IR_SEND_PIN 16
179178
#define TONE_PIN 17
@@ -273,5 +272,7 @@ void noTone(uint8_t _pin){
273272
/*
274273
* Helper macro for getting a macro definition as string
275274
*/
275+
#if !defined(STR_HELPER)
276276
#define STR_HELPER(x) #x
277277
#define STR(x) STR_HELPER(x)
278+
#endif

examples/IRremoteExtensionTest/PinDefinitionsAndMore.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ void noTone(uint8_t _pin){
8686
#define TONE_PIN 27 // D27 25 & 26 are DAC0 and 1
8787
#define APPLICATION_PIN 16 // RX2 pin
8888

89-
#elif defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_STM32F1)
90-
// BluePill in 2 flavors
89+
#elif defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_STM32F1) // BluePill
9190
// Timer 3 blocks PA6, PA7, PB0, PB1 for use by Servo or tone()
9291
#define IR_RECEIVE_PIN PA6
9392
#define IR_RECEIVE_PIN_STRING "PA6"
@@ -97,14 +96,14 @@ void noTone(uint8_t _pin){
9796
#define _IR_TIMING_TEST_PIN PA5
9897
#define APPLICATION_PIN PA2
9998

100-
#elif defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__)
99+
#elif defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) // Digispark board
101100
#include "ATtinySerialOut.hpp" // Available as Arduino library "ATtinySerialOut". saves 370 bytes program space and 38 bytes RAM for digistump core
102101
#define IR_RECEIVE_PIN 0
103102
#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.
104103
#define TONE_PIN 3
105104
#define _IR_TIMING_TEST_PIN 3
106105

107-
#elif defined(__AVR_ATtiny87__) || defined(__AVR_ATtiny167__)
106+
#elif defined(__AVR_ATtiny87__) || defined(__AVR_ATtiny167__) // Digispark pro board
108107
#include "ATtinySerialOut.hpp" // Available as Arduino library "ATtinySerialOut"
109108
// For ATtiny167 Pins PB6 and PA3 are usable as interrupt source.
110109
# if defined(ARDUINO_AVR_DIGISPARKPRO)
@@ -127,7 +126,7 @@ void noTone(uint8_t _pin){
127126
#define TONE_PIN 9
128127
#define _IR_TIMING_TEST_PIN 8
129128

130-
#elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__)
129+
#elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__) // Tiny Core Dev board
131130
#define IR_RECEIVE_PIN 18
132131
#define IR_SEND_PIN 19
133132
#define TONE_PIN 20
@@ -160,20 +159,20 @@ void noTone(uint8_t _pin){
160159
#define ALTERNATIVE_IR_FEEDBACK_LED_PIN 6 // E.g. used for examples which use LED_BUILDIN for example output.
161160
#define _IR_TIMING_TEST_PIN 7
162161

163-
#elif defined(ARDUINO_ARCH_APOLLO3)
162+
#elif defined(ARDUINO_ARCH_APOLLO3) // Sparkfun Apollo boards
164163
#define IR_RECEIVE_PIN 11
165164
#define IR_SEND_PIN 12
166165
#define TONE_PIN 5
167166

168-
#elif defined(ARDUINO_ARCH_MBED) && defined(ARDUINO_ARCH_MBED_NANO)
167+
#elif defined(ARDUINO_ARCH_MBED) && defined(ARDUINO_ARCH_MBED_NANO) // Arduino Nano 33 BLE
169168
#define IR_RECEIVE_PIN 3 // GPIO15 Start with pin 3 since pin 2|GPIO25 is connected to LED on Pi pico
170169
#define IR_SEND_PIN 4 // GPIO16
171170
#define TONE_PIN 5
172171
#define APPLICATION_PIN 6
173172
#define ALTERNATIVE_IR_FEEDBACK_LED_PIN 7 // E.g. used for examples which use LED_BUILDIN for example output.
174173
#define _IR_TIMING_TEST_PIN 8
175174

176-
#elif defined(ARDUINO_ARCH_RP2040) // Pi Pico with arduino-pico core https://github.com/earlephilhower/arduino-pico
175+
#elif defined(ARDUINO_ARCH_RP2040) // Arduino Nano Connect, Pi Pico with arduino-pico core https://github.com/earlephilhower/arduino-pico
177176
#define IR_RECEIVE_PIN 15 // to be compatible with the Arduino Nano RP2040 Connect (pin3)
178177
#define IR_SEND_PIN 16
179178
#define TONE_PIN 17
@@ -273,5 +272,7 @@ void noTone(uint8_t _pin){
273272
/*
274273
* Helper macro for getting a macro definition as string
275274
*/
275+
#if !defined(STR_HELPER)
276276
#define STR_HELPER(x) #x
277277
#define STR(x) STR_HELPER(x)
278+
#endif

examples/MicroGirs/PinDefinitionsAndMore.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ void noTone(uint8_t _pin){
8686
#define TONE_PIN 27 // D27 25 & 26 are DAC0 and 1
8787
#define APPLICATION_PIN 16 // RX2 pin
8888

89-
#elif defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_STM32F1)
90-
// BluePill in 2 flavors
89+
#elif defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_STM32F1) // BluePill
9190
// Timer 3 blocks PA6, PA7, PB0, PB1 for use by Servo or tone()
9291
#define IR_RECEIVE_PIN PA6
9392
#define IR_RECEIVE_PIN_STRING "PA6"
@@ -97,14 +96,14 @@ void noTone(uint8_t _pin){
9796
#define _IR_TIMING_TEST_PIN PA5
9897
#define APPLICATION_PIN PA2
9998

100-
#elif defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__)
99+
#elif defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) // Digispark board
101100
#include "ATtinySerialOut.hpp" // Available as Arduino library "ATtinySerialOut". saves 370 bytes program space and 38 bytes RAM for digistump core
102101
#define IR_RECEIVE_PIN 0
103102
#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.
104103
#define TONE_PIN 3
105104
#define _IR_TIMING_TEST_PIN 3
106105

107-
#elif defined(__AVR_ATtiny87__) || defined(__AVR_ATtiny167__)
106+
#elif defined(__AVR_ATtiny87__) || defined(__AVR_ATtiny167__) // Digispark pro board
108107
#include "ATtinySerialOut.hpp" // Available as Arduino library "ATtinySerialOut"
109108
// For ATtiny167 Pins PB6 and PA3 are usable as interrupt source.
110109
# if defined(ARDUINO_AVR_DIGISPARKPRO)
@@ -127,7 +126,7 @@ void noTone(uint8_t _pin){
127126
#define TONE_PIN 9
128127
#define _IR_TIMING_TEST_PIN 8
129128

130-
#elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__)
129+
#elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__) // Tiny Core Dev board
131130
#define IR_RECEIVE_PIN 18
132131
#define IR_SEND_PIN 19
133132
#define TONE_PIN 20
@@ -160,20 +159,20 @@ void noTone(uint8_t _pin){
160159
#define ALTERNATIVE_IR_FEEDBACK_LED_PIN 6 // E.g. used for examples which use LED_BUILDIN for example output.
161160
#define _IR_TIMING_TEST_PIN 7
162161

163-
#elif defined(ARDUINO_ARCH_APOLLO3)
162+
#elif defined(ARDUINO_ARCH_APOLLO3) // Sparkfun Apollo boards
164163
#define IR_RECEIVE_PIN 11
165164
#define IR_SEND_PIN 12
166165
#define TONE_PIN 5
167166

168-
#elif defined(ARDUINO_ARCH_MBED) && defined(ARDUINO_ARCH_MBED_NANO)
167+
#elif defined(ARDUINO_ARCH_MBED) && defined(ARDUINO_ARCH_MBED_NANO) // Arduino Nano 33 BLE
169168
#define IR_RECEIVE_PIN 3 // GPIO15 Start with pin 3 since pin 2|GPIO25 is connected to LED on Pi pico
170169
#define IR_SEND_PIN 4 // GPIO16
171170
#define TONE_PIN 5
172171
#define APPLICATION_PIN 6
173172
#define ALTERNATIVE_IR_FEEDBACK_LED_PIN 7 // E.g. used for examples which use LED_BUILDIN for example output.
174173
#define _IR_TIMING_TEST_PIN 8
175174

176-
#elif defined(ARDUINO_ARCH_RP2040) // Pi Pico with arduino-pico core https://github.com/earlephilhower/arduino-pico
175+
#elif defined(ARDUINO_ARCH_RP2040) // Arduino Nano Connect, Pi Pico with arduino-pico core https://github.com/earlephilhower/arduino-pico
177176
#define IR_RECEIVE_PIN 15 // to be compatible with the Arduino Nano RP2040 Connect (pin3)
178177
#define IR_SEND_PIN 16
179178
#define TONE_PIN 17
@@ -273,5 +272,7 @@ void noTone(uint8_t _pin){
273272
/*
274273
* Helper macro for getting a macro definition as string
275274
*/
275+
#if !defined(STR_HELPER)
276276
#define STR_HELPER(x) #x
277277
#define STR(x) STR_HELPER(x)
278+
#endif

examples/ReceiveAndSend/PinDefinitionsAndMore.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ void noTone(uint8_t _pin){
8686
#define TONE_PIN 27 // D27 25 & 26 are DAC0 and 1
8787
#define APPLICATION_PIN 16 // RX2 pin
8888

89-
#elif defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_STM32F1)
90-
// BluePill in 2 flavors
89+
#elif defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_STM32F1) // BluePill
9190
// Timer 3 blocks PA6, PA7, PB0, PB1 for use by Servo or tone()
9291
#define IR_RECEIVE_PIN PA6
9392
#define IR_RECEIVE_PIN_STRING "PA6"
@@ -97,14 +96,14 @@ void noTone(uint8_t _pin){
9796
#define _IR_TIMING_TEST_PIN PA5
9897
#define APPLICATION_PIN PA2
9998

100-
#elif defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__)
99+
#elif defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) // Digispark board
101100
#include "ATtinySerialOut.hpp" // Available as Arduino library "ATtinySerialOut". saves 370 bytes program space and 38 bytes RAM for digistump core
102101
#define IR_RECEIVE_PIN 0
103102
#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.
104103
#define TONE_PIN 3
105104
#define _IR_TIMING_TEST_PIN 3
106105

107-
#elif defined(__AVR_ATtiny87__) || defined(__AVR_ATtiny167__)
106+
#elif defined(__AVR_ATtiny87__) || defined(__AVR_ATtiny167__) // Digispark pro board
108107
#include "ATtinySerialOut.hpp" // Available as Arduino library "ATtinySerialOut"
109108
// For ATtiny167 Pins PB6 and PA3 are usable as interrupt source.
110109
# if defined(ARDUINO_AVR_DIGISPARKPRO)
@@ -127,7 +126,7 @@ void noTone(uint8_t _pin){
127126
#define TONE_PIN 9
128127
#define _IR_TIMING_TEST_PIN 8
129128

130-
#elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__)
129+
#elif defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__) // Tiny Core Dev board
131130
#define IR_RECEIVE_PIN 18
132131
#define IR_SEND_PIN 19
133132
#define TONE_PIN 20
@@ -160,20 +159,20 @@ void noTone(uint8_t _pin){
160159
#define ALTERNATIVE_IR_FEEDBACK_LED_PIN 6 // E.g. used for examples which use LED_BUILDIN for example output.
161160
#define _IR_TIMING_TEST_PIN 7
162161

163-
#elif defined(ARDUINO_ARCH_APOLLO3)
162+
#elif defined(ARDUINO_ARCH_APOLLO3) // Sparkfun Apollo boards
164163
#define IR_RECEIVE_PIN 11
165164
#define IR_SEND_PIN 12
166165
#define TONE_PIN 5
167166

168-
#elif defined(ARDUINO_ARCH_MBED) && defined(ARDUINO_ARCH_MBED_NANO)
167+
#elif defined(ARDUINO_ARCH_MBED) && defined(ARDUINO_ARCH_MBED_NANO) // Arduino Nano 33 BLE
169168
#define IR_RECEIVE_PIN 3 // GPIO15 Start with pin 3 since pin 2|GPIO25 is connected to LED on Pi pico
170169
#define IR_SEND_PIN 4 // GPIO16
171170
#define TONE_PIN 5
172171
#define APPLICATION_PIN 6
173172
#define ALTERNATIVE_IR_FEEDBACK_LED_PIN 7 // E.g. used for examples which use LED_BUILDIN for example output.
174173
#define _IR_TIMING_TEST_PIN 8
175174

176-
#elif defined(ARDUINO_ARCH_RP2040) // Pi Pico with arduino-pico core https://github.com/earlephilhower/arduino-pico
175+
#elif defined(ARDUINO_ARCH_RP2040) // Arduino Nano Connect, Pi Pico with arduino-pico core https://github.com/earlephilhower/arduino-pico
177176
#define IR_RECEIVE_PIN 15 // to be compatible with the Arduino Nano RP2040 Connect (pin3)
178177
#define IR_SEND_PIN 16
179178
#define TONE_PIN 17
@@ -273,5 +272,7 @@ void noTone(uint8_t _pin){
273272
/*
274273
* Helper macro for getting a macro definition as string
275274
*/
275+
#if !defined(STR_HELPER)
276276
#define STR_HELPER(x) #x
277277
#define STR(x) STR_HELPER(x)
278+
#endif

0 commit comments

Comments
 (0)