source: trunk/Arduino/libraries/Adafruit_Circuit_Playground/utility/IRLib_P99_Additional.h

Last change on this file was 3, checked in by markus, 7 years ago

Setup project structure

File size: 1.7 KB
Line 
1/* IRLib_P99_Additional.h
2 * Part of IRLib Library for Arduino receiving, decoding, and sending
3 * infrared signals. See COPYRIGHT.txt and LICENSE.txt for more information.
4 */
5/*
6 * This is dummy code that you can copy and rename and modify when implementing new protocols.
7 */
8
9#ifndef IRLIB_PROTOCOL_99_H
10#define IRLIB_PROTOCOL_99_H
11#define IR_SEND_PROTOCOL_99             case 99: IRsendAdditional::send(data); break;
12#define IR_DECODE_PROTOCOL_99   if(IRdecodeAdditional::decode()) return true;
13#ifdef IRLIB_HAVE_COMBO
14        #define PV_IR_DECODE_PROTOCOL_99 ,public virtual IRdecodeAdditional
15        #define PV_IR_SEND_PROTOCOL_99   ,public virtual IRsendAdditional
16#else
17        #define PV_IR_DECODE_PROTOCOL_99  public virtual IRdecodeAdditional
18        #define PV_IR_SEND_PROTOCOL_99    public virtual IRsendAdditional
19#endif
20
21#ifdef IRLIBSENDBASE_H
22class IRsendAdditional: public virtual IRsendBase {
23  public:
24    void IRsendAdditional::send(uint32_t data) {
25    //void IRsendAdditional::send(uint32_t data, uint32_t data2)//optional form
26      /*********
27       *  Insert your code here.
28       *********/
29    };
30};
31#endif  //IRLIBSENDBASE_H
32
33#ifdef IRLIBDECODEBASE_H
34class IRdecodeAdditional: public virtual IRdecodeBase {
35  public:
36    bool IRdecodeAdditional::decode(void) {
37      IRLIB_ATTEMPT_MESSAGE(F("Additional"));
38      /*********
39       *  Insert your code here. Return false if it fails.
40       *  Don't forget to include the following lines or
41       *  equivalent somewhere in the code.
42       * 
43       *  bits = 32;    //Substitute proper value here
44       *  value = data; //return data in "value"
45       *  protocolNum = ADDITIONAL;     //set the protocol number here.
46       */
47      return true;
48    }
49};
50
51#endif //IRLIBDECODEBASE_H
52
53#define IRLIB_HAVE_COMBO
54
55#endif //IRLIB_PROTOCOL_99_H
Note: See TracBrowser for help on using the repository browser.