mirror of
https://github.com/Theaninova/Arduino-IRremote.git
synced 2025-12-13 09:56:16 +00:00
Added ESP32 IR receive support (IRsend not implemented yet).
- disable a lot of defines not relevant to ESP32, set them to 1 (no-op) - change default IR pin to 35 from 11 - changed serial speed to 115200 (9600 is too slow to keep up with IR input) - irSend disables code that will not compile on ESP32. It won't work, but it won't break compilation either.
This commit is contained in:
@@ -54,6 +54,8 @@ void IRsend::space (unsigned int time)
|
||||
//
|
||||
void IRsend::enableIROut (int khz)
|
||||
{
|
||||
// FIXME: implement ESP32 support
|
||||
#ifndef ESP32
|
||||
// Disable the Timer2 Interrupt (which is used for receiving IR)
|
||||
TIMER_DISABLE_INTR; //Timer2 Overflow Interrupt
|
||||
|
||||
@@ -66,6 +68,7 @@ void IRsend::enableIROut (int khz)
|
||||
// CS2 = 000: no prescaling
|
||||
// The top value for the timer. The modulation frequency will be SYSCLOCK / 2 / OCR2A.
|
||||
TIMER_CONFIG_KHZ(khz);
|
||||
#endif
|
||||
}
|
||||
|
||||
//+=============================================================================
|
||||
|
||||
Reference in New Issue
Block a user