Download libraries/Adafruit_Circuit_Playground/utility/IRLibHardware.h from Beifengdo/Arduino-Development: direct link, hf CLI and curl.
- Browser
- Download file 15.3 kB
-
https://huggingface.co/datasets/Beifengdo/Arduino-Development/resolve/main/libraries/Adafruit_Circuit_Playground/utility/IRLibHardware.h
- Command line
-
hf download hf://datasets/Beifengdo/Arduino-Development/libraries/Adafruit_Circuit_Playground/utility/IRLibHardware.h
-
curl -L -o IRLibHardware.h https://huggingface.co/datasets/Beifengdo/Arduino-Development/resolve/main/libraries/Adafruit_Circuit_Playground/utility/IRLibHardware.h
15.3 kB
| /* IRLibHardware.h | |
| * Part of IRLib Library for Arduino receiving, decoding, and sending | |
| * infrared signals. See COPYRIGHT.txt and LICENSE.txt for more information. | |
| * | |
| * This file was formally called IRLibTimer.h but we have renamed it because it more | |
| * accurately reflects the fact that it contains all of the hardware specific defines. | |
| * It contains mostly definitions for 8-bit AVR processors. More advanced processors such as | |
| * SAMD21 definitions will now be defined in a separate processor specific header file. | |
| * NOTE: IRLibHardware.cpp is not related to hardware. See the comments in that file | |
| * to explain why it was created and what purpose it serves. | |
| */ | |
| /* This file has been significantly reconfigured for version 1.5 and greater. It now | |
| * allows you use a different timer for input versus output. This also allows you to | |
| * use no timers whatsoever by using the IRrecvPCI or IRrecvLoop for input and | |
| * bit-bang routines for output. Note the various "Teensy" sections have not been tested. | |
| */ | |
| //This is a default for AVRs. SAMD21 will override it. | |
| // defines for setting and clearing register bits | |
| /* In this section we attempt to detect your hardware type and give you the choice of | |
| * various hardware timers to change the PWM frequency for output. In each hardware | |
| * section below you should un-comment only one of the choices. The defines also | |
| * specify the output pin number. DO NOT change the pin number unless you're using | |
| * non-standard hardware that would require you to do so. If you wish to use the | |
| * bit-bang PWM output, you will specify that AFTER this section as an override. | |
| */ | |
| /* Arduino Mega */ | |
| //#define IR_SEND_TIMER1 11 | |
| //#define IR_SEND_TIMER3 5 | |
| //#define IR_SEND_TIMER4 6 | |
| //#define IR_SEND_TIMER5 46 | |
| /* Teensy 1.0 */ | |
| /* Teensy 2.0 versus Leonardo These boards use the same chip but the | |
| * pinouts are different.*/ | |
| // it's Teensy 2.0 | |
| //#define IR_SEND_TIMER1 14 | |
| //#define IR_SEND_TIMER3 9 | |
| /* it's probably Leonardo */ | |
| //#define IR_SEND_TIMER3 5 | |
| //#define IR_SEND_TIMER4_HS 13 | |
| /* Teensy++ 1.0 & 2.0 */ | |
| //#define IR_SEND_TIMER1 25 | |
| //#define IR_SEND_TIMER3 16 | |
| /* Sanguino */ | |
| //#define IR_SEND_TIMER1 13 | |
| /* Arduino Zero, M0, M0 Pro, Feather M0 etc. */ | |
| // All of the settings can be found in IRLibSAMD21.h | |
| /* Pinoccio Scout */ | |
| /* Arduino Duemilanove, Diecimila, LilyPad, Mini, Fio, etc */ | |
| //#define IR_SEND_TIMER1 9 | |
| /* If you want to use bit-bang PWM output, you should un-comment the line below. | |
| * The definition must include the pin number for bit-bang output. This could be any | |
| * available digital output pin. It need not be a designated PWM pin. | |
| * NOTE: By un-commenting this line, you are forcing the library to ignore | |
| * hardware detection and timer specifications above. The bit-bang frequency | |
| * code is not as accurate as using a hardware timer but it is more flexible and | |
| * less hardware platform dependent. | |
| */ | |
| //#define IR_SEND_BIT_BANG 3 //Be sure to set this pin number if you un-comment | |
| /* This is a fudge factor that adjusts bit-bang timing. Feel free to experiment | |
| * for best results.*/ | |
| /* We are going to presume that you want to use the same hardware timer to control | |
| * the 50 microsecond interrupt used by the IRrecv receiver class as was specified | |
| * above in the hardware detection section for sending. Even if you specified bit-bang | |
| * for sending, the definitions above have selected a default sending timer for you based | |
| * on hardware detection. If that is correct, then do nothing below. However if you do | |
| * wish to specify an IR_RECV_TIMER different than the IR_SEND_TIMER selected by the code | |
| * above, then you should un-comment the IR_RECV_TIMER_OVERRIDE and also un-comment one | |
| * and only one of the following IR_RECV_TIMERx lines below that. | |
| * NOTE: You are responsible for ensuring that the timer you are specifying is | |
| * available on your hardware. You should only choose timers which are shown as available | |
| * for your hardware platform as shown in the defines in the IR_SEND_TIMER section above. | |
| * NOTE: This discussion does not apply to SAMD 21 processors. | |
| */ | |
| //#define IR_RECV_TIMER_OVERRIDE | |
| //#define IR_RECV_TIMER1 | |
| //#define IR_RECV_TIMER2 | |
| //#define IR_RECV_TIMER3 | |
| //#define IR_RECV_TIMER4 | |
| //#define IR_RECV_TIMER4_HS | |
| //#define IR_RECV_TIMER5 | |
| // Miscellaneous defines needed for computations below | |
| /* Everything below this point is a computation based on user settings above. | |
| * In all likelihood you would never need to modify anything below this point | |
| * unless you are adding some completely new feature or seriously modifying | |
| * the behavior of existing features. In other words don't try this at home. | |
| */ | |
| /* All of these definitions have been moved to IRLibSAMD21.h | |
| #define IR_SEND_PWM_START | |
| #define IR_SEND_MARK_TIME(time) | |
| #define IR_SEND_PWM_STOP | |
| #define IR_SEND_PWM_PIN | |
| #define IR_SEND_CONFIG_KHZ(val) | |
| */ | |
| /* This section sets up the 50 microsecond interval timer used by the | |
| * IRrecv receiver class. The various timers have already been selected | |
| * earlier in this file. Theoretically you could change the 50 but it has not been tested. | |
| */ | |
| /* All of these definitions have been moved to IRLibSAMD21.h | |
| #define IR_RECV_ENABLE_INTR | |
| #define IR_RECV_DISABLE_INTR | |
| #define IR_RECV_INTR_NAME | |
| #define IR_RECV_CONFIG_TICKS() | |
| */ | |
| //Cannot use blinking LED on 13 if that's the output pin. | |
| // defines for blinking the LED | |
| extern uint8_t IRLib_didIROut;//See the explanation in IRLibHardware.cpp | |