source: trunk/Arduino/libraries/Adafruit_Circuit_Playground/utility/IRLibProtocols.cpp @ 4

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

Setup project structure

File size: 1.0 KB
Line 
1/* IRLibProtocols.cpp
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 module enumerates the various supported protocols and defines a program memory
7 * string used by the dump routines or your sketches to display the name of a protocol.
8 * It is used by both Send and Decode sections of the code but not Receive.
9 */
10#include "IRLibProtocols.h"
11
12/*
13 * Returns a pointer to a flash stored string that is the name of the protocol received.
14 */
15const __FlashStringHelper *Pnames(uint8_t type) {
16  if(type>89) return F("Unsup");
17  if(type>LAST_PROTOCOL) type=UNKNOWN;
18  // You can add additional strings before the entry for hash code.
19  const __FlashStringHelper *Names[LAST_PROTOCOL+1]={
20        F("Unknown"),F("NEC"),F("Sony"),F("RC5"),F("RC6"),F("Panasonic Old"),F("JVC"),
21        F("NECx"),F("Samsung36"),F("G.I.Cable"),F("DirecTV"),F("rcmm"),F("CYKM")
22  //,F("Additional_13")//expand or edit these
23  };
24  return Names[type];
25};
26
Note: See TracBrowser for help on using the repository browser.