First release of porting 'Infrared Multiprotocol' library from mikrocontroller.net

Dependents:   IRMP_Receiver

IRMP - Infrared Multiprotocol Decoder

This library is a mbed version of the famous IRMP code, developed by members of the german forum http://mikrocontroller.net. It can receive and analyze a large number of infrared remote codes. In the original version there is also code for an IR transmitter, this will be added to this lib soon.

Base for this initial release is version 2.9.7 from 2015/11. A detailed description for this lib can be found here : https://www.mikrocontroller.net/articles/IRMP_-_english.

The code was originally written for AVR mikrocontrollers and has been ported to different platforms already. It works also great with the mbed target as it can use the unique I/O and ticker code.

Actually, the code uses the static C functions and is not ported to C++ yet to maintain compatibility to the original library. This requres the DigitalIn Pinname setting in the irmpconfig.h.

The required hardware is e.g. just an TSOP31238 (for 38 kHz modulated IR) or similar.

Information

How to use

  • import this library
  • edit irmpconfig.h and turn on the desired protocols
  • change F_INTERRUPTS if necessary, check the protocol table for the minimum necessary frequency
  • search for 'IRMP_PIN' in the irmpconfig and replace with your hardware input

The irmp_ISR() must be called cyclic with a fixed frequency, a simple task for the mbed ticker. In the main program the result is checked by calling irmp_get_data(). This function returns the decoded protocol, address, command and flags like key pressed or released.

Information

Tested platforms

  • simple LPC1347 board, works fine
  • EA LPC4088 QuickStart Board works fine
  • LPCXpresso1549 bad, there is a (known?) issue with slow Ticker ISR processing, ISR consumes >30µs instead of 3 µs
  • STM32F103 board: bad, also known problems with Ticker implementation
  • Test results with other boards are welcome.

Sample code

prints the information about decoded signals to stdout. The ISR contains additional code for performance mesuring which can be omitted in controlling applications.

Import programIRMP_Receiver

Sample code for IRMP library

Sample for decoding and performance test

#include "mbed.h"
#include "irmp.h"

#define LED_ON  0
#define LED_OFF 1

// LED as test output
DigitalOut led(LED1, LED_OFF);
DigitalOut flash(LED2, LED_OFF);

// cyclic interrupt for IRMP ISR worker
Ticker t;

// only for performance test
Timer   timerPerfTest;
int     timeISRMax = 0;
float   timeISRAvg;
int     timeISRAvgSum = 0;
int     countISRCalls = 0;

// this ISR must be called cyclic
void irmpISR(void)
{
    int t1 = timerPerfTest.read_us();               // read performance timer

    irmp_ISR();                                     // call irmp ISR

    int timeISR = timerPerfTest.read_us() - t1;     // calc time spent in worker ISR
    if (timeISR > timeISRMax)                       // store maximum
        timeISRMax = timeISR;
    timeISRAvgSum += timeISR;                       // sum for avg
    countISRCalls++;
}

int main() {
    printf("IRMP on mbed\n");

    led = LED_OFF;
    timerPerfTest.start();

    // irmp_data holds result of received IR code
    IRMP_DATA irmp_data;

    irmp_init();                                                            // initialize irmp
    t.attach_us(&irmpISR, 1E6 / F_INTERRUPTS);                              // call ISR 15.000 / s

    // infinite loop, interrupts will blink PORTD pins and handle UART communications.
    while (1)
    {
        flash = !flash;     // test output. flashes at 15/2 kHz, you will not see it blinking

        // check for received IR commands
        if (irmp_get_data (&irmp_data))
        {
            // ir signal decoded, do something here...
            // irmp_data.protocol is the protocol, see irmp.h
            // irmp_data.address is the address/manufacturer code of ir sender
            // irmp_data.command is the command code
            // irm_data.flags is press/release information
            // irmp_protocol_names[irmp_data.protocol] is the protocol name (if enabled, see irmpconfig.h)
            // printf("proto %d addr %d cmd %d\n", irmp_data.protocol, irmp_data.address, irmp_data.command );

            // sample decoding, turn LED on / off
            if (irmp_data.protocol == IRMP_RC5_PROTOCOL && irmp_data.address == 5)      // old RC5 VCR Remote. TV uses address 0
            {
                if (irmp_data.flags == 0)       // switch only on button press
                {
                    switch (irmp_data.command)
                    {
                    case 0:     // Key '0'
                        led = LED_OFF;
                        break;
                    case 1:     // Key '1'
                        led = LED_ON;
                        break;
                    case 53:        // Key 'play'
                        printf("bring me a beer!\n");
                        break;
                    case 54:        // Key 'stop'
                        timeISRAvg = (float)timeISRAvgSum / countISRCalls;
                        timeISRAvgSum = 0;
                        countISRCalls = 0;
                        printf("ISR max / avg runtime [microseconds] : %d / %5.2f\n", timeISRMax, timeISRAvg);
                        timeISRMax = 0;
                        break;
                    }
                }
            }

            // log to stdout
            printf("proto %d addr %d cmd %d flags %x name %s\n", irmp_data.protocol, irmp_data.address, irmp_data.command, irmp_data.flags, irmp_protocol_names[irmp_data.protocol] );
        }
    }

}
Committer:
JojoS
Date:
Sat Jan 09 14:15:56 2016 +0000
Revision:
0:a0715ea739cb
First release of 'Infrared Receiver Multi Protocol'  IRMP porting from mikrocontroller.net

Who changed what in which revision?

UserRevisionLine numberNew contents of line
JojoS 0:a0715ea739cb 1 /*---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 2 * irmpconfig.h
JojoS 0:a0715ea739cb 3 *
JojoS 0:a0715ea739cb 4 * DO NOT INCLUDE THIS FILE, WILL BE INCLUDED BY IRMP.H!
JojoS 0:a0715ea739cb 5 *
JojoS 0:a0715ea739cb 6 * Copyright (c) 2009-2015 Frank Meyer - frank(at)fli4l.de
JojoS 0:a0715ea739cb 7 * Extensions for PIC 12F1820 W.Strobl 2014-07-20
JojoS 0:a0715ea739cb 8 *
JojoS 0:a0715ea739cb 9 * $Id: irmpconfig.h,v 1.145 2015/11/18 08:27:50 fm Exp $
JojoS 0:a0715ea739cb 10 *
JojoS 0:a0715ea739cb 11 * This program is free software; you can redistribute it and/or modify
JojoS 0:a0715ea739cb 12 * it under the terms of the GNU General Public License as published by
JojoS 0:a0715ea739cb 13 * the Free Software Foundation; either version 2 of the License, or
JojoS 0:a0715ea739cb 14 * (at your option) any later version.
JojoS 0:a0715ea739cb 15 *---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 16 */
JojoS 0:a0715ea739cb 17
JojoS 0:a0715ea739cb 18 #ifndef _IRMPCONFIG_H_
JojoS 0:a0715ea739cb 19 #define _IRMPCONFIG_H_
JojoS 0:a0715ea739cb 20
JojoS 0:a0715ea739cb 21 #ifndef _IRMP_H_
JojoS 0:a0715ea739cb 22 # error please include only irmp.h, not irmpconfig.h
JojoS 0:a0715ea739cb 23 #endif
JojoS 0:a0715ea739cb 24
JojoS 0:a0715ea739cb 25 /*---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 26 * Change F_INTERRUPTS if you change the number of interrupts per second,
JojoS 0:a0715ea739cb 27 * Normally, F_INTERRUPTS should be in the range from 10000 to 15000, typical is 15000
JojoS 0:a0715ea739cb 28 * A value above 15000 costs additional program space, absolute maximum value is 20000.
JojoS 0:a0715ea739cb 29 * On PIC with XC8/C18 Compiler, use 15151 as the correct value.
JojoS 0:a0715ea739cb 30 *---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 31 */
JojoS 0:a0715ea739cb 32 #ifndef F_INTERRUPTS
JojoS 0:a0715ea739cb 33 # define F_INTERRUPTS 15000 // interrupts per second, min: 10000, max: 20000, typ: 15000
JojoS 0:a0715ea739cb 34 #endif
JojoS 0:a0715ea739cb 35
JojoS 0:a0715ea739cb 36 /*---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 37 * Change settings from 1 to 0 if you want to disable one or more decoders.
JojoS 0:a0715ea739cb 38 * This saves program space.
JojoS 0:a0715ea739cb 39 *
JojoS 0:a0715ea739cb 40 * 1 enable decoder
JojoS 0:a0715ea739cb 41 * 0 disable decoder
JojoS 0:a0715ea739cb 42 *
JojoS 0:a0715ea739cb 43 * The standard decoders are enabled per default.
JojoS 0:a0715ea739cb 44 * Less common protocols are disabled here, you need to enable them manually.
JojoS 0:a0715ea739cb 45 *
JojoS 0:a0715ea739cb 46 * If you want to use FDC or RCCAR simultaneous with RC5 protocol, additional program space is required.
JojoS 0:a0715ea739cb 47 * If you don't need RC5 when using FDC/RCCAR, you should disable RC5.
JojoS 0:a0715ea739cb 48 * You cannot enable both DENON and RUWIDO, only enable one of them.
JojoS 0:a0715ea739cb 49 *---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 50 */
JojoS 0:a0715ea739cb 51
JojoS 0:a0715ea739cb 52 // typical protocols, disable here! Enable Remarks F_INTERRUPTS Program Space
JojoS 0:a0715ea739cb 53 #define IRMP_SUPPORT_SIRCS_PROTOCOL 1 // Sony SIRCS >= 10000 ~150 bytes
JojoS 0:a0715ea739cb 54 #define IRMP_SUPPORT_NEC_PROTOCOL 1 // NEC + APPLE >= 10000 ~300 bytes
JojoS 0:a0715ea739cb 55 #define IRMP_SUPPORT_SAMSUNG_PROTOCOL 1 // Samsung + Samsg32 >= 10000 ~300 bytes
JojoS 0:a0715ea739cb 56 #define IRMP_SUPPORT_KASEIKYO_PROTOCOL 1 // Kaseikyo >= 10000 ~250 bytes
JojoS 0:a0715ea739cb 57
JojoS 0:a0715ea739cb 58 // more protocols, enable here! Enable Remarks F_INTERRUPTS Program Space
JojoS 0:a0715ea739cb 59 #define IRMP_SUPPORT_JVC_PROTOCOL 0 // JVC >= 10000 ~150 bytes
JojoS 0:a0715ea739cb 60 #define IRMP_SUPPORT_NEC16_PROTOCOL 0 // NEC16 >= 10000 ~100 bytes
JojoS 0:a0715ea739cb 61 #define IRMP_SUPPORT_NEC42_PROTOCOL 0 // NEC42 >= 10000 ~300 bytes
JojoS 0:a0715ea739cb 62 #define IRMP_SUPPORT_MATSUSHITA_PROTOCOL 0 // Matsushita >= 10000 ~50 bytes
JojoS 0:a0715ea739cb 63 #define IRMP_SUPPORT_DENON_PROTOCOL 0 // DENON, Sharp >= 10000 ~250 bytes
JojoS 0:a0715ea739cb 64 #define IRMP_SUPPORT_RC5_PROTOCOL 1 // RC5 >= 10000 ~250 bytes
JojoS 0:a0715ea739cb 65 #define IRMP_SUPPORT_RC6_PROTOCOL 1 // RC6 & RC6A >= 10000 ~250 bytes
JojoS 0:a0715ea739cb 66 #define IRMP_SUPPORT_IR60_PROTOCOL 0 // IR60 (SDA2008) >= 10000 ~300 bytes
JojoS 0:a0715ea739cb 67 #define IRMP_SUPPORT_GRUNDIG_PROTOCOL 0 // Grundig >= 10000 ~300 bytes
JojoS 0:a0715ea739cb 68 #define IRMP_SUPPORT_SIEMENS_PROTOCOL 0 // Siemens Gigaset >= 15000 ~550 bytes
JojoS 0:a0715ea739cb 69 #define IRMP_SUPPORT_NOKIA_PROTOCOL 0 // Nokia >= 10000 ~300 bytes
JojoS 0:a0715ea739cb 70
JojoS 0:a0715ea739cb 71 // exotic protocols, enable here! Enable Remarks F_INTERRUPTS Program Space
JojoS 0:a0715ea739cb 72 #define IRMP_SUPPORT_BOSE_PROTOCOL 0 // BOSE >= 10000 ~150 bytes
JojoS 0:a0715ea739cb 73 #define IRMP_SUPPORT_KATHREIN_PROTOCOL 0 // Kathrein >= 10000 ~200 bytes
JojoS 0:a0715ea739cb 74 #define IRMP_SUPPORT_NUBERT_PROTOCOL 0 // NUBERT >= 10000 ~50 bytes
JojoS 0:a0715ea739cb 75 #define IRMP_SUPPORT_FAN_PROTOCOL 0 // FAN (ventilator) >= 10000 ~50 bytes
JojoS 0:a0715ea739cb 76 #define IRMP_SUPPORT_SPEAKER_PROTOCOL 0 // SPEAKER (~NUBERT) >= 10000 ~50 bytes
JojoS 0:a0715ea739cb 77 #define IRMP_SUPPORT_BANG_OLUFSEN_PROTOCOL 0 // Bang & Olufsen >= 10000 ~200 bytes
JojoS 0:a0715ea739cb 78 #define IRMP_SUPPORT_RECS80_PROTOCOL 0 // RECS80 (SAA3004) >= 15000 ~50 bytes
JojoS 0:a0715ea739cb 79 #define IRMP_SUPPORT_RECS80EXT_PROTOCOL 0 // RECS80EXT (SAA3008) >= 15000 ~50 bytes
JojoS 0:a0715ea739cb 80 #define IRMP_SUPPORT_THOMSON_PROTOCOL 0 // Thomson >= 10000 ~250 bytes
JojoS 0:a0715ea739cb 81 #define IRMP_SUPPORT_NIKON_PROTOCOL 0 // NIKON camera >= 10000 ~250 bytes
JojoS 0:a0715ea739cb 82 #define IRMP_SUPPORT_NETBOX_PROTOCOL 0 // Netbox keyboard >= 10000 ~400 bytes (PROTOTYPE!)
JojoS 0:a0715ea739cb 83 #define IRMP_SUPPORT_ORTEK_PROTOCOL 0 // ORTEK (Hama) >= 10000 ~150 bytes
JojoS 0:a0715ea739cb 84 #define IRMP_SUPPORT_TELEFUNKEN_PROTOCOL 0 // Telefunken 1560 >= 10000 ~150 bytes
JojoS 0:a0715ea739cb 85 #define IRMP_SUPPORT_FDC_PROTOCOL 0 // FDC3402 keyboard >= 10000 (better 15000) ~150 bytes (~400 in combination with RC5)
JojoS 0:a0715ea739cb 86 #define IRMP_SUPPORT_RCCAR_PROTOCOL 0 // RC Car >= 10000 (better 15000) ~150 bytes (~500 in combination with RC5)
JojoS 0:a0715ea739cb 87 #define IRMP_SUPPORT_ROOMBA_PROTOCOL 0 // iRobot Roomba >= 10000 ~150 bytes
JojoS 0:a0715ea739cb 88 #define IRMP_SUPPORT_RUWIDO_PROTOCOL 0 // RUWIDO, T-Home >= 15000 ~550 bytes
JojoS 0:a0715ea739cb 89 #define IRMP_SUPPORT_A1TVBOX_PROTOCOL 0 // A1 TV BOX >= 15000 (better 20000) ~300 bytes
JojoS 0:a0715ea739cb 90 #define IRMP_SUPPORT_LEGO_PROTOCOL 0 // LEGO Power RC >= 20000 ~150 bytes
JojoS 0:a0715ea739cb 91 #define IRMP_SUPPORT_RCMM_PROTOCOL 0 // RCMM 12,24, or 32 >= 20000 ~150 bytes
JojoS 0:a0715ea739cb 92 #define IRMP_SUPPORT_LGAIR_PROTOCOL 0 // LG Air Condition >= 10000 ~300 bytes
JojoS 0:a0715ea739cb 93 #define IRMP_SUPPORT_SAMSUNG48_PROTOCOL 0 // Samsung48 >= 10000 ~100 bytes (SAMSUNG must be enabled!)
JojoS 0:a0715ea739cb 94 #define IRMP_SUPPORT_MERLIN_PROTOCOL 0 // Merlin >= 15000 (better 20000) ~300 bytes
JojoS 0:a0715ea739cb 95 #define IRMP_SUPPORT_PENTAX_PROTOCOL 0 // Pentax >= 10000 ~150 bytes
JojoS 0:a0715ea739cb 96 #define IRMP_SUPPORT_S100_PROTOCOL 0 // S100 >= 10000 ~250 bytes
JojoS 0:a0715ea739cb 97 #define IRMP_SUPPORT_ACP24_PROTOCOL 0 // ACP24 >= 10000 ~250 bytes
JojoS 0:a0715ea739cb 98 #define IRMP_SUPPORT_TECHNICS_PROTOCOL 0 // TECHNICS >= 10000 ~250 bytes
JojoS 0:a0715ea739cb 99 #define IRMP_SUPPORT_PANASONIC_PROTOCOL 0 // PANASONIC Beamer >= 10000 ~250 bytes
JojoS 0:a0715ea739cb 100 #define IRMP_SUPPORT_RADIO1_PROTOCOL 0 // RADIO, e.g. TEVION >= 10000 ~250 bytes (experimental)
JojoS 0:a0715ea739cb 101
JojoS 0:a0715ea739cb 102 /*---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 103 * Change hardware pin here for ATMEL ATMega/ATTiny/XMega
JojoS 0:a0715ea739cb 104 *---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 105 */
JojoS 0:a0715ea739cb 106 #if defined (ATMEL_AVR) || defined (__AVR_XMEGA__) // use PB6 as IR input on AVR
JojoS 0:a0715ea739cb 107 # define IRMP_PORT_LETTER B
JojoS 0:a0715ea739cb 108 # define IRMP_BIT_NUMBER 6
JojoS 0:a0715ea739cb 109
JojoS 0:a0715ea739cb 110 /*---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 111 * Change hardware pin here for PIC C18 or XC8 compiler
JojoS 0:a0715ea739cb 112 *---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 113 */
JojoS 0:a0715ea739cb 114 #elif defined (PIC_C18) // use RB4 as IR input on PIC (C18 or XC8 compiler)
JojoS 0:a0715ea739cb 115 # if defined(__12F1840)
JojoS 0:a0715ea739cb 116 # define IRMP_PIN RA5 // on 12F1840 with XC8 compiler
JojoS 0:a0715ea739cb 117 # else
JojoS 0:a0715ea739cb 118 # define IRMP_PIN PORTBbits.RB4 // PIC C18
JojoS 0:a0715ea739cb 119 # endif
JojoS 0:a0715ea739cb 120
JojoS 0:a0715ea739cb 121 /*---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 122 * Change hardware pin here for PIC CCS compiler
JojoS 0:a0715ea739cb 123 *---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 124 */
JojoS 0:a0715ea739cb 125 #elif defined (PIC_CCS)
JojoS 0:a0715ea739cb 126 # define IRMP_PIN PIN_B4 // use PB4 as IR input on PIC (CCS compiler)
JojoS 0:a0715ea739cb 127
JojoS 0:a0715ea739cb 128 /*---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 129 * Change hardware pin here for ARM STM32
JojoS 0:a0715ea739cb 130 *---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 131 */
JojoS 0:a0715ea739cb 132 #elif defined (ARM_STM32) // use C13 as IR input on STM32
JojoS 0:a0715ea739cb 133 # define IRMP_PORT_LETTER C
JojoS 0:a0715ea739cb 134 # define IRMP_BIT_NUMBER 13
JojoS 0:a0715ea739cb 135
JojoS 0:a0715ea739cb 136 /*---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 137 * Change hardware pin here for Stellaris ARM Cortex M4
JojoS 0:a0715ea739cb 138 *---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 139 */
JojoS 0:a0715ea739cb 140 #elif defined (STELLARIS_ARM_CORTEX_M4) // use B4 as IR input on Stellaris LM4F
JojoS 0:a0715ea739cb 141 # define IRMP_PORT_LETTER B
JojoS 0:a0715ea739cb 142 # define IRMP_BIT_NUMBER 4
JojoS 0:a0715ea739cb 143
JojoS 0:a0715ea739cb 144 /*---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 145 * Change hardware pin here for STM8
JojoS 0:a0715ea739cb 146 *---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 147 */
JojoS 0:a0715ea739cb 148 #elif defined (SDCC_STM8) // use PA1 as IR input on STM8
JojoS 0:a0715ea739cb 149 # define IRMP_PORT_LETTER A
JojoS 0:a0715ea739cb 150 # define IRMP_BIT_NUMBER 1
JojoS 0:a0715ea739cb 151
JojoS 0:a0715ea739cb 152 /*---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 153 * Change hardware pin here for ESP8266
JojoS 0:a0715ea739cb 154 *---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 155 */
JojoS 0:a0715ea739cb 156 #elif defined (__xtensa__)
JojoS 0:a0715ea739cb 157 # define IRMP_BIT_NUMBER 12 // use GPIO12 (Pin 7 UEXT) on ESP8266-EVB evaluation board
JojoS 0:a0715ea739cb 158
JojoS 0:a0715ea739cb 159 /*---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 160 * Change hardware pin here for Teensy 3.x with teensyduino gcc compiler
JojoS 0:a0715ea739cb 161 *---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 162 */
JojoS 0:a0715ea739cb 163 #elif defined (TEENSY_ARM_CORTEX_M4)
JojoS 0:a0715ea739cb 164 # define IRMP_PIN 1 // use Digital pin 1 as IR input on Teensy
JojoS 0:a0715ea739cb 165
JojoS 0:a0715ea739cb 166 /*---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 167 * Handling of unknown target system: DON'T CHANGE
JojoS 0:a0715ea739cb 168 *---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 169 */
JojoS 0:a0715ea739cb 170 #elif defined(__MBED__)
JojoS 0:a0715ea739cb 171 # define IRMP_PIN P0_22 // use P1_27 on LPC1347
JojoS 0:a0715ea739cb 172 # define IRMP_PINMODE PullUp // hardware dependet
JojoS 0:a0715ea739cb 173 #elif !defined (UNIX_OR_WINDOWS)
JojoS 0:a0715ea739cb 174 # error target system not defined.
JojoS 0:a0715ea739cb 175 #endif
JojoS 0:a0715ea739cb 176
JojoS 0:a0715ea739cb 177 /*---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 178 * Set IRMP_LOGGING to 1 if want to log data to UART with 9600Bd
JojoS 0:a0715ea739cb 179 *---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 180 */
JojoS 0:a0715ea739cb 181 #ifndef IRMP_LOGGING
JojoS 0:a0715ea739cb 182 # define IRMP_LOGGING 0 // 1: log IR signal (scan), 0: do not. default is 0
JojoS 0:a0715ea739cb 183 #endif
JojoS 0:a0715ea739cb 184
JojoS 0:a0715ea739cb 185 /*---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 186 * Use external logging routines
JojoS 0:a0715ea739cb 187 * If you enable external logging, you have also to enable IRMP_LOGGING above
JojoS 0:a0715ea739cb 188 *---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 189 */
JojoS 0:a0715ea739cb 190 #ifndef IRMP_EXT_LOGGING
JojoS 0:a0715ea739cb 191 # define IRMP_EXT_LOGGING 0 // 1: use external logging, 0: do not. default is 0
JojoS 0:a0715ea739cb 192 #endif
JojoS 0:a0715ea739cb 193
JojoS 0:a0715ea739cb 194 /*---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 195 * Set IRMP_PROTOCOL_NAMES to 1 if want to access protocol names (for logging etc), costs ~300 bytes RAM!
JojoS 0:a0715ea739cb 196 *---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 197 */
JojoS 0:a0715ea739cb 198 #ifndef IRMP_PROTOCOL_NAMES
JojoS 0:a0715ea739cb 199 # define IRMP_PROTOCOL_NAMES 1 // 1: access protocol names, 0: do not. default is 0
JojoS 0:a0715ea739cb 200 #endif
JojoS 0:a0715ea739cb 201
JojoS 0:a0715ea739cb 202 /*---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 203 * Use Callbacks to indicate input signal
JojoS 0:a0715ea739cb 204 *---------------------------------------------------------------------------------------------------------------------------------------------------
JojoS 0:a0715ea739cb 205 */
JojoS 0:a0715ea739cb 206 #ifndef IRMP_USE_CALLBACK
JojoS 0:a0715ea739cb 207 # define IRMP_USE_CALLBACK 0 // 1: use callbacks. 0: do not. default is 0
JojoS 0:a0715ea739cb 208 #endif
JojoS 0:a0715ea739cb 209
JojoS 0:a0715ea739cb 210 #endif // _IRMPCONFIG_H_