Merge pull request #22 from PaulStoffregen/master

Teensy 3.0 compatibility
This commit is contained in:
joshua noble
2014-11-16 07:20:33 -08:00
2 changed files with 54 additions and 2 deletions

View File

@@ -252,7 +252,7 @@ void IRsend::mark(int time) {
// Sends an IR mark for the specified number of microseconds.
// The mark output is modulated at the PWM frequency.
TIMER_ENABLE_PWM; // Enable pin 3 PWM output
delayMicroseconds(time);
if (time > 0) delayMicroseconds(time);
}
/* Leave pin off for time (given in microseconds) */
@@ -260,7 +260,7 @@ void IRsend::space(int time) {
// Sends an IR space for the specified number of microseconds.
// A space is no output, so the PWM output is disabled.
TIMER_DISABLE_PWM; // Disable pin 3 PWM output
delayMicroseconds(time);
if (time > 0) delayMicroseconds(time);
}
void IRsend::enableIROut(int khz) {