From 679348568da2b886e7ae50e8bfeed4a2b9c93056 Mon Sep 17 00:00:00 2001 From: Rafi Khan Date: Thu, 10 Aug 2017 16:57:54 -0600 Subject: [PATCH 01/29] merge #437 --- Contributors.md | 2 + IRremote.cpp | 8 +- IRremote.h | 27 ++++- boarddefs.h | 140 +++++++++++++++++++------ esp32.cpp | 39 +++++++ examples/IRremoteInfo/IRremoteInfo.ino | 2 +- irRecv.cpp | 22 +--- irSend.cpp | 61 +++++++++-- sam.cpp | 102 ++++++++++++++++++ 9 files changed, 341 insertions(+), 62 deletions(-) create mode 100644 esp32.cpp create mode 100644 sam.cpp diff --git a/Contributors.md b/Contributors.md index 1bed7b6d4..821c8da45 100644 --- a/Contributors.md +++ b/Contributors.md @@ -18,5 +18,7 @@ These are the active contributors of this project that you may contact if there - [philipphenkel](https://github.com/philipphenkel): Active Contributor - [MCUdude](https://github.com/MCUdude): Contributor - [marcmerlin](https://github.com/marcmerlin): Contributor (ESP32 port) +- [bengtmartensson](https://github.com/bengtmartensson): Active Contributor +- [MrBryonMiller](https://github.com/MrBryonMiller): Contributor Note: This list is being updated constantly so please let [z3t0](https://github.com/z3t0) know if you have been missed. diff --git a/IRremote.cpp b/IRremote.cpp index e811cfc7b..f41f81878 100644 --- a/IRremote.cpp +++ b/IRremote.cpp @@ -24,7 +24,7 @@ # include "IRremoteInt.h" #undef IR_GLOBAL -#ifndef IR_TIMER_USE_ESP32 +#ifdef HAS_AVR_INTERRUPT_H #include #endif @@ -123,11 +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 IR_TIMER_USE_ESP32 -void IRTimer() -#else ISR (TIMER_INTR_NAME) -#endif { TIMER_RESET; @@ -189,6 +185,7 @@ ISR (TIMER_INTR_NAME) break; } +#ifdef BLINKLED // If requested, flash LED while receiving IR data if (irparams.blinkflag) { if (irdata == MARK) @@ -197,4 +194,5 @@ ISR (TIMER_INTR_NAME) else if (irparams.blinkpin) digitalWrite(irparams.blinkpin, LOW); // Turn user defined pin LED on else BLINKLED_OFF() ; // if no user defined LED pin, turn default LED pin for the hardware on } +#endif // BLINKLED } diff --git a/IRremote.h b/IRremote.h index fe1a87029..928284361 100644 --- a/IRremote.h +++ b/IRremote.h @@ -259,7 +259,18 @@ class IRrecv class IRsend { public: - IRsend () { } +#ifdef USE_SOFT_CARRIER + + IRsend(int pin = SEND_PIN) + { + sendPin = pin; + } +#else + + IRsend() + { + } +#endif void custom_delay_usec (unsigned long uSecs); void enableIROut (int khz) ; @@ -339,6 +350,20 @@ class IRsend # if SEND_LEGO_PF void sendLegoPowerFunctions (uint16_t data, bool repeat = true) ; # endif + +#ifdef USE_SOFT_CARRIER + private: + int sendPin; + + unsigned int periodTime; + unsigned int periodOnTime; + + void sleepMicros(unsigned long us); + void sleepUntilMicros(unsigned long targetTime); + +#else + const int sendPin = SEND_PIN; +#endif } ; #endif diff --git a/boarddefs.h b/boarddefs.h index 17e25513e..5c49465ef 100644 --- a/boarddefs.h +++ b/boarddefs.h @@ -20,6 +20,32 @@ #ifndef boarddefs_h #define boarddefs_h +// Define some defaults, that some boards may like to override +// (This is to avoid negative logic, ! DONT_... is just awkward.) + +// This board has/needs the avr/interrupt.h +#define HAS_AVR_INTERRUPT_H + +// Define if sending is supported +#define SENDING_SUPPORTED + +// If defined, a standard enableIRIn function will be define. +// Undefine for boards supplying their own. +#define USE_DEFAULT_ENABLE_IR_IN + +// Duty cycle in percent for sent signals. Presently takes effect only with USE_SOFT_CARRIER +#define DUTY_CYCLE 50 + +// If USE_SOFT_CARRIER, this amount (in micro seconds) is subtracted from the +// on-time of the pulses. +#define PULSE_CORRECTION 3 + +// digitalWrite is supposed to be slow. If this is an issue, define faster, +// board-dependent versions of these macros SENDPIN_ON(pin) and SENDPIN_OFF(pin). +// Portable, possibly slow, default definitions are given at the end of this file. +// If defining new versions, feel free to ignore the pin argument if it +// is not configurable on the current board. + //------------------------------------------------------------------------------ // Defines for blinking the LED // @@ -39,11 +65,31 @@ # define BLINKLED_ON() (PORTD |= B00000001) # define BLINKLED_OFF() (PORTD &= B11111110) -// No system LED on ESP32, disable blinking +#elif defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_SAMD) +# define BLINKLED LED_BUILTIN +# define BLINKLED_ON() (digitalWrite(LED_BUILTIN, HIGH)) +# define BLINKLED_OFF() (digitalWrite(LED_BUILTIN, LOW)) + +# define USE_SOFT_CARRIER + // Define to use spin wait instead of delayMicros() +//# define USE_SPIN_WAIT +# undef USE_DEFAULT_ENABLE_IR_IN + + // The default pin used used for sending. +# define SEND_PIN 9 + #elif defined(ESP32) -# define BLINKLED 255 -# define BLINKLED_ON() 1 -# define BLINKLED_OFF() 1 + // No system LED on ESP32, disable blinking by NOT defining BLINKLED + + // avr/interrupt.h is not present +# undef HAS_AVR_INTERRUPT_H + + // Sending not implemented +# undef SENDING_SUPPORTED# + + // Supply own enbleIRIn +# undef USE_DEFAULT_ENABLE_IR_IN + #else # define BLINKLED 13 # define BLINKLED_ON() (PORTB |= B00100000) @@ -138,6 +184,10 @@ #elif defined(ESP32) #define IR_TIMER_USE_ESP32 + +#elif defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_SAMD) + #define TIMER_PRESCALER_DIV 64 + #else // Arduino Duemilanove, Diecimila, LilyPad, Mini, Fio, Nano, etc // ATmega48, ATmega88, ATmega168, ATmega328 @@ -190,17 +240,17 @@ //----------------- #if defined(CORE_OC2B_PIN) -# define TIMER_PWM_PIN CORE_OC2B_PIN // Teensy +# define SEND_PIN CORE_OC2B_PIN // Teensy #elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) -# define TIMER_PWM_PIN 9 // Arduino Mega +# define SEND_PIN 9 // Arduino Mega #elif defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) \ || defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) \ || defined(__AVR_ATmega324P__) || defined(__AVR_ATmega324A__) \ || defined(__AVR_ATmega324PA__) || defined(__AVR_ATmega164A__) \ || defined(__AVR_ATmega164P__) -# define TIMER_PWM_PIN 14 // MightyCore +# define SEND_PIN 14 // MightyCore #else -# define TIMER_PWM_PIN 3 // Arduino Duemilanove, Diecimila, LilyPad, etc +# define SEND_PIN 3 // Arduino Duemilanove, Diecimila, LilyPad, etc #endif // ATmega48, ATmega88, ATmega168, ATmega328 //--------------------------------------------------------- @@ -243,22 +293,22 @@ //----------------- #if defined(CORE_OC1A_PIN) -# define TIMER_PWM_PIN CORE_OC1A_PIN // Teensy +# define SEND_PIN CORE_OC1A_PIN // Teensy #elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) -# define TIMER_PWM_PIN 11 // Arduino Mega +# define SEND_PIN 11 // Arduino Mega #elif defined(__AVR_ATmega64__) || defined(__AVR_ATmega128__) -# define TIMER_PWM_PIN 13 // MegaCore +# define SEND_PIN 13 // MegaCore #elif defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) \ || defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) \ || defined(__AVR_ATmega324P__) || defined(__AVR_ATmega324A__) \ || defined(__AVR_ATmega324PA__) || defined(__AVR_ATmega164A__) \ || defined(__AVR_ATmega164P__) || defined(__AVR_ATmega32__) \ || defined(__AVR_ATmega16__) || defined(__AVR_ATmega8535__) -# define TIMER_PWM_PIN 13 // MightyCore +# define SEND_PIN 13 // MightyCore #elif defined(__AVR_ATtiny84__) -# define TIMER_PWM_PIN 6 +# define SEND_PIN 6 #else -# define TIMER_PWM_PIN 9 // Arduino Duemilanove, Diecimila, LilyPad, etc +# define SEND_PIN 9 // Arduino Duemilanove, Diecimila, LilyPad, etc #endif // ATmega48, ATmega88, ATmega168, ATmega328 //--------------------------------------------------------- @@ -290,11 +340,11 @@ //----------------- #if defined(CORE_OC3A_PIN) -# define TIMER_PWM_PIN CORE_OC3A_PIN // Teensy +# define SEND_PIN CORE_OC3A_PIN // Teensy #elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) -# define TIMER_PWM_PIN 5 // Arduino Mega +# define SEND_PIN 5 // Arduino Mega #elif defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) -# define TIMER_PWM_PIN 6 // MightyCore +# define SEND_PIN 6 // MightyCore #else # error "Please add OC3A pin number here\n" #endif @@ -338,9 +388,9 @@ //----------------- #if defined(CORE_OC4A_PIN) -# define TIMER_PWM_PIN CORE_OC4A_PIN // Teensy +# define SEND_PIN CORE_OC4A_PIN // Teensy #elif defined(__AVR_ATmega32U4__) -# define TIMER_PWM_PIN 13 // Leonardo +# define SEND_PIN 13 // Leonardo #else # error "Please add OC4A pin number here\n" #endif @@ -374,9 +424,9 @@ //----------------- #if defined(CORE_OC4A_PIN) -# define TIMER_PWM_PIN CORE_OC4A_PIN +# define SEND_PIN CORE_OC4A_PIN #elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) -# define TIMER_PWM_PIN 6 // Arduino Mega +# define SEND_PIN 6 // Arduino Mega #else # error "Please add OC4A pin number here\n" #endif @@ -410,9 +460,9 @@ //----------------- #if defined(CORE_OC5A_PIN) -# define TIMER_PWM_PIN CORE_OC5A_PIN +# define SEND_PIN CORE_OC5A_PIN #elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) -# define TIMER_PWM_PIN 46 // Arduino Mega +# define SEND_PIN 46 // Arduino Mega #else # error "Please add OC5A pin number here\n" #endif @@ -479,7 +529,7 @@ CMT_MSC = 0x03; \ }) -#define TIMER_PWM_PIN 5 +#define SEND_PIN 5 // defines for TPM1 timer on Teensy-LC #elif defined(IR_USE_TIMER_TPM1) @@ -509,7 +559,7 @@ FTM1_C0V = 0; \ FTM1_SC = FTM_SC_CLKS(1) | FTM_SC_PS(0) | FTM_SC_TOF | FTM_SC_TOIE; \ }) -#define TIMER_PWM_PIN 16 +#define SEND_PIN 16 // defines for timer_tiny0 (8 bits) #elif defined(IR_USE_TIMER_TINY0) @@ -543,7 +593,7 @@ }) #endif -#define TIMER_PWM_PIN 1 /* ATtiny85 */ +#define SEND_PIN 1 /* ATtiny85 */ //--------------------------------------------------------- // ESP32 (ESP8266 should likely be added here too) @@ -560,12 +610,29 @@ // way to do this on ESP32 is using the RMT built in driver like in this incomplete library below // https://github.com/ExploreEmbedded/ESP32_RMT #elif defined(IR_TIMER_USE_ESP32) -#define TIMER_RESET -#define TIMER_ENABLE_PWM -#define TIMER_DISABLE_PWM Serial.println("IRsend not implemented for ESP32 yet"); -#define TIMER_ENABLE_INTR -#define TIMER_DISABLE_INTR -#define TIMER_INTR_NAME + +#define TIMER_RESET + +#ifdef ISR +# undef ISR +#endif +#define ISR(f) void IRTimer() + +#elif defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_SAMD) +// use timer 3 hardcoded at this time + +#define TIMER_RESET +#define TIMER_ENABLE_PWM // Not presently used +#define TIMER_DISABLE_PWM +#define TIMER_ENABLE_INTR NVIC_EnableIRQ(TC3_IRQn) // Not presently used +#define TIMER_DISABLE_INTR NVIC_DisableIRQ(TC3_IRQn) +#define TIMER_INTR_NAME TC3_Handler // Not presently used +#define TIMER_CONFIG_KHZ(f) + +#ifdef ISR +# undef ISR +#endif +#define ISR(f) void irs() //--------------------------------------------------------- // Unknown Timer @@ -574,4 +641,13 @@ # error "Internal code configuration error, no known IR_USE_TIMER# defined\n" #endif +// Provide default definitions, portable but possibly slower than necessary. +#ifndef SENDPIN_ON +#define SENDPIN_ON(pin) digitalWrite(pin, HIGH) +#endif + +#ifndef SENDPIN_OFF +#define SENDPIN_OFF(pin) digitalWrite(pin, LOW) +#endif + #endif // ! boarddefs_h diff --git a/esp32.cpp b/esp32.cpp new file mode 100644 index 000000000..ef4d79476 --- /dev/null +++ b/esp32.cpp @@ -0,0 +1,39 @@ +#ifdef ESP32 + +// This file contains functions specific to the ESP32. + +#include "IRremote.h" +#include "IRremoteInt.h" + +// "Idiot check" +#ifdef USE_DEFAULT_ENABLE_IR_IN +#error Must undef USE_DEFAULT_ENABLE_IR_IN +#endif + +hw_timer_t *timer; +void IRTimer(); // defined in IRremote.cpp, masqueraded as ISR(TIMER_INTR_NAME) + +//+============================================================================= +// initialization +// +void IRrecv::enableIRIn ( ) +{ +// Interrupt Service Routine - Fires every 50uS + // ESP32 has a proper API to setup timers, no weird chip macros needed + // simply call the readable API versions :) + // 3 timers, choose #1, 80 divider nanosecond precision, 1 to count up + timer = timerBegin(1, 80, 1); + timerAttachInterrupt(timer, &IRTimer, 1); + // every 50ns, autoreload = true + timerAlarmWrite(timer, 50, true); + timerAlarmEnable(timer); + + // Initialize state machine variables + irparams.rcvstate = STATE_IDLE; + irparams.rawlen = 0; + + // Set pin modes + pinMode(irparams.recvpin, INPUT); +} + +#endif // ESP32 diff --git a/examples/IRremoteInfo/IRremoteInfo.ino b/examples/IRremoteInfo/IRremoteInfo.ino index 2a269d948..c3f329754 100644 --- a/examples/IRremoteInfo/IRremoteInfo.ino +++ b/examples/IRremoteInfo/IRremoteInfo.ino @@ -79,7 +79,7 @@ void dumpTIMER() { void dumpTimerPin() { Serial.print(F("IR Tx Pin: ")); - Serial.println(TIMER_PWM_PIN); + Serial.println(SEND_PIN); } void dumpClock() { diff --git a/irRecv.cpp b/irRecv.cpp index 12b0806b1..b549dac1c 100644 --- a/irRecv.cpp +++ b/irRecv.cpp @@ -1,10 +1,5 @@ #include "IRremote.h" #include "IRremoteInt.h" - -#ifdef IR_TIMER_USE_ESP32 -hw_timer_t *timer; -void IRTimer(); // defined in IRremote.cpp -#endif //+============================================================================= // Decodes the received IR message @@ -120,19 +115,10 @@ IRrecv::IRrecv (int recvpin, int blinkpin) //+============================================================================= // initialization // +#ifdef USE_DEFAULT_ENABLE_IR_IN void IRrecv::enableIRIn ( ) { -// Interrupt Service Routine - Fires every 50uS -#ifdef ESP32 - // ESP32 has a proper API to setup timers, no weird chip macros needed - // simply call the readable API versions :) - // 3 timers, choose #1, 80 divider nanosecond precision, 1 to count up - timer = timerBegin(1, 80, 1); - timerAttachInterrupt(timer, &IRTimer, 1); - // every 50ns, autoreload = true - timerAlarmWrite(timer, 50, true); - timerAlarmEnable(timer); -#else +// Interrupt Service Routine - Fires every 50uS cli(); // Setup pulse clock timer interrupt // Prescale /8 (16M/8 = 0.5 microseconds per tick) @@ -146,7 +132,6 @@ void IRrecv::enableIRIn ( ) TIMER_RESET; sei(); // enable interrupts -#endif // Initialize state machine variables irparams.rcvstate = STATE_IDLE; @@ -155,14 +140,17 @@ void IRrecv::enableIRIn ( ) // Set pin modes pinMode(irparams.recvpin, INPUT); } +#endif // USE_DEFAULT_ENABLE_IR_IN //+============================================================================= // Enable/disable blinking of pin 13 on IR processing // void IRrecv::blink13 (int blinkflag) { +#ifdef BLINKLED irparams.blinkflag = blinkflag; if (blinkflag) pinMode(BLINKLED, OUTPUT) ; +#endif } //+============================================================================= diff --git a/irSend.cpp b/irSend.cpp index c3ef3ffac..a01b5a012 100644 --- a/irSend.cpp +++ b/irSend.cpp @@ -1,6 +1,7 @@ #include "IRremote.h" #include "IRremoteInt.h" +#ifdef SENDING_SUPPORTED //+============================================================================= void IRsend::sendRaw (const unsigned int buf[], unsigned int len, unsigned int hz) { @@ -15,14 +16,59 @@ void IRsend::sendRaw (const unsigned int buf[], unsigned int len, unsigned in space(0); // Always end with the LED off } +#ifdef USE_SOFT_CARRIER +void inline IRsend::sleepMicros(unsigned long us) +{ +#ifdef USE_SPIN_WAIT + sleepUntilMicros(micros() + us); +#else + if (us > 0U) // Is this necessary? (Official docu https://www.arduino.cc/en/Reference/DelayMicroseconds does not tell.) + delayMicroseconds((unsigned int) us); +#endif +} + +void inline IRsend::sleepUntilMicros(unsigned long targetTime) +{ +#ifdef USE_SPIN_WAIT + while (micros() < targetTime) + ; +#else + unsigned long now = micros(); + if (now < targetTime) + sleepMicros(targetTime - now); +#endif +} +#endif // USE_SOFT_CARRIER + //+============================================================================= // Sends an IR mark for the specified number of microseconds. // The mark output is modulated at the PWM frequency. // -void IRsend::mark (unsigned int time) + +void IRsend::mark(unsigned int time) { +#ifdef USE_SOFT_CARRIER + unsigned long start = micros(); + unsigned long stop = start + time; + if (stop + periodTime < start) + // Counter wrap-around, happens very seldomly, but CAN happen. + // Just give up instead of possibly damaging the hardware. + return; + + unsigned long nextPeriodEnding = start; + unsigned long now = micros(); + while (now < stop) { + SENDPIN_ON(sendPin); + sleepMicros(periodOnTime); + SENDPIN_OFF(sendPin); + nextPeriodEnding += periodTime; + sleepUntilMicros(nextPeriodEnding); + now = micros(); + } +#else TIMER_ENABLE_PWM; // Enable pin 3 PWM output if (time > 0) custom_delay_usec(time); +#endif } //+============================================================================= @@ -54,13 +100,16 @@ void IRsend::space (unsigned int time) // void IRsend::enableIROut (int khz) { -// FIXME: implement ESP32 support, see IR_TIMER_USE_ESP32 in boarddefs.h -#ifndef ESP32 +#ifdef USE_SOFT_CARRIER + periodTime = (1000U + khz/2) / khz; // = 1000/khz + 1/2 = round(1000.0/khz) + periodOnTime = periodTime * DUTY_CYCLE / 100U - PULSE_CORRECTION; +#endif + // Disable the Timer2 Interrupt (which is used for receiving IR) TIMER_DISABLE_INTR; //Timer2 Overflow Interrupt - pinMode(TIMER_PWM_PIN, OUTPUT); - digitalWrite(TIMER_PWM_PIN, LOW); // When not sending PWM, we want it low + pinMode(sendPin, OUTPUT); + SENDPIN_OFF(sendPin); // When not sending, we want it low // COM2A = 00: disconnect OC2A // COM2B = 00: disconnect OC2B; to send signal set to 10: OC2B non-inverted @@ -68,7 +117,6 @@ 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 } //+============================================================================= @@ -88,3 +136,4 @@ void IRsend::custom_delay_usec(unsigned long uSecs) { //} } +#endif // SENDING_SUPPORTED \ No newline at end of file diff --git a/sam.cpp b/sam.cpp new file mode 100644 index 000000000..06575891c --- /dev/null +++ b/sam.cpp @@ -0,0 +1,102 @@ +// Support routines for SAM processor boards + +#include "IRremote.h" +#include "IRremoteInt.h" + +#if defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_SAMD) + +// "Idiot check" +#ifdef USE_DEFAULT_ENABLE_IR_IN +#error Must undef USE_DEFAULT_ENABLE_IR_IN +#endif + +//+============================================================================= +// ATSAMD Timer setup & IRQ functions +// + +// following based on setup from GitHub jdneo/timerInterrupt.ino + +static void setTimerFrequency(int frequencyHz) +{ + int compareValue = (SYSCLOCK / (TIMER_PRESCALER_DIV * frequencyHz)) - 1; + //Serial.println(compareValue); + TcCount16* TC = (TcCount16*) TC3; + // Make sure the count is in a proportional position to where it was + // to prevent any jitter or disconnect when changing the compare value. + TC->COUNT.reg = map(TC->COUNT.reg, 0, TC->CC[0].reg, 0, compareValue); + TC->CC[0].reg = compareValue; + //Serial.print("COUNT.reg "); + //Serial.println(TC->COUNT.reg); + //Serial.print("CC[0].reg "); + //Serial.println(TC->CC[0].reg); + while (TC->STATUS.bit.SYNCBUSY == 1); +} + +static void startTimer() +{ + REG_GCLK_CLKCTRL = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_ID_TCC2_TC3); + while (GCLK->STATUS.bit.SYNCBUSY == 1); // wait for sync + + TcCount16* TC = (TcCount16*) TC3; + + TC->CTRLA.reg &= ~TC_CTRLA_ENABLE; + while (TC->STATUS.bit.SYNCBUSY == 1); // wait for sync + + // Use the 16-bit timer + TC->CTRLA.reg |= TC_CTRLA_MODE_COUNT16; + while (TC->STATUS.bit.SYNCBUSY == 1); // wait for sync + + // Use match mode so that the timer counter resets when the count matches the compare register + TC->CTRLA.reg |= TC_CTRLA_WAVEGEN_MFRQ; + while (TC->STATUS.bit.SYNCBUSY == 1); // wait for sync + + // Set prescaler to 1024 + //TC->CTRLA.reg |= TC_CTRLA_PRESCALER_DIV1024; + TC->CTRLA.reg |= TC_CTRLA_PRESCALER_DIV64; + while (TC->STATUS.bit.SYNCBUSY == 1); // wait for sync + + setTimerFrequency(1000000 / USECPERTICK); + + // Enable the compare interrupt + TC->INTENSET.reg = 0; + TC->INTENSET.bit.MC0 = 1; + + NVIC_EnableIRQ(TC3_IRQn); + + TC->CTRLA.reg |= TC_CTRLA_ENABLE; + while (TC->STATUS.bit.SYNCBUSY == 1); // wait for sync +} + +//+============================================================================= +// initialization +// + +void IRrecv::enableIRIn() +{ + // Interrupt Service Routine - Fires every 50uS + //Serial.println("Starting timer"); + startTimer(); + //Serial.println("Started timer"); + + // Initialize state machine variables + irparams.rcvstate = STATE_IDLE; + irparams.rawlen = 0; + + // Set pin modes + pinMode(irparams.recvpin, INPUT); +} + +void irs(); // Defined in IRRemote as ISR(TIMER_INTR_NAME) + +void TC3_Handler(void) +{ + TcCount16* TC = (TcCount16*) TC3; + // If this interrupt is due to the compare register matching the timer count + // we toggle the LED. + if (TC->INTFLAG.bit.MC0 == 1) { + TC->INTFLAG.bit.MC0 = 1; + irs(); + } +} + +#endif // defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_SAMD) \ No newline at end of file From e1768b4debb03441e93a1f2d5f135111e98fdd97 Mon Sep 17 00:00:00 2001 From: Rafi Khan Date: Thu, 10 Aug 2017 17:01:44 -0600 Subject: [PATCH 02/29] Added changelog info --- README.md | 2 +- changelog.md | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 00a4b03be..915b12867 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This library enables you to send and receive using infra-red signals on an Ardui Tutorials and more information will be made available on [the official homepage](http://z3t0.github.io/Arduino-IRremote/). -## Version - 2.2.3 +## Version - 2.4.0b ## Installation 1. Navigate to the [Releases](https://github.com/z3t0/Arduino-IRremote/releases) page. diff --git a/changelog.md b/changelog.md index 81339f2e6..92d647188 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,6 @@ +## 2.4.0 - 2017/08/10 + - Cleanup of hardware dependencies. Merge in SAM support [PR #437](https://github.com/z3t0/Arduino-IRremote/pull/437) + ## 2.3.3 - 2017/03/31 - Added ESP32 IR receive support [PR #427](https://github.com/z3t0/Arduino-IRremote/pull/425) From 622e28bf692a7a49d68f5f63d2185c2bcd20c918 Mon Sep 17 00:00:00 2001 From: Rafi Khan Date: Sun, 13 Aug 2017 11:05:12 -0600 Subject: [PATCH 03/29] Update library.properties --- library.properties | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/library.properties b/library.properties index 39fd814eb..0e23d4cf2 100644 --- a/library.properties +++ b/library.properties @@ -1,9 +1,8 @@ name=IRremote -version=2.2.3 -author=shirriff -maintainer=shirriff +version=2.4.0 +author=shirriff, z3t0 +maintainer=z3t0 sentence=Send and receive infrared signals with multiple protocols -paragraph=Send and receive infrared signals with multiple protocols -category=Signal Input/Output -url=https://github.com/shirriff/Arduino-IRremote.git +category=Communication +url=https://github.com/z3t0/Arduino-IRremote architectures=* From b0d15b6020c5321a1fcb534789b998e6974b7643 Mon Sep 17 00:00:00 2001 From: Rafi Khan Date: Sun, 13 Aug 2017 11:05:50 -0600 Subject: [PATCH 04/29] Modified library.json --- library.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.json b/library.json index d8cd523a7..95407e506 100644 --- a/library.json +++ b/library.json @@ -7,7 +7,7 @@ "type": "git", "url": "https://github.com/z3t0/Arduino-IRremote.git" }, - "version": "2.3.3", + "version": "2.4.0", "frameworks": "arduino", "platforms": "atmelavr", "authors" : From 635e8a923d6367d55cce000cb38f3d6934dc417c Mon Sep 17 00:00:00 2001 From: Rafi Khan Date: Sun, 13 Aug 2017 11:19:20 -0600 Subject: [PATCH 05/29] Restructuring directory as per #464 --- arduino-irremote.sublime-workspace | 240 ------------------ IRremote.cpp => src/IRremote.cpp | 0 IRremote.h => src/IRremote.h | 0 IRremoteInt.h => src/IRremoteInt.h | 0 boarddefs.h => src/boarddefs.h | 0 esp32.cpp => src/esp32.cpp | 0 irPronto.cpp => src/irPronto.cpp | 0 irRecv.cpp => src/irRecv.cpp | 0 irSend.cpp => src/irSend.cpp | 0 ir_Aiwa.cpp => src/ir_Aiwa.cpp | 0 ir_Denon.cpp => src/ir_Denon.cpp | 0 ir_Dish.cpp => src/ir_Dish.cpp | 0 ir_JVC.cpp => src/ir_JVC.cpp | 0 ir_LG.cpp => src/ir_LG.cpp | 0 ir_Lego_PF.cpp => src/ir_Lego_PF.cpp | 0 .../ir_Lego_PF_BitStreamEncoder.h | 0 ir_Mitsubishi.cpp => src/ir_Mitsubishi.cpp | 0 ir_NEC.cpp => src/ir_NEC.cpp | 0 ir_Panasonic.cpp => src/ir_Panasonic.cpp | 0 ir_RC5_RC6.cpp => src/ir_RC5_RC6.cpp | 0 ir_Samsung.cpp => src/ir_Samsung.cpp | 0 ir_Sanyo.cpp => src/ir_Sanyo.cpp | 0 ir_Sharp.cpp => src/ir_Sharp.cpp | 0 ir_Sony.cpp => src/ir_Sony.cpp | 0 ir_Template.cpp => src/ir_Template.cpp | 0 ir_Whynter.cpp => src/ir_Whynter.cpp | 0 sam.cpp => src/sam.cpp | 0 27 files changed, 240 deletions(-) delete mode 100644 arduino-irremote.sublime-workspace rename IRremote.cpp => src/IRremote.cpp (100%) rename IRremote.h => src/IRremote.h (100%) rename IRremoteInt.h => src/IRremoteInt.h (100%) rename boarddefs.h => src/boarddefs.h (100%) rename esp32.cpp => src/esp32.cpp (100%) rename irPronto.cpp => src/irPronto.cpp (100%) rename irRecv.cpp => src/irRecv.cpp (100%) rename irSend.cpp => src/irSend.cpp (100%) rename ir_Aiwa.cpp => src/ir_Aiwa.cpp (100%) rename ir_Denon.cpp => src/ir_Denon.cpp (100%) rename ir_Dish.cpp => src/ir_Dish.cpp (100%) rename ir_JVC.cpp => src/ir_JVC.cpp (100%) rename ir_LG.cpp => src/ir_LG.cpp (100%) rename ir_Lego_PF.cpp => src/ir_Lego_PF.cpp (100%) rename ir_Lego_PF_BitStreamEncoder.h => src/ir_Lego_PF_BitStreamEncoder.h (100%) rename ir_Mitsubishi.cpp => src/ir_Mitsubishi.cpp (100%) rename ir_NEC.cpp => src/ir_NEC.cpp (100%) rename ir_Panasonic.cpp => src/ir_Panasonic.cpp (100%) rename ir_RC5_RC6.cpp => src/ir_RC5_RC6.cpp (100%) rename ir_Samsung.cpp => src/ir_Samsung.cpp (100%) rename ir_Sanyo.cpp => src/ir_Sanyo.cpp (100%) rename ir_Sharp.cpp => src/ir_Sharp.cpp (100%) rename ir_Sony.cpp => src/ir_Sony.cpp (100%) rename ir_Template.cpp => src/ir_Template.cpp (100%) rename ir_Whynter.cpp => src/ir_Whynter.cpp (100%) rename sam.cpp => src/sam.cpp (100%) diff --git a/arduino-irremote.sublime-workspace b/arduino-irremote.sublime-workspace deleted file mode 100644 index f536803d0..000000000 --- a/arduino-irremote.sublime-workspace +++ /dev/null @@ -1,240 +0,0 @@ -{ - "auto_complete": - { - "selected_items": - [ - [ - "vb", - "vboMatrix" - ] - ] - }, - "buffers": - [ - ], - "build_system": "", - "build_system_choices": - [ - ], - "build_varint": "", - "command_palette": - { - "height": 275.0, - "last_filter": "blame", - "selected_items": - [ - [ - "blame", - "Git: Blame" - ], - [ - "install", - "Package Control: Install Package" - ], - [ - "diff", - "Git: Diff Current File" - ], - [ - "js", - "Set Syntax: JavaScript" - ], - [ - "i", - "Package Control: Install Package" - ], - [ - "instal", - "Package Control: Install Package" - ] - ], - "width": 510.0 - }, - "console": - { - "height": 126.0, - "history": - [ - "import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)" - ] - }, - "distraction_free": - { - "menu_visible": true, - "show_minimap": false, - "show_open_files": false, - "show_tabs": false, - "side_bar_visible": false, - "status_bar_visible": false - }, - "expanded_folders": - [ - "/C/Users/Rafi Khan/Documents/Arduino/libraries/Arduino-IRremote" - ], - "file_history": - [ - "/C/Users/Rafi Khan/Documents/Arduino/libraries/Arduino-IRremote/changelog.md", - "/C/Users/Rafi Khan/Documents/Development/Arduino-IRremote/arduino-irremote.sublime-project", - "/C/Users/Rafi Khan/Documents/Development/Arduino-IRremote/.gitignore", - "/C/Users/Rafi Khan/Documents/Development/magic/README.md", - "/C/Users/Rafi Khan/Documents/Development/magic/shader.frag", - "/C/Users/Rafi Khan/Documents/Development/magic/package.json", - "/C/Users/Rafi Khan/Documents/Development/magic/block.js", - "/C/Users/Rafi Khan/Documents/Development/magic/chunker.js", - "/C/Users/Rafi Khan/Documents/Development/magic/index.js", - "/C/Users/Rafi Khan/Documents/Development/magic/blocks", - "/C/Users/Rafi Khan/AppData/Roaming/Sublime Text 3/Packages/User/Preferences.sublime-settings", - "/C/Users/Rafi Khan/Documents/Development/magic/shader.vert", - "/C/Users/Rafi Khan/Documents/Development/magic/magic.sublime-project", - "/C/Users/Rafi Khan/Documents/Development/magic/node_modules/browserify/node_modules/syntax-error/node_modules/acorn/.tern-project", - "/C/Users/Rafi Khan/OneDrive/Documents/School-RafiKhan/Grade 11/CS30/Python/supermarket.py", - "/C/Users/Rafi Khan/OneDrive/Documents/School-RafiKhan/Grade 11/CS30/Python/takingavacation.py", - "/C/Users/Rafi Khan/OneDrive/Documents/School-RafiKhan/Grade 11/CS30/Python/TipCalculator.py", - "/C/Users/Rafi Khan/OneDrive/Documents/School-RafiKhan/Grade 11/CS30/Python/battleship.py", - "/C/Users/Rafi Khan/OneDrive/Documents/School-RafiKhan/Grade 11/CS30/Python/exam.py", - "/C/Users/Rafi Khan/OneDrive/Documents/School-RafiKhan/Grade 11/CS30/Python/pyglatin.py", - "/C/Users/Rafi Khan/OneDrive/Documents/School-RafiKhan/Grade 11/CS30/Python/student.py" - ], - "find": - { - "height": 28.0 - }, - "find_in_files": - { - "height": 0.0, - "where_history": - [ - ] - }, - "find_state": - { - "case_sensitive": false, - "find_history": - [ - "i", - "Direction", - ";", - ";\n", - "north", - "cubeMatrix", - ")\n", - "vec3.set", - "f", - ";", - "();\n", - "render", - "this", - "y" - ], - "highlight": true, - "in_selection": false, - "preserve_case": false, - "regex": false, - "replace_history": - [ - ], - "reverse": false, - "show_context": true, - "use_buffer2": true, - "whole_word": false, - "wrap": true - }, - "groups": - [ - { - "sheets": - [ - ] - } - ], - "incremental_find": - { - "height": 28.0 - }, - "input": - { - "height": 66.0 - }, - "layout": - { - "cells": - [ - [ - 0, - 0, - 1, - 1 - ] - ], - "cols": - [ - 0.0, - 1.0 - ], - "rows": - [ - 0.0, - 1.0 - ] - }, - "menu_visible": true, - "output.find_results": - { - "height": 0.0 - }, - "pinned_build_system": "", - "project": "arduino-irremote.sublime-project", - "replace": - { - "height": 52.0 - }, - "save_all_on_build": true, - "select_file": - { - "height": 0.0, - "last_filter": "", - "selected_items": - [ - [ - "json", - "package.json" - ], - [ - "inde", - "index.js" - ] - ], - "width": 0.0 - }, - "select_project": - { - "height": 0.0, - "last_filter": "", - "selected_items": - [ - ], - "width": 0.0 - }, - "select_symbol": - { - "height": 0.0, - "last_filter": "", - "selected_items": - [ - ], - "width": 0.0 - }, - "selected_group": 0, - "settings": - { - }, - "show_minimap": true, - "show_open_files": false, - "show_tabs": true, - "side_bar_visible": true, - "side_bar_width": 150.0, - "status_bar_visible": true, - "template_settings": - { - } -} diff --git a/IRremote.cpp b/src/IRremote.cpp similarity index 100% rename from IRremote.cpp rename to src/IRremote.cpp diff --git a/IRremote.h b/src/IRremote.h similarity index 100% rename from IRremote.h rename to src/IRremote.h diff --git a/IRremoteInt.h b/src/IRremoteInt.h similarity index 100% rename from IRremoteInt.h rename to src/IRremoteInt.h diff --git a/boarddefs.h b/src/boarddefs.h similarity index 100% rename from boarddefs.h rename to src/boarddefs.h diff --git a/esp32.cpp b/src/esp32.cpp similarity index 100% rename from esp32.cpp rename to src/esp32.cpp diff --git a/irPronto.cpp b/src/irPronto.cpp similarity index 100% rename from irPronto.cpp rename to src/irPronto.cpp diff --git a/irRecv.cpp b/src/irRecv.cpp similarity index 100% rename from irRecv.cpp rename to src/irRecv.cpp diff --git a/irSend.cpp b/src/irSend.cpp similarity index 100% rename from irSend.cpp rename to src/irSend.cpp diff --git a/ir_Aiwa.cpp b/src/ir_Aiwa.cpp similarity index 100% rename from ir_Aiwa.cpp rename to src/ir_Aiwa.cpp diff --git a/ir_Denon.cpp b/src/ir_Denon.cpp similarity index 100% rename from ir_Denon.cpp rename to src/ir_Denon.cpp diff --git a/ir_Dish.cpp b/src/ir_Dish.cpp similarity index 100% rename from ir_Dish.cpp rename to src/ir_Dish.cpp diff --git a/ir_JVC.cpp b/src/ir_JVC.cpp similarity index 100% rename from ir_JVC.cpp rename to src/ir_JVC.cpp diff --git a/ir_LG.cpp b/src/ir_LG.cpp similarity index 100% rename from ir_LG.cpp rename to src/ir_LG.cpp diff --git a/ir_Lego_PF.cpp b/src/ir_Lego_PF.cpp similarity index 100% rename from ir_Lego_PF.cpp rename to src/ir_Lego_PF.cpp diff --git a/ir_Lego_PF_BitStreamEncoder.h b/src/ir_Lego_PF_BitStreamEncoder.h similarity index 100% rename from ir_Lego_PF_BitStreamEncoder.h rename to src/ir_Lego_PF_BitStreamEncoder.h diff --git a/ir_Mitsubishi.cpp b/src/ir_Mitsubishi.cpp similarity index 100% rename from ir_Mitsubishi.cpp rename to src/ir_Mitsubishi.cpp diff --git a/ir_NEC.cpp b/src/ir_NEC.cpp similarity index 100% rename from ir_NEC.cpp rename to src/ir_NEC.cpp diff --git a/ir_Panasonic.cpp b/src/ir_Panasonic.cpp similarity index 100% rename from ir_Panasonic.cpp rename to src/ir_Panasonic.cpp diff --git a/ir_RC5_RC6.cpp b/src/ir_RC5_RC6.cpp similarity index 100% rename from ir_RC5_RC6.cpp rename to src/ir_RC5_RC6.cpp diff --git a/ir_Samsung.cpp b/src/ir_Samsung.cpp similarity index 100% rename from ir_Samsung.cpp rename to src/ir_Samsung.cpp diff --git a/ir_Sanyo.cpp b/src/ir_Sanyo.cpp similarity index 100% rename from ir_Sanyo.cpp rename to src/ir_Sanyo.cpp diff --git a/ir_Sharp.cpp b/src/ir_Sharp.cpp similarity index 100% rename from ir_Sharp.cpp rename to src/ir_Sharp.cpp diff --git a/ir_Sony.cpp b/src/ir_Sony.cpp similarity index 100% rename from ir_Sony.cpp rename to src/ir_Sony.cpp diff --git a/ir_Template.cpp b/src/ir_Template.cpp similarity index 100% rename from ir_Template.cpp rename to src/ir_Template.cpp diff --git a/ir_Whynter.cpp b/src/ir_Whynter.cpp similarity index 100% rename from ir_Whynter.cpp rename to src/ir_Whynter.cpp diff --git a/sam.cpp b/src/sam.cpp similarity index 100% rename from sam.cpp rename to src/sam.cpp From 31968a4875af21736dda61b4c3c734ebfa6c13f4 Mon Sep 17 00:00:00 2001 From: Rafi Khan Date: Sun, 13 Aug 2017 11:29:12 -0600 Subject: [PATCH 06/29] Removed redundant preprocessor directives In the newer versions of the IDE it is sufficient to simply include the Arduino.h header file. Fixes #463 --- src/IRremoteInt.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/IRremoteInt.h b/src/IRremoteInt.h index 1c319acbf..1baa05d6d 100644 --- a/src/IRremoteInt.h +++ b/src/IRremoteInt.h @@ -18,15 +18,9 @@ #define IRremoteint_h //------------------------------------------------------------------------------ -// Include the right Arduino header +// Include the Arduino header // -#if defined(ARDUINO) && (ARDUINO >= 100) -# include -#else -# if !defined(IRPRONTO) -# include -# endif -#endif +#include //------------------------------------------------------------------------------ // This handles definition and access to global variables From a406f3b9f97864c23cc7fb76f5deb04f5e09c9f8 Mon Sep 17 00:00:00 2001 From: Rafi Khan Date: Sun, 13 Aug 2017 11:42:39 -0600 Subject: [PATCH 07/29] Removed blinking led It is difficult to maintain this over different architectures and also not entirely that useful. Fixes #462 --- keywords.txt | 1 - src/IRremote.cpp | 11 ----------- src/IRremote.h | 3 +-- src/IRremoteInt.h | 2 -- src/boarddefs.h | 27 +-------------------------- src/irRecv.cpp | 17 +---------------- 6 files changed, 3 insertions(+), 58 deletions(-) diff --git a/keywords.txt b/keywords.txt index f2b9a4957..ea6e0192c 100644 --- a/keywords.txt +++ b/keywords.txt @@ -14,7 +14,6 @@ IRsend KEYWORD1 # Methods and Functions (KEYWORD2) ####################################### -blink13 KEYWORD2 decode KEYWORD2 enableIRIn KEYWORD2 resume KEYWORD2 diff --git a/src/IRremote.cpp b/src/IRremote.cpp index f41f81878..c8730d7b3 100644 --- a/src/IRremote.cpp +++ b/src/IRremote.cpp @@ -127,7 +127,6 @@ ISR (TIMER_INTR_NAME) { TIMER_RESET; - // Read if IR Receiver -> SPACE [xmt LED off] or a MARK [xmt LED on] // digitalRead() is very slow. Optimisation is possible, but makes the code unportable uint8_t irdata = (uint8_t)digitalRead(irparams.recvpin); @@ -185,14 +184,4 @@ ISR (TIMER_INTR_NAME) break; } -#ifdef BLINKLED - // If requested, flash LED while receiving IR data - if (irparams.blinkflag) { - if (irdata == MARK) - if (irparams.blinkpin) digitalWrite(irparams.blinkpin, HIGH); // Turn user defined pin LED on - else BLINKLED_ON() ; // if no user defined LED pin, turn default LED pin for the hardware on - else if (irparams.blinkpin) digitalWrite(irparams.blinkpin, LOW); // Turn user defined pin LED on - else BLINKLED_OFF() ; // if no user defined LED pin, turn default LED pin for the hardware on - } -#endif // BLINKLED } diff --git a/src/IRremote.h b/src/IRremote.h index 928284361..40f28dc2f 100644 --- a/src/IRremote.h +++ b/src/IRremote.h @@ -172,9 +172,8 @@ class IRrecv { public: IRrecv (int recvpin) ; - IRrecv (int recvpin, int blinkpin); + IRrecv (int recvpin); - void blink13 (int blinkflag) ; int decode (decode_results *results) ; void enableIRIn ( ) ; bool isIdle ( ) ; diff --git a/src/IRremoteInt.h b/src/IRremoteInt.h index 1baa05d6d..08f162e51 100644 --- a/src/IRremoteInt.h +++ b/src/IRremoteInt.h @@ -41,8 +41,6 @@ typedef // The fields are ordered to reduce memory over caused by struct-padding uint8_t rcvstate; // State Machine state uint8_t recvpin; // Pin connected to IR data from detector - uint8_t blinkpin; - uint8_t blinkflag; // true -> enable blinking of pin on IR processing uint8_t rawlen; // counter of entries in rawbuf unsigned int timer; // State timer, counts 50uS ticks. unsigned int rawbuf[RAWBUF]; // raw data diff --git a/src/boarddefs.h b/src/boarddefs.h index 5c49465ef..5751ba700 100644 --- a/src/boarddefs.h +++ b/src/boarddefs.h @@ -47,29 +47,10 @@ // is not configurable on the current board. //------------------------------------------------------------------------------ -// Defines for blinking the LED +// Soft Carrier fallback for SAM and SAMD architectures // -#if defined(CORE_LED0_PIN) -# define BLINKLED CORE_LED0_PIN -# define BLINKLED_ON() (digitalWrite(CORE_LED0_PIN, HIGH)) -# define BLINKLED_OFF() (digitalWrite(CORE_LED0_PIN, LOW)) - -#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) -# define BLINKLED 13 -# define BLINKLED_ON() (PORTB |= B10000000) -# define BLINKLED_OFF() (PORTB &= B01111111) - -#elif defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644__) -# define BLINKLED 0 -# define BLINKLED_ON() (PORTD |= B00000001) -# define BLINKLED_OFF() (PORTD &= B11111110) - #elif defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_SAMD) -# define BLINKLED LED_BUILTIN -# define BLINKLED_ON() (digitalWrite(LED_BUILTIN, HIGH)) -# define BLINKLED_OFF() (digitalWrite(LED_BUILTIN, LOW)) - # define USE_SOFT_CARRIER // Define to use spin wait instead of delayMicros() //# define USE_SPIN_WAIT @@ -79,8 +60,6 @@ # define SEND_PIN 9 #elif defined(ESP32) - // No system LED on ESP32, disable blinking by NOT defining BLINKLED - // avr/interrupt.h is not present # undef HAS_AVR_INTERRUPT_H @@ -90,10 +69,6 @@ // Supply own enbleIRIn # undef USE_DEFAULT_ENABLE_IR_IN -#else -# define BLINKLED 13 -# define BLINKLED_ON() (PORTB |= B00100000) -# define BLINKLED_OFF() (PORTB &= B11011111) #endif //------------------------------------------------------------------------------ diff --git a/src/irRecv.cpp b/src/irRecv.cpp index b549dac1c..8498e16a4 100644 --- a/src/irRecv.cpp +++ b/src/irRecv.cpp @@ -99,15 +99,11 @@ int IRrecv::decode (decode_results *results) IRrecv::IRrecv (int recvpin) { irparams.recvpin = recvpin; - irparams.blinkflag = 0; } -IRrecv::IRrecv (int recvpin, int blinkpin) +IRrecv::IRrecv (int recvpin) { irparams.recvpin = recvpin; - irparams.blinkpin = blinkpin; - pinMode(blinkpin, OUTPUT); - irparams.blinkflag = 0; } @@ -142,17 +138,6 @@ void IRrecv::enableIRIn ( ) } #endif // USE_DEFAULT_ENABLE_IR_IN -//+============================================================================= -// Enable/disable blinking of pin 13 on IR processing -// -void IRrecv::blink13 (int blinkflag) -{ -#ifdef BLINKLED - irparams.blinkflag = blinkflag; - if (blinkflag) pinMode(BLINKLED, OUTPUT) ; -#endif -} - //+============================================================================= // Return if receiving new IR signals // From 563c82c6c4fbce090590fd0c30f7c8301a4b2652 Mon Sep 17 00:00:00 2001 From: Rafi Khan Date: Sun, 13 Aug 2017 11:46:58 -0600 Subject: [PATCH 08/29] Removed pronto "protocol" Fixes #466 --- examples/IRremoteInfo/IRremoteInfo.ino | 1 - src/IRremote.h | 23 -- src/irPronto.cpp | 513 ------------------------- 3 files changed, 537 deletions(-) delete mode 100644 src/irPronto.cpp diff --git a/examples/IRremoteInfo/IRremoteInfo.ino b/examples/IRremoteInfo/IRremoteInfo.ino index c3f329754..45cf7236e 100644 --- a/examples/IRremoteInfo/IRremoteInfo.ino +++ b/examples/IRremoteInfo/IRremoteInfo.ino @@ -188,7 +188,6 @@ void dumpProtocols() { Serial.print(F("DISH: ")); printSendEnabled(SEND_DISH); printDecodeEnabled(DECODE_DISH); Serial.print(F("SHARP: ")); printSendEnabled(SEND_SHARP); printDecodeEnabled(DECODE_SHARP); Serial.print(F("DENON: ")); printSendEnabled(SEND_DENON); printDecodeEnabled(DECODE_DENON); - Serial.print(F("PRONTO: ")); printSendEnabled(SEND_PRONTO); Serial.println(F("(Not Applicable)")); } void printSendEnabled(int flag) { diff --git a/src/IRremote.h b/src/IRremote.h index 40f28dc2f..6038a92ed 100644 --- a/src/IRremote.h +++ b/src/IRremote.h @@ -73,27 +73,9 @@ #define DECODE_DENON 1 #define SEND_DENON 1 -#define DECODE_PRONTO 0 // This function doe not logically make sense -#define SEND_PRONTO 1 - #define DECODE_LEGO_PF 0 // NOT WRITTEN #define SEND_LEGO_PF 1 -//------------------------------------------------------------------------------ -// When sending a Pronto code we request to send either the "once" code -// or the "repeat" code -// If the code requested does not exist we can request to fallback on the -// other code (the one we did not explicitly request) -// -// I would suggest that "fallback" will be the standard calling method -// The last paragraph on this page discusses the rationale of this idea: -// http://www.remotecentral.com/features/irdisp2.htm -// -#define PRONTO_ONCE false -#define PRONTO_REPEAT true -#define PRONTO_FALLBACK true -#define PRONTO_NOFALLBACK false - //------------------------------------------------------------------------------ // An enumerated list of all supported formats // You do NOT need to remove entries from this list when disabling protocols! @@ -117,7 +99,6 @@ typedef DISH, SHARP, DENON, - PRONTO, LEGO_PF, } decode_type_t; @@ -340,10 +321,6 @@ class IRsend //...................................................................... # if SEND_DENON void sendDenon (unsigned long data, int nbits) ; -# endif - //...................................................................... -# if SEND_PRONTO - void sendPronto (char* code, bool repeat, bool fallback) ; # endif //...................................................................... # if SEND_LEGO_PF diff --git a/src/irPronto.cpp b/src/irPronto.cpp deleted file mode 100644 index 0f530a900..000000000 --- a/src/irPronto.cpp +++ /dev/null @@ -1,513 +0,0 @@ -#define TEST 0 - -#if TEST -# define SEND_PRONTO 1 -# define PRONTO_ONCE false -# define PRONTO_REPEAT true -# define PRONTO_FALLBACK true -# define PRONTO_NOFALLBACK false -#endif - -#if SEND_PRONTO - -//****************************************************************************** -#if TEST -# include - void enableIROut (int freq) { printf("\nFreq = %d KHz\n", freq); } - void mark (int t) { printf("+%d," , t); } - void space (int t) { printf("-%d, ", t); } -#else -# include "IRremote.h" -#endif // TEST - -//+============================================================================= -// Check for a valid hex digit -// -bool ishex (char ch) -{ - return ( ((ch >= '0') && (ch <= '9')) || - ((ch >= 'A') && (ch <= 'F')) || - ((ch >= 'a') && (ch <= 'f')) ) ? true : false ; -} - -//+============================================================================= -// Check for a valid "blank" ... '\0' is a valid "blank" -// -bool isblank (char ch) -{ - return ((ch == ' ') || (ch == '\t') || (ch == '\0')) ? true : false ; -} - -//+============================================================================= -// Bypass spaces -// -bool byp (char** pcp) -{ - while (isblank(**pcp)) (*pcp)++ ; -} - -//+============================================================================= -// Hex-to-Byte : Decode a hex digit -// We assume the character has already been validated -// -uint8_t htob (char ch) -{ - if ((ch >= '0') && (ch <= '9')) return ch - '0' ; - if ((ch >= 'A') && (ch <= 'F')) return ch - 'A' + 10 ; - if ((ch >= 'a') && (ch <= 'f')) return ch - 'a' + 10 ; -} - -//+============================================================================= -// Hex-to-Word : Decode a block of 4 hex digits -// We assume the string has already been validated -// and the pointer being passed points at the start of a block of 4 hex digits -// -uint16_t htow (char* cp) -{ - return ( (htob(cp[0]) << 12) | (htob(cp[1]) << 8) | - (htob(cp[2]) << 4) | (htob(cp[3]) ) ) ; -} - -//+============================================================================= -// -bool sendPronto (char* s, bool repeat, bool fallback) -{ - int i; - int len; - int skip; - char* cp; - uint16_t freq; // Frequency in KHz - uint8_t usec; // pronto uSec/tick - uint8_t once; - uint8_t rpt; - - // Validate the string - for (cp = s; *cp; cp += 4) { - byp(&cp); - if ( !ishex(cp[0]) || !ishex(cp[1]) || - !ishex(cp[2]) || !ishex(cp[3]) || !isblank(cp[4]) ) return false ; - } - - // We will use cp to traverse the string - cp = s; - - // Check mode = Oscillated/Learned - byp(&cp); - if (htow(cp) != 0000) return false; - cp += 4; - - // Extract & set frequency - byp(&cp); - freq = (int)(1000000 / (htow(cp) * 0.241246)); // Rounding errors will occur, tolerance is +/- 10% - usec = (int)(((1.0 / freq) * 1000000) + 0.5); // Another rounding error, thank Cod for analogue electronics - freq /= 1000; // This will introduce a(nother) rounding error which we do not want in the usec calcualtion - cp += 4; - - // Get length of "once" code - byp(&cp); - once = htow(cp); - cp += 4; - - // Get length of "repeat" code - byp(&cp); - rpt = htow(cp); - cp += 4; - - // Which code are we sending? - if (fallback) { // fallback on the "other" code if "this" code is not present - if (!repeat) { // requested 'once' - if (once) len = once * 2, skip = 0 ; // if once exists send it - else len = rpt * 2, skip = 0 ; // else send repeat code - } else { // requested 'repeat' - if (rpt) len = rpt * 2, skip = 0 ; // if rpt exists send it - else len = once * 2, skip = 0 ; // else send once code - } - } else { // Send what we asked for, do not fallback if the code is empty! - if (!repeat) len = once * 2, skip = 0 ; // 'once' starts at 0 - else len = rpt * 2, skip = once ; // 'repeat' starts where 'once' ends - } - - // Skip to start of code - for (i = 0; i < skip; i++, cp += 4) byp(&cp) ; - - // Send code - enableIROut(freq); - for (i = 0; i < len; i++) { - byp(&cp); - if (i & 1) space(htow(cp) * usec); - else mark (htow(cp) * usec); - cp += 4; - } -} - -//+============================================================================= -#if TEST - -int main ( ) -{ - char prontoTest[] = - "0000 0070 0000 0032 0080 0040 0010 0010 0010 0030 " // 10 - "0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 " // 20 - "0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 " // 30 - "0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 " // 40 - "0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 " // 50 - "0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 " // 60 - "0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 " // 70 - "0010 0010 0010 0030 0010 0010 0010 0030 0010 0010 " // 80 - "0010 0010 0010 0030 0010 0010 0010 0010 0010 0030 " // 90 - "0010 0010 0010 0030 0010 0010 0010 0010 0010 0030 " // 100 - "0010 0030 0010 0aa6"; // 104 - - sendPronto(prontoTest, PRONTO_ONCE, PRONTO_FALLBACK); // once code - sendPronto(prontoTest, PRONTO_REPEAT, PRONTO_FALLBACK); // repeat code - sendPronto(prontoTest, PRONTO_ONCE, PRONTO_NOFALLBACK); // once code - sendPronto(prontoTest, PRONTO_REPEAT, PRONTO_NOFALLBACK); // repeat code - - return 0; -} - -#endif // TEST - -#endif // SEND_PRONTO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#if 0 -//****************************************************************************** -// Sources: -// http://www.remotecentral.com/features/irdisp2.htm -// http://www.hifi-remote.com/wiki/index.php?title=Working_With_Pronto_Hex -//****************************************************************************** - -#include -#include - -#define IRPRONTO -#include "IRremoteInt.h" // The Arduino IRremote library defines USECPERTICK - -//------------------------------------------------------------------------------ -// Source: https://www.google.co.uk/search?q=DENON+MASTER+IR+Hex+Command+Sheet -// -> http://assets.denon.com/documentmaster/us/denon%20master%20ir%20hex.xls -// -char prontoTest[] = - "0000 0070 0000 0032 0080 0040 0010 0010 0010 0030 " // 10 - "0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 " // 20 - "0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 " // 30 - "0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 " // 40 - "0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 " // 50 - "0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 " // 60 - "0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 " // 70 - "0010 0010 0010 0030 0010 0010 0010 0030 0010 0010 " // 80 - "0010 0010 0010 0030 0010 0010 0010 0010 0010 0030 " // 90 - "0010 0010 0010 0030 0010 0010 0010 0010 0010 0030 " // 100 - "0010 0030 0010 0aa6"; // 104 - -//------------------------------------------------------------------------------ -// This is the longest code we can support -#define CODEMAX 200 - -//------------------------------------------------------------------------------ -// This is the data we pull out of the pronto code -typedef - struct { - int freq; // Carrier frequency (in Hz) - int usec; // uSec per tick (based on freq) - - int codeLen; // Length of code - uint16_t code[CODEMAX]; // Code in hex - - int onceLen; // Length of "once" transmit - uint16_t* once; // Pointer to start within 'code' - - int rptLen; // Length of "repeat" transmit - uint16_t* rpt; // Pointer to start within 'code' - } -pronto_t; - -//------------------------------------------------------------------------------ -// From what I have seen, the only time we go over 8-bits is the 'space' -// on the end which creates the lead-out/inter-code gap. Assuming I'm right, -// we can code this up as a special case and otherwise halve the size of our -// data! -// Ignoring the first four values (the config data) and the last value -// (the lead-out), if you find a protocol that uses values greater than 00fe -// we are going to have to revisit this code! -// -// -// So, the 0th byte will be the carrier frequency in Khz (NOT Hz) -// " 1st " " " " length of the "once" code -// " 2nd " " " " length of the "repeat" code -// -// Thereafter, odd bytes will be Mark lengths as a multiple of USECPERTICK uS -// even " " " Space " " " " " " " -// -// Any occurence of "FF" in either a Mark or a Space will indicate -// "Use the 16-bit FF value" which will also be a multiple of USECPERTICK uS -// -// -// As a point of comparison, the test code (prontoTest[]) is 520 bytes -// (yes, more than 0.5KB of our Arduino's precious 32KB) ... after conversion -// to pronto hex that goes down to ((520/5)*2) = 208 bytes ... once converted to -// our format we are down to ((208/2) -1 -1 +2) = 104 bytes -// -// In fariness this is still very memory-hungry -// ...As a rough guide: -// 10 codes cost 1K of memory (this will vary depending on the protocol). -// -// So if you're building a complex remote control, you will probably need to -// keep the codes on an external memory device (not in the Arduino sketch) and -// load them as you need them. Hmmm. -// -// This dictates that "Oscillated Pronto Codes" are probably NOT the way forward -// -// For example, prontoTest[] happens to be: A 48-bit IR code in Denon format -// So we know it starts with 80/40 (Denon header) -// and ends with 10/aa6 (Denon leadout) -// and all (48) bits in between are either 10/10 (Denon 0) -// or 10/30 (Denon 1) -// So we could easily store this data in 1-byte ("Denon") -// + 1-byte (Length=48) -// + 6-bytes (IR code) -// At 8-bytes per code, we can store 128 codes in 1KB or memory - that's a lot -// better than the 2 (two) we started off with! -// -// And serendipitously, by reducing the amount of data, our program will run -// a LOT faster! -// -// Again, I repeat, even after you have spent time converting the "Oscillated -// Pronto Codes" in to IRremote format, it will be a LOT more memory-hungry -// than using sendDenon() (or whichever) ...BUT these codes are easily -// available on the internet, so we'll support them! -// -typedef - struct { - uint16_t FF; - uint8_t code[CODEMAX]; - } -irCode_t; - -//------------------------------------------------------------------------------ -#define DEBUGF(...) printf(__VA_ARGS__) - -//+============================================================================= -// String must be block of 4 hex digits separated with blanks -// -bool validate (char* cp, int* len) -{ - for (*len = 0; *cp; (*len)++, cp += 4) { - byp(&cp); - if ( !ishex(cp[0]) || !ishex(cp[1]) || - !ishex(cp[2]) || !ishex(cp[3]) || !isblank(cp[4]) ) return false ; - } - - return true; -} - -//+============================================================================= -// Hex-to-Byte : Decode a hex digit -// We assume the character has already been validated -// -uint8_t htob (char ch) -{ - if ((ch >= '0') && (ch <= '9')) return ch - '0' ; - if ((ch >= 'A') && (ch <= 'F')) return ch - 'A' + 10 ; - if ((ch >= 'a') && (ch <= 'f')) return ch - 'a' + 10 ; -} - -//+============================================================================= -// Hex-to-Word : Decode a block of 4 hex digits -// We assume the string has already been validated -// and the pointer being passed points at the start of a block of 4 hex digits -// -uint16_t htow (char* cp) -{ - return ( (htob(cp[0]) << 12) | (htob(cp[1]) << 8) | - (htob(cp[2]) << 4) | (htob(cp[3]) ) ) ; -} - -//+============================================================================= -// Convert the pronto string in to data -// -bool decode (char* s, pronto_t* p, irCode_t* ir) -{ - int i, len; - char* cp; - - // Validate the Pronto string - if (!validate(s, &p->codeLen)) { - DEBUGF("Invalid pronto string\n"); - return false ; - } - DEBUGF("Found %d hex codes\n", p->codeLen); - - // Allocate memory to store the decoded string - //if (!(p->code = malloc(p->len))) { - // DEBUGF("Memory allocation failed\n"); - // return false ; - //} - - // Check in case our code is too long - if (p->codeLen > CODEMAX) { - DEBUGF("Code too long, edit CODEMAX and recompile\n"); - return false ; - } - - // Decode the string - cp = s; - for (i = 0; i < p->codeLen; i++, cp += 4) { - byp(&cp); - p->code[i] = htow(cp); - } - - // Announce our findings - DEBUGF("Input: |%s|\n", s); - DEBUGF("Found: |"); - for (i = 0; i < p->codeLen; i++) DEBUGF("%04x ", p->code[i]) ; - DEBUGF("|\n"); - - DEBUGF("Form [%04X] : ", p->code[0]); - if (p->code[0] == 0x0000) DEBUGF("Oscillated (Learned)\n"); - else if (p->code[0] == 0x0100) DEBUGF("Unmodulated\n"); - else DEBUGF("Unknown\n"); - if (p->code[0] != 0x0000) return false ; // Can only handle Oscillated - - // Calculate the carrier frequency (+/- 10%) & uSecs per pulse - // Pronto uses a crystal which generates a timeabse of 0.241246 - p->freq = (int)(1000000 / (p->code[1] * 0.241246)); - p->usec = (int)(((1.0 / p->freq) * 1000000) + 0.5); - ir->code[0] = p->freq / 1000; - DEBUGF("Freq [%04X] : %d Hz (%d uS/pluse) -> %d KHz\n", - p->code[1], p->freq, p->usec, ir->code[0]); - - // Set the length & start pointer for the "once" code - p->onceLen = p->code[2]; - p->once = &p->code[4]; - ir->code[1] = p->onceLen; - DEBUGF("Once [%04X] : %d\n", p->code[2], p->onceLen); - - // Set the length & start pointer for the "repeat" code - p->rptLen = p->code[3]; - p->rpt = &p->code[4 + p->onceLen]; - ir->code[2] = p->rptLen; - DEBUGF("Rpt [%04X] : %d\n", p->code[3], p->rptLen); - - // Check everything tallies - if (1 + 1 + 1 + 1 + (p->onceLen * 2) + (p->rptLen * 2) != p->codeLen) { - DEBUGF("Bad code length\n"); - return false; - } - - // Convert the IR data to our new format - ir->FF = p->code[p->codeLen - 1]; - - len = (p->onceLen * 2) + (p->rptLen * 2); - DEBUGF("Encoded: |"); - for (i = 0; i < len; i++) { - if (p->code[i+4] == ir->FF) { - ir->code[i+3] = 0xFF; - } else if (p->code[i+4] > 0xFE) { - DEBUGF("\n%04X : Mark/Space overflow\n", p->code[i+4]); - return false; - } else { - ir->code[i+3] = (p->code[i+4] * p->usec) / USECPERTICK; - } - DEBUGF("%s%d", !i ? "" : (i&1 ? "," : ", "), ir->code[i+3]); - } - DEBUGF("|\n"); - - ir->FF = (ir->FF * p->usec) / USECPERTICK; - DEBUGF("FF -> %d\n", ir->FF); - - return true; -} - -//+============================================================================= -// -void irDump (irCode_t* ir) -{ - int i, len; - - printf("uint8_t buttonName[%d] = {", len); - - printf("%d,%d, ", (ir->FF >> 8), ir->FF & 0xFF); - printf("%d,%d,%d, ", ir->code[0], ir->code[1], ir->code[2]); - - len = (ir->code[1] * 2) + (ir->code[2] * 2); - for (i = 0; i < len; i++) { - printf("%s%d", !i ? "" : (i&1 ? "," : ", "), ir->code[i+3]); - } - - printf("};\n"); - -} - -//+============================================================================= -// -int main ( ) -{ - pronto_t pCode; - irCode_t irCode; - - decode(prontoTest, &pCode, &irCode); - - irDump(&irCode); - - return 0; -} - -#endif //0 From 542516f116d5ce61c9153e44553b77bf7599eec1 Mon Sep 17 00:00:00 2001 From: Rafi Khan Date: Sun, 13 Aug 2017 12:03:54 -0600 Subject: [PATCH 09/29] Revert "Removed pronto "protocol"" This reverts commit 563c82c6c4fbce090590fd0c30f7c8301a4b2652. --- examples/IRremoteInfo/IRremoteInfo.ino | 1 + src/IRremote.h | 23 ++ src/irPronto.cpp | 513 +++++++++++++++++++++++++ 3 files changed, 537 insertions(+) create mode 100644 src/irPronto.cpp diff --git a/examples/IRremoteInfo/IRremoteInfo.ino b/examples/IRremoteInfo/IRremoteInfo.ino index 45cf7236e..c3f329754 100644 --- a/examples/IRremoteInfo/IRremoteInfo.ino +++ b/examples/IRremoteInfo/IRremoteInfo.ino @@ -188,6 +188,7 @@ void dumpProtocols() { Serial.print(F("DISH: ")); printSendEnabled(SEND_DISH); printDecodeEnabled(DECODE_DISH); Serial.print(F("SHARP: ")); printSendEnabled(SEND_SHARP); printDecodeEnabled(DECODE_SHARP); Serial.print(F("DENON: ")); printSendEnabled(SEND_DENON); printDecodeEnabled(DECODE_DENON); + Serial.print(F("PRONTO: ")); printSendEnabled(SEND_PRONTO); Serial.println(F("(Not Applicable)")); } void printSendEnabled(int flag) { diff --git a/src/IRremote.h b/src/IRremote.h index 6038a92ed..40f28dc2f 100644 --- a/src/IRremote.h +++ b/src/IRremote.h @@ -73,9 +73,27 @@ #define DECODE_DENON 1 #define SEND_DENON 1 +#define DECODE_PRONTO 0 // This function doe not logically make sense +#define SEND_PRONTO 1 + #define DECODE_LEGO_PF 0 // NOT WRITTEN #define SEND_LEGO_PF 1 +//------------------------------------------------------------------------------ +// When sending a Pronto code we request to send either the "once" code +// or the "repeat" code +// If the code requested does not exist we can request to fallback on the +// other code (the one we did not explicitly request) +// +// I would suggest that "fallback" will be the standard calling method +// The last paragraph on this page discusses the rationale of this idea: +// http://www.remotecentral.com/features/irdisp2.htm +// +#define PRONTO_ONCE false +#define PRONTO_REPEAT true +#define PRONTO_FALLBACK true +#define PRONTO_NOFALLBACK false + //------------------------------------------------------------------------------ // An enumerated list of all supported formats // You do NOT need to remove entries from this list when disabling protocols! @@ -99,6 +117,7 @@ typedef DISH, SHARP, DENON, + PRONTO, LEGO_PF, } decode_type_t; @@ -321,6 +340,10 @@ class IRsend //...................................................................... # if SEND_DENON void sendDenon (unsigned long data, int nbits) ; +# endif + //...................................................................... +# if SEND_PRONTO + void sendPronto (char* code, bool repeat, bool fallback) ; # endif //...................................................................... # if SEND_LEGO_PF diff --git a/src/irPronto.cpp b/src/irPronto.cpp new file mode 100644 index 000000000..0f530a900 --- /dev/null +++ b/src/irPronto.cpp @@ -0,0 +1,513 @@ +#define TEST 0 + +#if TEST +# define SEND_PRONTO 1 +# define PRONTO_ONCE false +# define PRONTO_REPEAT true +# define PRONTO_FALLBACK true +# define PRONTO_NOFALLBACK false +#endif + +#if SEND_PRONTO + +//****************************************************************************** +#if TEST +# include + void enableIROut (int freq) { printf("\nFreq = %d KHz\n", freq); } + void mark (int t) { printf("+%d," , t); } + void space (int t) { printf("-%d, ", t); } +#else +# include "IRremote.h" +#endif // TEST + +//+============================================================================= +// Check for a valid hex digit +// +bool ishex (char ch) +{ + return ( ((ch >= '0') && (ch <= '9')) || + ((ch >= 'A') && (ch <= 'F')) || + ((ch >= 'a') && (ch <= 'f')) ) ? true : false ; +} + +//+============================================================================= +// Check for a valid "blank" ... '\0' is a valid "blank" +// +bool isblank (char ch) +{ + return ((ch == ' ') || (ch == '\t') || (ch == '\0')) ? true : false ; +} + +//+============================================================================= +// Bypass spaces +// +bool byp (char** pcp) +{ + while (isblank(**pcp)) (*pcp)++ ; +} + +//+============================================================================= +// Hex-to-Byte : Decode a hex digit +// We assume the character has already been validated +// +uint8_t htob (char ch) +{ + if ((ch >= '0') && (ch <= '9')) return ch - '0' ; + if ((ch >= 'A') && (ch <= 'F')) return ch - 'A' + 10 ; + if ((ch >= 'a') && (ch <= 'f')) return ch - 'a' + 10 ; +} + +//+============================================================================= +// Hex-to-Word : Decode a block of 4 hex digits +// We assume the string has already been validated +// and the pointer being passed points at the start of a block of 4 hex digits +// +uint16_t htow (char* cp) +{ + return ( (htob(cp[0]) << 12) | (htob(cp[1]) << 8) | + (htob(cp[2]) << 4) | (htob(cp[3]) ) ) ; +} + +//+============================================================================= +// +bool sendPronto (char* s, bool repeat, bool fallback) +{ + int i; + int len; + int skip; + char* cp; + uint16_t freq; // Frequency in KHz + uint8_t usec; // pronto uSec/tick + uint8_t once; + uint8_t rpt; + + // Validate the string + for (cp = s; *cp; cp += 4) { + byp(&cp); + if ( !ishex(cp[0]) || !ishex(cp[1]) || + !ishex(cp[2]) || !ishex(cp[3]) || !isblank(cp[4]) ) return false ; + } + + // We will use cp to traverse the string + cp = s; + + // Check mode = Oscillated/Learned + byp(&cp); + if (htow(cp) != 0000) return false; + cp += 4; + + // Extract & set frequency + byp(&cp); + freq = (int)(1000000 / (htow(cp) * 0.241246)); // Rounding errors will occur, tolerance is +/- 10% + usec = (int)(((1.0 / freq) * 1000000) + 0.5); // Another rounding error, thank Cod for analogue electronics + freq /= 1000; // This will introduce a(nother) rounding error which we do not want in the usec calcualtion + cp += 4; + + // Get length of "once" code + byp(&cp); + once = htow(cp); + cp += 4; + + // Get length of "repeat" code + byp(&cp); + rpt = htow(cp); + cp += 4; + + // Which code are we sending? + if (fallback) { // fallback on the "other" code if "this" code is not present + if (!repeat) { // requested 'once' + if (once) len = once * 2, skip = 0 ; // if once exists send it + else len = rpt * 2, skip = 0 ; // else send repeat code + } else { // requested 'repeat' + if (rpt) len = rpt * 2, skip = 0 ; // if rpt exists send it + else len = once * 2, skip = 0 ; // else send once code + } + } else { // Send what we asked for, do not fallback if the code is empty! + if (!repeat) len = once * 2, skip = 0 ; // 'once' starts at 0 + else len = rpt * 2, skip = once ; // 'repeat' starts where 'once' ends + } + + // Skip to start of code + for (i = 0; i < skip; i++, cp += 4) byp(&cp) ; + + // Send code + enableIROut(freq); + for (i = 0; i < len; i++) { + byp(&cp); + if (i & 1) space(htow(cp) * usec); + else mark (htow(cp) * usec); + cp += 4; + } +} + +//+============================================================================= +#if TEST + +int main ( ) +{ + char prontoTest[] = + "0000 0070 0000 0032 0080 0040 0010 0010 0010 0030 " // 10 + "0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 " // 20 + "0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 " // 30 + "0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 " // 40 + "0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 " // 50 + "0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 " // 60 + "0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 " // 70 + "0010 0010 0010 0030 0010 0010 0010 0030 0010 0010 " // 80 + "0010 0010 0010 0030 0010 0010 0010 0010 0010 0030 " // 90 + "0010 0010 0010 0030 0010 0010 0010 0010 0010 0030 " // 100 + "0010 0030 0010 0aa6"; // 104 + + sendPronto(prontoTest, PRONTO_ONCE, PRONTO_FALLBACK); // once code + sendPronto(prontoTest, PRONTO_REPEAT, PRONTO_FALLBACK); // repeat code + sendPronto(prontoTest, PRONTO_ONCE, PRONTO_NOFALLBACK); // once code + sendPronto(prontoTest, PRONTO_REPEAT, PRONTO_NOFALLBACK); // repeat code + + return 0; +} + +#endif // TEST + +#endif // SEND_PRONTO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#if 0 +//****************************************************************************** +// Sources: +// http://www.remotecentral.com/features/irdisp2.htm +// http://www.hifi-remote.com/wiki/index.php?title=Working_With_Pronto_Hex +//****************************************************************************** + +#include +#include + +#define IRPRONTO +#include "IRremoteInt.h" // The Arduino IRremote library defines USECPERTICK + +//------------------------------------------------------------------------------ +// Source: https://www.google.co.uk/search?q=DENON+MASTER+IR+Hex+Command+Sheet +// -> http://assets.denon.com/documentmaster/us/denon%20master%20ir%20hex.xls +// +char prontoTest[] = + "0000 0070 0000 0032 0080 0040 0010 0010 0010 0030 " // 10 + "0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 " // 20 + "0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 " // 30 + "0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 " // 40 + "0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 " // 50 + "0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 " // 60 + "0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 " // 70 + "0010 0010 0010 0030 0010 0010 0010 0030 0010 0010 " // 80 + "0010 0010 0010 0030 0010 0010 0010 0010 0010 0030 " // 90 + "0010 0010 0010 0030 0010 0010 0010 0010 0010 0030 " // 100 + "0010 0030 0010 0aa6"; // 104 + +//------------------------------------------------------------------------------ +// This is the longest code we can support +#define CODEMAX 200 + +//------------------------------------------------------------------------------ +// This is the data we pull out of the pronto code +typedef + struct { + int freq; // Carrier frequency (in Hz) + int usec; // uSec per tick (based on freq) + + int codeLen; // Length of code + uint16_t code[CODEMAX]; // Code in hex + + int onceLen; // Length of "once" transmit + uint16_t* once; // Pointer to start within 'code' + + int rptLen; // Length of "repeat" transmit + uint16_t* rpt; // Pointer to start within 'code' + } +pronto_t; + +//------------------------------------------------------------------------------ +// From what I have seen, the only time we go over 8-bits is the 'space' +// on the end which creates the lead-out/inter-code gap. Assuming I'm right, +// we can code this up as a special case and otherwise halve the size of our +// data! +// Ignoring the first four values (the config data) and the last value +// (the lead-out), if you find a protocol that uses values greater than 00fe +// we are going to have to revisit this code! +// +// +// So, the 0th byte will be the carrier frequency in Khz (NOT Hz) +// " 1st " " " " length of the "once" code +// " 2nd " " " " length of the "repeat" code +// +// Thereafter, odd bytes will be Mark lengths as a multiple of USECPERTICK uS +// even " " " Space " " " " " " " +// +// Any occurence of "FF" in either a Mark or a Space will indicate +// "Use the 16-bit FF value" which will also be a multiple of USECPERTICK uS +// +// +// As a point of comparison, the test code (prontoTest[]) is 520 bytes +// (yes, more than 0.5KB of our Arduino's precious 32KB) ... after conversion +// to pronto hex that goes down to ((520/5)*2) = 208 bytes ... once converted to +// our format we are down to ((208/2) -1 -1 +2) = 104 bytes +// +// In fariness this is still very memory-hungry +// ...As a rough guide: +// 10 codes cost 1K of memory (this will vary depending on the protocol). +// +// So if you're building a complex remote control, you will probably need to +// keep the codes on an external memory device (not in the Arduino sketch) and +// load them as you need them. Hmmm. +// +// This dictates that "Oscillated Pronto Codes" are probably NOT the way forward +// +// For example, prontoTest[] happens to be: A 48-bit IR code in Denon format +// So we know it starts with 80/40 (Denon header) +// and ends with 10/aa6 (Denon leadout) +// and all (48) bits in between are either 10/10 (Denon 0) +// or 10/30 (Denon 1) +// So we could easily store this data in 1-byte ("Denon") +// + 1-byte (Length=48) +// + 6-bytes (IR code) +// At 8-bytes per code, we can store 128 codes in 1KB or memory - that's a lot +// better than the 2 (two) we started off with! +// +// And serendipitously, by reducing the amount of data, our program will run +// a LOT faster! +// +// Again, I repeat, even after you have spent time converting the "Oscillated +// Pronto Codes" in to IRremote format, it will be a LOT more memory-hungry +// than using sendDenon() (or whichever) ...BUT these codes are easily +// available on the internet, so we'll support them! +// +typedef + struct { + uint16_t FF; + uint8_t code[CODEMAX]; + } +irCode_t; + +//------------------------------------------------------------------------------ +#define DEBUGF(...) printf(__VA_ARGS__) + +//+============================================================================= +// String must be block of 4 hex digits separated with blanks +// +bool validate (char* cp, int* len) +{ + for (*len = 0; *cp; (*len)++, cp += 4) { + byp(&cp); + if ( !ishex(cp[0]) || !ishex(cp[1]) || + !ishex(cp[2]) || !ishex(cp[3]) || !isblank(cp[4]) ) return false ; + } + + return true; +} + +//+============================================================================= +// Hex-to-Byte : Decode a hex digit +// We assume the character has already been validated +// +uint8_t htob (char ch) +{ + if ((ch >= '0') && (ch <= '9')) return ch - '0' ; + if ((ch >= 'A') && (ch <= 'F')) return ch - 'A' + 10 ; + if ((ch >= 'a') && (ch <= 'f')) return ch - 'a' + 10 ; +} + +//+============================================================================= +// Hex-to-Word : Decode a block of 4 hex digits +// We assume the string has already been validated +// and the pointer being passed points at the start of a block of 4 hex digits +// +uint16_t htow (char* cp) +{ + return ( (htob(cp[0]) << 12) | (htob(cp[1]) << 8) | + (htob(cp[2]) << 4) | (htob(cp[3]) ) ) ; +} + +//+============================================================================= +// Convert the pronto string in to data +// +bool decode (char* s, pronto_t* p, irCode_t* ir) +{ + int i, len; + char* cp; + + // Validate the Pronto string + if (!validate(s, &p->codeLen)) { + DEBUGF("Invalid pronto string\n"); + return false ; + } + DEBUGF("Found %d hex codes\n", p->codeLen); + + // Allocate memory to store the decoded string + //if (!(p->code = malloc(p->len))) { + // DEBUGF("Memory allocation failed\n"); + // return false ; + //} + + // Check in case our code is too long + if (p->codeLen > CODEMAX) { + DEBUGF("Code too long, edit CODEMAX and recompile\n"); + return false ; + } + + // Decode the string + cp = s; + for (i = 0; i < p->codeLen; i++, cp += 4) { + byp(&cp); + p->code[i] = htow(cp); + } + + // Announce our findings + DEBUGF("Input: |%s|\n", s); + DEBUGF("Found: |"); + for (i = 0; i < p->codeLen; i++) DEBUGF("%04x ", p->code[i]) ; + DEBUGF("|\n"); + + DEBUGF("Form [%04X] : ", p->code[0]); + if (p->code[0] == 0x0000) DEBUGF("Oscillated (Learned)\n"); + else if (p->code[0] == 0x0100) DEBUGF("Unmodulated\n"); + else DEBUGF("Unknown\n"); + if (p->code[0] != 0x0000) return false ; // Can only handle Oscillated + + // Calculate the carrier frequency (+/- 10%) & uSecs per pulse + // Pronto uses a crystal which generates a timeabse of 0.241246 + p->freq = (int)(1000000 / (p->code[1] * 0.241246)); + p->usec = (int)(((1.0 / p->freq) * 1000000) + 0.5); + ir->code[0] = p->freq / 1000; + DEBUGF("Freq [%04X] : %d Hz (%d uS/pluse) -> %d KHz\n", + p->code[1], p->freq, p->usec, ir->code[0]); + + // Set the length & start pointer for the "once" code + p->onceLen = p->code[2]; + p->once = &p->code[4]; + ir->code[1] = p->onceLen; + DEBUGF("Once [%04X] : %d\n", p->code[2], p->onceLen); + + // Set the length & start pointer for the "repeat" code + p->rptLen = p->code[3]; + p->rpt = &p->code[4 + p->onceLen]; + ir->code[2] = p->rptLen; + DEBUGF("Rpt [%04X] : %d\n", p->code[3], p->rptLen); + + // Check everything tallies + if (1 + 1 + 1 + 1 + (p->onceLen * 2) + (p->rptLen * 2) != p->codeLen) { + DEBUGF("Bad code length\n"); + return false; + } + + // Convert the IR data to our new format + ir->FF = p->code[p->codeLen - 1]; + + len = (p->onceLen * 2) + (p->rptLen * 2); + DEBUGF("Encoded: |"); + for (i = 0; i < len; i++) { + if (p->code[i+4] == ir->FF) { + ir->code[i+3] = 0xFF; + } else if (p->code[i+4] > 0xFE) { + DEBUGF("\n%04X : Mark/Space overflow\n", p->code[i+4]); + return false; + } else { + ir->code[i+3] = (p->code[i+4] * p->usec) / USECPERTICK; + } + DEBUGF("%s%d", !i ? "" : (i&1 ? "," : ", "), ir->code[i+3]); + } + DEBUGF("|\n"); + + ir->FF = (ir->FF * p->usec) / USECPERTICK; + DEBUGF("FF -> %d\n", ir->FF); + + return true; +} + +//+============================================================================= +// +void irDump (irCode_t* ir) +{ + int i, len; + + printf("uint8_t buttonName[%d] = {", len); + + printf("%d,%d, ", (ir->FF >> 8), ir->FF & 0xFF); + printf("%d,%d,%d, ", ir->code[0], ir->code[1], ir->code[2]); + + len = (ir->code[1] * 2) + (ir->code[2] * 2); + for (i = 0; i < len; i++) { + printf("%s%d", !i ? "" : (i&1 ? "," : ", "), ir->code[i+3]); + } + + printf("};\n"); + +} + +//+============================================================================= +// +int main ( ) +{ + pronto_t pCode; + irCode_t irCode; + + decode(prontoTest, &pCode, &irCode); + + irDump(&irCode); + + return 0; +} + +#endif //0 From 4eb95a32721e340a96c1abc0262fc17ea2ebca0b Mon Sep 17 00:00:00 2001 From: Rafi Khan Date: Mon, 14 Aug 2017 17:12:02 -0600 Subject: [PATCH 10/29] Revert "Removed blinking led" This reverts commit a406f3b9f97864c23cc7fb76f5deb04f5e09c9f8. --- keywords.txt | 1 + src/IRremote.cpp | 11 +++++++++++ src/IRremote.h | 3 ++- src/IRremoteInt.h | 2 ++ src/boarddefs.h | 27 ++++++++++++++++++++++++++- src/irRecv.cpp | 17 ++++++++++++++++- 6 files changed, 58 insertions(+), 3 deletions(-) diff --git a/keywords.txt b/keywords.txt index ea6e0192c..f2b9a4957 100644 --- a/keywords.txt +++ b/keywords.txt @@ -14,6 +14,7 @@ IRsend KEYWORD1 # Methods and Functions (KEYWORD2) ####################################### +blink13 KEYWORD2 decode KEYWORD2 enableIRIn KEYWORD2 resume KEYWORD2 diff --git a/src/IRremote.cpp b/src/IRremote.cpp index c8730d7b3..f41f81878 100644 --- a/src/IRremote.cpp +++ b/src/IRremote.cpp @@ -127,6 +127,7 @@ ISR (TIMER_INTR_NAME) { TIMER_RESET; + // Read if IR Receiver -> SPACE [xmt LED off] or a MARK [xmt LED on] // digitalRead() is very slow. Optimisation is possible, but makes the code unportable uint8_t irdata = (uint8_t)digitalRead(irparams.recvpin); @@ -184,4 +185,14 @@ ISR (TIMER_INTR_NAME) break; } +#ifdef BLINKLED + // If requested, flash LED while receiving IR data + if (irparams.blinkflag) { + if (irdata == MARK) + if (irparams.blinkpin) digitalWrite(irparams.blinkpin, HIGH); // Turn user defined pin LED on + else BLINKLED_ON() ; // if no user defined LED pin, turn default LED pin for the hardware on + else if (irparams.blinkpin) digitalWrite(irparams.blinkpin, LOW); // Turn user defined pin LED on + else BLINKLED_OFF() ; // if no user defined LED pin, turn default LED pin for the hardware on + } +#endif // BLINKLED } diff --git a/src/IRremote.h b/src/IRremote.h index 40f28dc2f..928284361 100644 --- a/src/IRremote.h +++ b/src/IRremote.h @@ -172,8 +172,9 @@ class IRrecv { public: IRrecv (int recvpin) ; - IRrecv (int recvpin); + IRrecv (int recvpin, int blinkpin); + void blink13 (int blinkflag) ; int decode (decode_results *results) ; void enableIRIn ( ) ; bool isIdle ( ) ; diff --git a/src/IRremoteInt.h b/src/IRremoteInt.h index 08f162e51..1baa05d6d 100644 --- a/src/IRremoteInt.h +++ b/src/IRremoteInt.h @@ -41,6 +41,8 @@ typedef // The fields are ordered to reduce memory over caused by struct-padding uint8_t rcvstate; // State Machine state uint8_t recvpin; // Pin connected to IR data from detector + uint8_t blinkpin; + uint8_t blinkflag; // true -> enable blinking of pin on IR processing uint8_t rawlen; // counter of entries in rawbuf unsigned int timer; // State timer, counts 50uS ticks. unsigned int rawbuf[RAWBUF]; // raw data diff --git a/src/boarddefs.h b/src/boarddefs.h index 5751ba700..5c49465ef 100644 --- a/src/boarddefs.h +++ b/src/boarddefs.h @@ -47,10 +47,29 @@ // is not configurable on the current board. //------------------------------------------------------------------------------ -// Soft Carrier fallback for SAM and SAMD architectures +// Defines for blinking the LED // +#if defined(CORE_LED0_PIN) +# define BLINKLED CORE_LED0_PIN +# define BLINKLED_ON() (digitalWrite(CORE_LED0_PIN, HIGH)) +# define BLINKLED_OFF() (digitalWrite(CORE_LED0_PIN, LOW)) + +#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) +# define BLINKLED 13 +# define BLINKLED_ON() (PORTB |= B10000000) +# define BLINKLED_OFF() (PORTB &= B01111111) + +#elif defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644__) +# define BLINKLED 0 +# define BLINKLED_ON() (PORTD |= B00000001) +# define BLINKLED_OFF() (PORTD &= B11111110) + #elif defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_SAMD) +# define BLINKLED LED_BUILTIN +# define BLINKLED_ON() (digitalWrite(LED_BUILTIN, HIGH)) +# define BLINKLED_OFF() (digitalWrite(LED_BUILTIN, LOW)) + # define USE_SOFT_CARRIER // Define to use spin wait instead of delayMicros() //# define USE_SPIN_WAIT @@ -60,6 +79,8 @@ # define SEND_PIN 9 #elif defined(ESP32) + // No system LED on ESP32, disable blinking by NOT defining BLINKLED + // avr/interrupt.h is not present # undef HAS_AVR_INTERRUPT_H @@ -69,6 +90,10 @@ // Supply own enbleIRIn # undef USE_DEFAULT_ENABLE_IR_IN +#else +# define BLINKLED 13 +# define BLINKLED_ON() (PORTB |= B00100000) +# define BLINKLED_OFF() (PORTB &= B11011111) #endif //------------------------------------------------------------------------------ diff --git a/src/irRecv.cpp b/src/irRecv.cpp index 8498e16a4..b549dac1c 100644 --- a/src/irRecv.cpp +++ b/src/irRecv.cpp @@ -99,11 +99,15 @@ int IRrecv::decode (decode_results *results) IRrecv::IRrecv (int recvpin) { irparams.recvpin = recvpin; + irparams.blinkflag = 0; } -IRrecv::IRrecv (int recvpin) +IRrecv::IRrecv (int recvpin, int blinkpin) { irparams.recvpin = recvpin; + irparams.blinkpin = blinkpin; + pinMode(blinkpin, OUTPUT); + irparams.blinkflag = 0; } @@ -138,6 +142,17 @@ void IRrecv::enableIRIn ( ) } #endif // USE_DEFAULT_ENABLE_IR_IN +//+============================================================================= +// Enable/disable blinking of pin 13 on IR processing +// +void IRrecv::blink13 (int blinkflag) +{ +#ifdef BLINKLED + irparams.blinkflag = blinkflag; + if (blinkflag) pinMode(BLINKLED, OUTPUT) ; +#endif +} + //+============================================================================= // Return if receiving new IR signals // From 7245efd2f5eeeb12986236ec806f03912a002fe3 Mon Sep 17 00:00:00 2001 From: Bengt Martensson Date: Fri, 18 Aug 2017 01:32:01 +0200 Subject: [PATCH 11/29] Fix some minor problems in boarddefs.h and IRremote.cpp (#505) * Removed some trailing spaces in IRremote.cpp. * IRremote.cpp: fix some compiler warnings (-Wall -Wextra). Remark: braces necessitated by the macro nature of DBG_PRINTLN. * boarddefs.h: removed spurious #. Nuked trailing spaces. Credits: bengtmartensson --- src/IRremote.cpp | 31 +++++++++++++++++-------------- src/boarddefs.h | 8 ++++---- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/src/IRremote.cpp b/src/IRremote.cpp index f41f81878..f21f41b0e 100644 --- a/src/IRremote.cpp +++ b/src/IRremote.cpp @@ -52,11 +52,12 @@ int MATCH (int measured, int desired) DBG_PRINT(TICKS_HIGH(desired), DEC); bool passed = ((measured >= TICKS_LOW(desired)) && (measured <= TICKS_HIGH(desired))); - if (passed) + if (passed) { DBG_PRINTLN(F("?; passed")); - else - DBG_PRINTLN(F("?; FAILED")); - return passed; + } else { + DBG_PRINTLN(F("?; FAILED")); + } + return passed; } //+======================================================== @@ -68,7 +69,7 @@ int MATCH_MARK (int measured_ticks, int desired_us) DBG_PRINT(measured_ticks * USECPERTICK, DEC); DBG_PRINT(F("us vs ")); DBG_PRINT(desired_us, DEC); - DBG_PRINT("us"); + DBG_PRINT("us"); DBG_PRINT(": "); DBG_PRINT(TICKS_LOW(desired_us + MARK_EXCESS) * USECPERTICK, DEC); DBG_PRINT(F(" <= ")); @@ -78,11 +79,12 @@ int MATCH_MARK (int measured_ticks, int desired_us) bool passed = ((measured_ticks >= TICKS_LOW (desired_us + MARK_EXCESS)) && (measured_ticks <= TICKS_HIGH(desired_us + MARK_EXCESS))); - if (passed) + if (passed) { DBG_PRINTLN(F("?; passed")); - else - DBG_PRINTLN(F("?; FAILED")); - return passed; + } else { + DBG_PRINTLN(F("?; FAILED")); + } + return passed; } //+======================================================== @@ -94,7 +96,7 @@ int MATCH_SPACE (int measured_ticks, int desired_us) DBG_PRINT(measured_ticks * USECPERTICK, DEC); DBG_PRINT(F("us vs ")); DBG_PRINT(desired_us, DEC); - DBG_PRINT("us"); + DBG_PRINT("us"); DBG_PRINT(": "); DBG_PRINT(TICKS_LOW(desired_us - MARK_EXCESS) * USECPERTICK, DEC); DBG_PRINT(F(" <= ")); @@ -104,11 +106,12 @@ int MATCH_SPACE (int measured_ticks, int desired_us) bool passed = ((measured_ticks >= TICKS_LOW (desired_us - MARK_EXCESS)) && (measured_ticks <= TICKS_HIGH(desired_us - MARK_EXCESS))); - if (passed) + if (passed) { DBG_PRINTLN(F("?; passed")); - else - DBG_PRINTLN(F("?; FAILED")); - return passed; + } else { + DBG_PRINTLN(F("?; FAILED")); + } + return passed; } //+============================================================================= diff --git a/src/boarddefs.h b/src/boarddefs.h index 5c49465ef..f70ac4596 100644 --- a/src/boarddefs.h +++ b/src/boarddefs.h @@ -85,7 +85,7 @@ # undef HAS_AVR_INTERRUPT_H // Sending not implemented -# undef SENDING_SUPPORTED# +# undef SENDING_SUPPORTED // Supply own enbleIRIn # undef USE_DEFAULT_ENABLE_IR_IN @@ -161,7 +161,7 @@ || defined(__AVR_ATmega164P__) //#define IR_USE_TIMER1 // tx = pin 13 #define IR_USE_TIMER2 // tx = pin 14 - + //MegaCore - ATmega64, ATmega128 #elif defined(__AVR_ATmega64__) || defined(__AVR_ATmega128__) #define IR_USE_TIMER1 // tx = pin 13 @@ -624,7 +624,7 @@ #define TIMER_RESET #define TIMER_ENABLE_PWM // Not presently used #define TIMER_DISABLE_PWM -#define TIMER_ENABLE_INTR NVIC_EnableIRQ(TC3_IRQn) // Not presently used +#define TIMER_ENABLE_INTR NVIC_EnableIRQ(TC3_IRQn) // Not presently used #define TIMER_DISABLE_INTR NVIC_DisableIRQ(TC3_IRQn) #define TIMER_INTR_NAME TC3_Handler // Not presently used #define TIMER_CONFIG_KHZ(f) @@ -645,7 +645,7 @@ #ifndef SENDPIN_ON #define SENDPIN_ON(pin) digitalWrite(pin, HIGH) #endif - + #ifndef SENDPIN_OFF #define SENDPIN_OFF(pin) digitalWrite(pin, LOW) #endif From 24dd940107c978102fe2a04a7baf49949bde1e73 Mon Sep 17 00:00:00 2001 From: Bengt Martensson Date: Sun, 20 Aug 2017 23:49:57 +0200 Subject: [PATCH 12/29] 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 4845a4a4d..b30256386 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 e43d06c2e..1afafe5b6 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 f21f41b0e..0d63b7774 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 928284361..e95e068c7 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 ef4d79476..9710098c2 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 b549dac1c..f3e12aae1 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 a01b5a012..0561408b6 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 50ec58d8c..78cd48aa0 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 c54e28654..848af79db 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 fa8e06516..e2f5c15d8 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 eeec20fe9..2a418cb66 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 ba532cb60..476196a6d 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 37d507ceb..9f9c515f6 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 7f83e530f..751ed82ef 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 3b4932100..284eab8af 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 dc0dd7317..13288d2c1 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 10e79278e..402ded73d 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 224487dbc..b605b000b 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 c775d6118..754444d87 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 73462c5bc..da0af1a35 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 31e67cf78..b3e15ef47 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 eee2b0bb2..2b895e144 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 a830562c6..5ec373de4 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 06575891c..4cb1b9f13 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) From 5bbd55c65015a387063fd3877c58ee4affedd20e Mon Sep 17 00:00:00 2001 From: Rafi Khan Date: Tue, 22 Aug 2017 15:47:20 -0600 Subject: [PATCH 13/29] Fix #510 --- library.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/library.properties b/library.properties index 0e23d4cf2..56f8a78f4 100644 --- a/library.properties +++ b/library.properties @@ -3,6 +3,7 @@ version=2.4.0 author=shirriff, z3t0 maintainer=z3t0 sentence=Send and receive infrared signals with multiple protocols +paragraph=Find more information at https://github.com/z3t0/Arduino-IRremote category=Communication url=https://github.com/z3t0/Arduino-IRremote architectures=* From e206e122e5afbf2a495671dbb8fba5cf67ef849a Mon Sep 17 00:00:00 2001 From: Bengt Martensson Date: Wed, 23 Aug 2017 21:57:05 +0200 Subject: [PATCH 14/29] Doxygen API documentation in the sense of #461 (#512) * new file: Doxyfile; #461. * Doxygen related documentation to two files. (Not complete.) #461. --- Doxyfile | 2417 +++++++++++++++++++++++++++++++++++++ src/IRremote.h | 105 +- src/private/IRremoteInt.h | 35 +- 3 files changed, 2516 insertions(+), 41 deletions(-) create mode 100644 Doxyfile diff --git a/Doxyfile b/Doxyfile new file mode 100644 index 000000000..a4274ab79 --- /dev/null +++ b/Doxyfile @@ -0,0 +1,2417 @@ +# Doxyfile 1.8.13 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See +# https://www.gnu.org/software/libiconv/ for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "IRremote" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = YES + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 0. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 0 + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO, these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES, upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = YES + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. +# The default value is: NO. + +WARN_AS_ERROR = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING +# Note: If this tag is empty the current directory is searched. + +INPUT = src src/private . + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: https://www.gnu.org/software/libiconv/) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, +# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf. + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = README.md + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see https://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = api-doc + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# https://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: https://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See https://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://doc.qt.io/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://doc.qt.io/qt-4.8/qthelpproject.html#virtual-folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://doc.qt.io/qt-4.8/qthelpproject.html#custom-filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://doc.qt.io/qt-4.8/qthelpproject.html#custom-filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://doc.qt.io/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# https://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from https://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /