Go to the documentation of this file.
88 #define DENON_ADDRESS_BITS 5
89 #define DENON_COMMAND_BITS 8
90 #define DENON_FRAME_BITS 2 // 00/10 for 1. frame Denon/Sharp, inverted for autorepeat frame
92 #define DENON_BITS (DENON_ADDRESS_BITS + DENON_COMMAND_BITS + DENON_FRAME_BITS) // 15 - The number of bits in the command
93 #define DENON_UNIT 260
95 #define DENON_BIT_MARK DENON_UNIT // The length of a Bit:Mark
96 #define DENON_ONE_SPACE (7 * DENON_UNIT) // 1820 // The length of a Bit:Space for 1's
97 #define DENON_ZERO_SPACE (3 * DENON_UNIT) // 780 // The length of a Bit:Space for 0's
99 #define DENON_AUTO_REPEAT_DISTANCE 45000 // Every frame is auto repeated with a space period of 45 ms and the command and frame inverted.
100 #define DENON_REPEAT_PERIOD 110000 // Commands are repeated every 110 ms (measured from start to start) for as long as the key on the remote control is held down.
103 #define DENON_HEADER_MARK DENON_UNIT // The length of the Header:Mark
104 #define DENON_HEADER_SPACE (3 * DENON_UNIT) // 780 // The length of the Header:Space
129 void IRsend::sendDenon(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats, uint8_t aSendSharpFrameMarker) {
136 tCommand |= aSendSharpFrameMarker << 8;
139 uint16_t tInvertedData = (tData ^ 0x7FE0);
142 while (tNumberOfCommands > 0) {
221 DEBUG_PRINT(F(
"Denon: Parity check of inverted with non inverted frame failed. Last command="));
230 tFrameBits = tFrameBits ^ 0x03;
264 #if !(defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) || defined(__AVR_ATtiny87__) || defined(__AVR_ATtiny167__))
266 "The function sendDenon(data, nbits) is deprecated and may not work as expected! Use sendDenonRaw(data, NumberOfRepeats) or better sendDenon(Address, Command, NumberOfRepeats).");
315 #endif // _IR_DENON_HPP
uint16_t address
Decoded address, Distance protocol (tMarkTicksLong (if tMarkTicksLong == 0, then tMarkTicksShort) << ...
#define MICROS_PER_TICK
microseconds per clock interrupt tick
#define DENON_COMMAND_BITS
Results returned from old decoders !!!deprecated!!!
void decodePulseDistanceWidthData(PulseDistanceWidthProtocolConstants *aProtocolConstants, uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset=3)
Decode pulse distance protocols for PulseDistanceWidthProtocolConstants.
#define PROTOCOL_IS_MSB_FIRST
uint16_t numberOfBits
Number of bits received for data (address + command + parity) - to determine protocol length if diffe...
void int_fast8_t aNumberOfRepeats
void decodePulseDistanceWidthData_P(PulseDistanceWidthProtocolConstants const *aProtocolConstantsPGM, uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset=3)
#define MICROS_IN_ONE_MILLI
#define PROTOCOL_IS_PULSE_DISTANCE
void sendSharp2(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats)
void mark(uint16_t aMarkMicros)
Sends an IR mark for the specified number of microseconds.
#define IRDATA_FLAGS_IS_REPEAT
The gap between the preceding frame is as smaller than the maximum gap expected for a repeat....
#define IRDATA_FLAGS_IS_AUTO_REPEAT
The current repeat frame is a repeat, that is always sent after a regular frame and cannot be avoided...
decode_type_t decode_type
#define DENON_HEADER_MARK
bool matchSpace(uint16_t aMeasuredTicks, uint16_t aMatchValueMicros)
Compensate for spaces shortened by demodulator hardware.
#define DENON_REPEAT_PERIOD
#define DENON_HEADER_SPACE
void sendDenon(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats, uint8_t aSendSharpFrameMarker=0)
#define IRDATA_FLAGS_PARITY_FAILED
The current (autorepeat) frame violated parity check.
uint8_t flags
IRDATA_FLAGS_IS_REPEAT, IRDATA_FLAGS_WAS_OVERFLOW etc. See IRDATA_FLAGS_* definitions above.
#define PROTOCOL_IS_LSB_FIRST
void sendSharp(uint8_t aAddress, uint8_t aCommand, int_fast8_t aNumberOfRepeats)
uint16_t command
Decoded command, Distance protocol (tMarkTicksShort << 8) | tSpaceTicksShort.
IRDecodedRawDataType decodedRawData
Up to 32/64 bit decoded raw data, to be used for send<protocol>Raw functions.
void sendPulseDistanceWidthData_P(PulseDistanceWidthProtocolConstants const *aProtocolConstantsPGM, IRDecodedRawDataType aData, uint_fast8_t aNumberOfBits)
bool matchMark(uint16_t aMeasuredTicks, uint16_t aMatchValueMicros)
Compensate for marks exceeded by demodulator hardware.
IRRawbufType rawbuf[RAW_BUFFER_LENGTH]
raw data / tick counts per mark/space. With 8 bit we can only store up to 12.7 ms....
bool decodeDenonOld(decode_results *aResults)
uint16_t lastDecodedCommand
#define DEBUG_PRINTLN(...)
struct PulseDistanceWidthProtocolConstants const DenonProtocolConstants PROGMEM
#define DENON_AUTO_REPEAT_DISTANCE
static void space(uint16_t aSpaceMicros)
Sends an IR space for the specified number of microseconds.
IRRawlenType rawlen
Counter of entries in rawbuf of last received frame.
void sendPulseDistanceWidthData(PulseDistanceWidthProtocolConstants *aProtocolConstants, IRDecodedRawDataType aData, uint_fast8_t aNumberOfBits)
Sends PulseDistance from data contained in parameter using ProtocolConstants structure for timing etc...
#define DENON_ADDRESS_BITS
void sendDenonRaw(uint16_t aRawData, int_fast8_t aNumberOfRepeats=NO_REPEATS) __attribute__((deprecated("Please use sendDenon(aAddress
decode_type_t protocol
UNKNOWN, NEC, SONY, RC5, PULSE_DISTANCE, ...
uint16_t initialGapTicks
Contains the initial gap (pre 4.4: the value in rawbuf[0]) of the last received frame.
void enableIROut(uint_fast8_t aFrequencyKHz)
Enables IR output.