From 24dd940107c978102fe2a04a7baf49949bde1e73 Mon Sep 17 00:00:00 2001 From: Bengt Martensson Date: Sun, 20 Aug 2017 23:49:57 +0200 Subject: [PATCH] Moving private includes to sub-directory, #464 (#507) * Add missing "paragraph" to library.properties. * Move not-to-be-exported includes to subdirectory. Remove #include "IRremoteInt.h" from a number of files since it now does not work any more, and since IRremote.h #includes it already. This resolves #464. * Remove #include from examples, too. * Make ir_Lego_PF_BitStreamEncoder.h exported (again). * Revoked fe24095 (paragraph) to keep 1-1 correspondance to #464. --- examples/IRtest/IRtest.ino | 1 - .../LegoPowerFunctionsSendDemo/LegoPowerFunctionsSendDemo.ino | 1 - src/IRremote.cpp | 3 +-- src/IRremote.h | 2 +- src/esp32.cpp | 1 - src/irRecv.cpp | 1 - src/irSend.cpp | 3 +-- src/ir_Aiwa.cpp | 1 - src/ir_Denon.cpp | 1 - src/ir_Dish.cpp | 1 - src/ir_JVC.cpp | 1 - src/ir_LG.cpp | 1 - src/ir_Lego_PF.cpp | 1 - src/ir_Mitsubishi.cpp | 1 - src/ir_NEC.cpp | 1 - src/ir_Panasonic.cpp | 1 - src/ir_RC5_RC6.cpp | 1 - src/ir_Samsung.cpp | 1 - src/ir_Sanyo.cpp | 1 - src/ir_Sharp.cpp | 1 - src/ir_Sony.cpp | 1 - src/ir_Template.cpp | 1 - src/ir_Whynter.cpp | 1 - src/{ => private}/IRremoteInt.h | 0 src/{ => private}/boarddefs.h | 0 src/sam.cpp | 3 +-- 26 files changed, 4 insertions(+), 27 deletions(-) rename src/{ => private}/IRremoteInt.h (100%) rename src/{ => private}/boarddefs.h (100%) diff --git a/examples/IRtest/IRtest.ino b/examples/IRtest/IRtest.ino index 4845a4a..b302563 100644 --- a/examples/IRtest/IRtest.ino +++ b/examples/IRtest/IRtest.ino @@ -10,7 +10,6 @@ */ #include -#include // Dumps out the decode_results structure. // Call this after IRrecv::decode() diff --git a/examples/LegoPowerFunctionsSendDemo/LegoPowerFunctionsSendDemo.ino b/examples/LegoPowerFunctionsSendDemo/LegoPowerFunctionsSendDemo.ino index e43d06c..1afafe5 100644 --- a/examples/LegoPowerFunctionsSendDemo/LegoPowerFunctionsSendDemo.ino +++ b/examples/LegoPowerFunctionsSendDemo/LegoPowerFunctionsSendDemo.ino @@ -4,7 +4,6 @@ */ #include -#include IRsend irsend; diff --git a/src/IRremote.cpp b/src/IRremote.cpp index f21f41b..0d63b77 100644 --- a/src/IRremote.cpp +++ b/src/IRremote.cpp @@ -20,8 +20,7 @@ // Defining IR_GLOBAL here allows us to declare the instantiation of global variables #define IR_GLOBAL -# include "IRremote.h" -# include "IRremoteInt.h" +#include "IRremote.h" #undef IR_GLOBAL #ifdef HAS_AVR_INTERRUPT_H diff --git a/src/IRremote.h b/src/IRremote.h index 9282843..e95e068 100644 --- a/src/IRremote.h +++ b/src/IRremote.h @@ -21,7 +21,7 @@ //------------------------------------------------------------------------------ // The ISR header contains several useful macros the user may wish to use // -#include "IRremoteInt.h" +#include "private/IRremoteInt.h" //------------------------------------------------------------------------------ // Supported IR protocols diff --git a/src/esp32.cpp b/src/esp32.cpp index ef4d794..9710098 100644 --- a/src/esp32.cpp +++ b/src/esp32.cpp @@ -3,7 +3,6 @@ // This file contains functions specific to the ESP32. #include "IRremote.h" -#include "IRremoteInt.h" // "Idiot check" #ifdef USE_DEFAULT_ENABLE_IR_IN diff --git a/src/irRecv.cpp b/src/irRecv.cpp index b549dac..f3e12aa 100644 --- a/src/irRecv.cpp +++ b/src/irRecv.cpp @@ -1,5 +1,4 @@ #include "IRremote.h" -#include "IRremoteInt.h" //+============================================================================= // Decodes the received IR message diff --git a/src/irSend.cpp b/src/irSend.cpp index a01b5a0..0561408 100644 --- a/src/irSend.cpp +++ b/src/irSend.cpp @@ -1,5 +1,4 @@ #include "IRremote.h" -#include "IRremoteInt.h" #ifdef SENDING_SUPPORTED //+============================================================================= @@ -136,4 +135,4 @@ void IRsend::custom_delay_usec(unsigned long uSecs) { //} } -#endif // SENDING_SUPPORTED \ No newline at end of file +#endif // SENDING_SUPPORTED diff --git a/src/ir_Aiwa.cpp b/src/ir_Aiwa.cpp index 50ec58d..78cd48a 100644 --- a/src/ir_Aiwa.cpp +++ b/src/ir_Aiwa.cpp @@ -1,5 +1,4 @@ #include "IRremote.h" -#include "IRremoteInt.h" //============================================================================== // AAA IIIII W W AAA diff --git a/src/ir_Denon.cpp b/src/ir_Denon.cpp index c54e286..848af79 100644 --- a/src/ir_Denon.cpp +++ b/src/ir_Denon.cpp @@ -1,5 +1,4 @@ #include "IRremote.h" -#include "IRremoteInt.h" // Reverse Engineered by looking at RAW dumps generated by IRremote diff --git a/src/ir_Dish.cpp b/src/ir_Dish.cpp index fa8e065..e2f5c15 100644 --- a/src/ir_Dish.cpp +++ b/src/ir_Dish.cpp @@ -1,5 +1,4 @@ #include "IRremote.h" -#include "IRremoteInt.h" //============================================================================== // DDDD IIIII SSSS H H diff --git a/src/ir_JVC.cpp b/src/ir_JVC.cpp index eeec20f..2a418cb 100644 --- a/src/ir_JVC.cpp +++ b/src/ir_JVC.cpp @@ -1,5 +1,4 @@ #include "IRremote.h" -#include "IRremoteInt.h" //============================================================================== // JJJJJ V V CCCC diff --git a/src/ir_LG.cpp b/src/ir_LG.cpp index ba532cb..476196a 100644 --- a/src/ir_LG.cpp +++ b/src/ir_LG.cpp @@ -1,5 +1,4 @@ #include "IRremote.h" -#include "IRremoteInt.h" //============================================================================== // L GGGG diff --git a/src/ir_Lego_PF.cpp b/src/ir_Lego_PF.cpp index 37d507c..9f9c515 100644 --- a/src/ir_Lego_PF.cpp +++ b/src/ir_Lego_PF.cpp @@ -1,5 +1,4 @@ #include "IRremote.h" -#include "IRremoteInt.h" #include "ir_Lego_PF_BitStreamEncoder.h" //============================================================================== diff --git a/src/ir_Mitsubishi.cpp b/src/ir_Mitsubishi.cpp index 7f83e53..751ed82 100644 --- a/src/ir_Mitsubishi.cpp +++ b/src/ir_Mitsubishi.cpp @@ -1,5 +1,4 @@ #include "IRremote.h" -#include "IRremoteInt.h" //============================================================================== // MMMMM IIIII TTTTT SSSS U U BBBB IIIII SSSS H H IIIII diff --git a/src/ir_NEC.cpp b/src/ir_NEC.cpp index 3b49321..284eab8 100644 --- a/src/ir_NEC.cpp +++ b/src/ir_NEC.cpp @@ -1,5 +1,4 @@ #include "IRremote.h" -#include "IRremoteInt.h" //============================================================================== // N N EEEEE CCCC diff --git a/src/ir_Panasonic.cpp b/src/ir_Panasonic.cpp index dc0dd73..13288d2 100644 --- a/src/ir_Panasonic.cpp +++ b/src/ir_Panasonic.cpp @@ -1,5 +1,4 @@ #include "IRremote.h" -#include "IRremoteInt.h" //============================================================================== // PPPP AAA N N AAA SSSS OOO N N IIIII CCCC diff --git a/src/ir_RC5_RC6.cpp b/src/ir_RC5_RC6.cpp index 10e7927..402ded7 100644 --- a/src/ir_RC5_RC6.cpp +++ b/src/ir_RC5_RC6.cpp @@ -1,5 +1,4 @@ #include "IRremote.h" -#include "IRremoteInt.h" //+============================================================================= // Gets one undecoded level at a time from the raw buffer. diff --git a/src/ir_Samsung.cpp b/src/ir_Samsung.cpp index 224487d..b605b00 100644 --- a/src/ir_Samsung.cpp +++ b/src/ir_Samsung.cpp @@ -1,5 +1,4 @@ #include "IRremote.h" -#include "IRremoteInt.h" //============================================================================== // SSSS AAA MMM SSSS U U N N GGGG diff --git a/src/ir_Sanyo.cpp b/src/ir_Sanyo.cpp index c775d61..754444d 100644 --- a/src/ir_Sanyo.cpp +++ b/src/ir_Sanyo.cpp @@ -1,5 +1,4 @@ #include "IRremote.h" -#include "IRremoteInt.h" //============================================================================== // SSSS AAA N N Y Y OOO diff --git a/src/ir_Sharp.cpp b/src/ir_Sharp.cpp index 73462c5..da0af1a 100644 --- a/src/ir_Sharp.cpp +++ b/src/ir_Sharp.cpp @@ -1,5 +1,4 @@ #include "IRremote.h" -#include "IRremoteInt.h" //============================================================================== // SSSS H H AAA RRRR PPPP diff --git a/src/ir_Sony.cpp b/src/ir_Sony.cpp index 31e67cf..b3e15ef 100644 --- a/src/ir_Sony.cpp +++ b/src/ir_Sony.cpp @@ -1,5 +1,4 @@ #include "IRremote.h" -#include "IRremoteInt.h" //============================================================================== // SSSS OOO N N Y Y diff --git a/src/ir_Template.cpp b/src/ir_Template.cpp index eee2b0b..2b895e1 100644 --- a/src/ir_Template.cpp +++ b/src/ir_Template.cpp @@ -92,7 +92,6 @@ Regards, */ #include "IRremote.h" -#include "IRremoteInt.h" //============================================================================== // diff --git a/src/ir_Whynter.cpp b/src/ir_Whynter.cpp index a830562..5ec373d 100644 --- a/src/ir_Whynter.cpp +++ b/src/ir_Whynter.cpp @@ -1,5 +1,4 @@ #include "IRremote.h" -#include "IRremoteInt.h" //============================================================================== // W W H H Y Y N N TTTTT EEEEE RRRRR diff --git a/src/IRremoteInt.h b/src/private/IRremoteInt.h similarity index 100% rename from src/IRremoteInt.h rename to src/private/IRremoteInt.h diff --git a/src/boarddefs.h b/src/private/boarddefs.h similarity index 100% rename from src/boarddefs.h rename to src/private/boarddefs.h diff --git a/src/sam.cpp b/src/sam.cpp index 0657589..4cb1b9f 100644 --- a/src/sam.cpp +++ b/src/sam.cpp @@ -1,7 +1,6 @@ // Support routines for SAM processor boards #include "IRremote.h" -#include "IRremoteInt.h" #if defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_SAMD) @@ -99,4 +98,4 @@ void TC3_Handler(void) } } -#endif // defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_SAMD) \ No newline at end of file +#endif // defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_SAMD)