mirror of
https://github.com/Theaninova/Arduino-IRremote.git
synced 2025-12-12 17:36:15 +00:00
Cleaned up ESP32 integration, reverted ESP32 ifdefs on irreceive examples.
- fixed indenting on existing code in a few places for consistency - introduced IR_TIMER_USE_ESP32 for ifdefs within the code as per request - added comments explaining what's missing for irsend support on ESP32 - IRrecvDemo.ino gets a warning before and after interrupt is enabled in case it causes a crash TESTED=IoTuz ESP32 board and original 328p arduino to make sure current code did not break.
This commit is contained in:
11
IRremote.cpp
11
IRremote.cpp
@@ -18,16 +18,17 @@
|
||||
// Whynter A/C ARC-110WD added by Francesco Meschia
|
||||
//******************************************************************************
|
||||
|
||||
#ifndef ESP32
|
||||
#include <avr/interrupt.h>
|
||||
#endif
|
||||
|
||||
// Defining IR_GLOBAL here allows us to declare the instantiation of global variables
|
||||
#define IR_GLOBAL
|
||||
# include "IRremote.h"
|
||||
# include "IRremoteInt.h"
|
||||
#undef IR_GLOBAL
|
||||
|
||||
#ifndef IR_TIMER_USE_ESP32
|
||||
#include <avr/interrupt.h>
|
||||
#endif
|
||||
|
||||
|
||||
//+=============================================================================
|
||||
// The match functions were (apparently) originally MACROs to improve code speed
|
||||
// (although this would have bloated the code) hence the names being CAPS
|
||||
@@ -122,7 +123,7 @@ int MATCH_SPACE (int measured_ticks, int desired_us)
|
||||
// As soon as first MARK arrives:
|
||||
// Gap width is recorded; Ready is cleared; New logging starts
|
||||
//
|
||||
#ifdef ESP32
|
||||
#ifdef IR_TIMER_USE_ESP32
|
||||
void IRTimer()
|
||||
#else
|
||||
ISR (TIMER_INTR_NAME)
|
||||
|
||||
Reference in New Issue
Block a user