<commit_before>//******************************************************************************
// IRremote
// Version 2.0.1 June, 2015
// Copyright 2009 <NAME>
// For details, see http://arcfn.com/2009/08/multi-protocol-infrared-remote-library.html
//
// Modified by <NAME> <<EMAIL>> to support other boards and timers
//
// Interrupt code based on NECIRrcv by <NAME>
// http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1210243556
// Also influenced by http://zovirl.com/2008/11/12/building-a-universal-remote-with-an-arduino/
//
// JVC and Panasonic protocol added by <NAME> (Thanks to zenwheel and other people at the original blog post)
// Whynter A/C ARC-110WD added by <NAME>
//******************************************************************************

#ifndef IRremoteint_h
#define IRremoteint_h

//------------------------------------------------------------------------------
// Include the Arduino header
//
#include <Arduino.h>

//------------------------------------------------------------------------------
// This handles definition and access to global variables
//
#ifdef IR_GLOBAL
#	define EXTERN
#else
#	define EXTERN extern
#endif

//------------------------------------------------------------------------------
// Information for the Interrupt Service Routine
//
#define RAWBUF  101  ///< Maximum length of raw duration buffer. Must be odd.

/**
  * This struct is used to communicate with the ISR (interrupt service routine).
  */
typedef
	struct {
		// 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
		uint8_t       overflow;        ///< Raw buffer overflow occurred
	}
irparams_t;

// ISR State-Machine : Receiver States
#define STATE_IDLE      2
#define STATE_MARK      3
#define STATE_SPACE     4
#define STATE_STOP      5
#define STATE_OVERFLOW  6

/**
 * Allow all parts of the code access to the ISR data
 * NB. The data can be changed by the ISR at any time, even mid-function
 * Therefore we declare it as "volatile" to stop the compiler/CPU caching it
 */
EXTERN  volatile irparams_t  irparams;

//------------------------------------------------------------------------------
// Defines for setting and clearing register bits
//
#ifndef cbi
#	define cbi(sfr, bit)  (_SFR_BYTE(sfr) &= ~_BV(bit))
#endif

#ifndef sbi
#	define sbi(sfr, bit)  (_SFR_BYTE(sfr) |= _BV(bit))
#endif

//------------------------------------------------------------------------------
// Pulse parms are ((X*50)-100) for the Mark and ((X*50)+100) for the Space.
// First MARK is the one after the long gap<commit_msg>Formatting and closes #646 and closes #642<commit_after>//******************************************************************************
// IRremote
// Version 2.0.1 June, 2015
// Copyright 2009 <NAME>
// For details, see http://arcfn.com/2009/08/multi-protocol-infrared-remote-library.html
//
// Modified by <NAME> <<EMAIL>> to support other boards and timers
//
// Interrupt code based on NECIRrcv by <NAME>
// http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1210243556
// Also influenced by http://zovirl.com/2008/11/12/building-a-universal-remote-with-an-arduino/
//
// JVC and Panasonic protocol added by <NAME> (Thanks to zenwheel and other people at the original blog post)
// Whynter A/C ARC-110WD added by <NAME>
//******************************************************************************

#ifndef IRremoteint_h
#define IRremoteint_h

//------------------------------------------------------------------------------
// Include the Arduino header
//
#include <Arduino.h>

//------------------------------------------------------------------------------
// Information for the Interrupt Service Routine
//
#define RAWBUF  101  ///< Maximum length of raw duration buffer. Must be odd.

/**
 * This struct is used to communicate with the ISR (interrupt service routine).
 */
typedef struct {
    // 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
    uint8_t overflow;        ///< Raw buffer overflow occurred
} irparams_t;

// ISR State-Machine : Receiver States
#define STATE_IDLE      2
#define STATE_MARK      3
#define STATE_SPACE     4
#define STATE_STOP      5
#define STATE_OVERFLOW  6

/**
 * Allow all parts of the code access to the ISR data
 * NB. The data can be changed by the ISR at any time, even mid-function
 * Therefore we declare it as "volatile" to stop the compiler/CPU caching it
 */
#ifdef IR_GLOBAL
volatile irparams_t  irparams;
#else
extern volatile irparams_t irparams;
#endif

//------------------------------------------------------------------------------
// Defines for setting and clearing register bits
//
#ifndef cbi
#	define cbi(sfr, bit)  (_SFR_BYTE(sfr) &= ~_BV(bit))
#endif

#ifndef sbi
#	define sbi(sfr, bit)  (_SFR_BYTE(sfr) |= _BV(bit))
#endif

//------------------------------------------------------------------------------
// Pulse parms are ((X*50)-100) for the Mark and ((X*50)+100) for the Space.
// First MARK is the one after the long gap
{'fraction_non_alphanumeric': 0.2647058823529412, 'fraction_numerical': 0.023391812865497075, 'mean_word_length': 2.009834368530021, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7627732', 'n_tokens_mistral': 1711, 'n_tokens_neox': 1556, 'n_words': 567}