MCPcopy Create free account
hub / github.com/Arduino-IRremote/Arduino-IRremote / irparams_struct

Class irparams_struct

src/IRremoteInt.h:128–151  ·  view source on GitHub ↗

* This struct contains the data and control used for receiver functions and the ISR (interrupt service routine) * Only StateForISR needs to be volatile. All the other fields are not written by ISR after available() == true and before start() / resume(). */

Source from the content-addressed store, hash-verified

126 * Only StateForISR needs to be volatile. All the other fields are not written by ISR after available() == true and before start() / resume().
127 */
128struct irparams_struct {
129 // The fields are ordered to reduce memory overflow caused by struct-padding
130 volatile uint8_t StateForISR; ///< State Machine state
131 uint_fast8_t IRReceivePin; ///< Pin connected to IR data from detector
132#if defined(__AVR__)
133 volatile uint8_t *IRReceivePinPortInputRegister;
134 uint8_t IRReceivePinMask;
135#endif
136 volatile uint_fast16_t TickCounterForISR; ///< Counts 50uS ticks. The value is copied into the rawbuf array on every transition. Counting is independent of state or resume().
137#if !defined(IR_REMOTE_DISABLE_RECEIVE_COMPLETE_CALLBACK)
138 void (*ReceiveCompleteCallbackFunction)(void); ///< The function to call if a protocol message has arrived, i.e. StateForISR changed to IR_REC_STATE_STOP
139#endif
140#if defined(DECODE_RC5) || defined(DECODE_RC6) || defined(DECODE_MARANTZ)
141 // Static variables for the getBiphaselevel() function
142 uint_fast8_t RawbuffOffsetForNextBiphaseLevel; // Index into raw timing array
143 uint16_t NumberOfTimingIntervalsInCurrentInterval; // 1, 2 or 3. Number of aBiphaseTimeUnit intervals of the current rawbuf[RawbuffOffsetForNextBiphaseLevel] timing.
144 uint_fast8_t AlreadyUsedTimingIntervalsOfCurrentInterval; // Number of already used intervals of sCurrentTimingIntervals.
145 uint16_t BiphaseTimeUnit;
146#endif
147 bool OverflowFlag; ///< Raw buffer OverflowFlag occurred
148 IRRawlenType rawlen; ///< counter of entries in rawbuf
149 uint16_t initialGapTicks; ///< Tick counts of the length of the gap between previous and current IR frame. Pre 4.4: rawbuf[0].
150 IRRawbufType rawbuf[RAW_BUFFER_LENGTH]; ///< raw data / tick counts per mark/space. With 8 bit we can only store up to 12.7 ms. First entry is empty to be backwards compatible.
151};
152
153#if (__INT_WIDTH__ < 32)
154typedef uint32_t IRDecodedRawDataType;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected