Skip to content

Commit 112b1cc

Browse files
committed
BUG FIX: Pulses library for Nano boards
1 parent fbdfc12 commit 112b1cc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
Tools40 implements some common functions and modules on industrial environment firmwares for Arduino based devices.
55

6-
***Both ModbusTCPMaster and ModbusTCPSlave are only available for Industrial Shields devices, but you can modify them to be used in other Arduino devices***
6+
***Both Pulses, ModbusTCPMaster and ModbusTCPSlave are only available for Industrial Shields devices, but you can modify them to be used in other Arduino devices***
77

88
## Gettings started
99

src/Pulses.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
////////////////////////////////////////////////////////////////////////////////////////////////////
44
void startPulses(int pin, uint32_t freq, uint8_t precision) {
5-
#if defined(__AVR__)
5+
#if defined(MDUINO) || defined(MDUINO_PLUS) || defined (ARDBOX) || defined(ARDBOX_HF) || defined(ARDBOX_HF_PLUS) || defined(SPARTAN)
66
stopPulses(pin);
77

88
if (freq == 0) {
@@ -146,12 +146,12 @@ void startPulses(int pin, uint32_t freq, uint8_t precision) {
146146
break;
147147
#endif // MDUINO || MDUINO_PLUS
148148
}
149-
#endif // __AVR__
149+
#endif
150150
}
151151

152152
////////////////////////////////////////////////////////////////////////////////////////////////////
153153
void stopPulses(int pin) {
154-
#if defined(__AVR__)
154+
#if defined(MDUINO) || defined(MDUINO_PLUS) || defined (ARDBOX) || defined(ARDBOX_HF) || defined(ARDBOX_HF_PLUS) || defined(SPARTAN)
155155
switch (digitalPinToTimer(pin)) {
156156
case TIMER0A:
157157
TCCR0A &= 0b00111100;
@@ -237,5 +237,5 @@ void stopPulses(int pin) {
237237
break;
238238
#endif // MDUINO || MDUINO_PLUS
239239
}
240-
#endif // __AVR__
240+
#endif
241241
}

0 commit comments

Comments
 (0)