Go to the documentation of this file.
9 #ifndef _IR_BOSEWAVE_HPP
10 #define _IR_BOSEWAVE_HPP
37 #define BOSEWAVE_BITS 16 // Command and inverted command
39 #define BOSEWAVE_HEADER_MARK 1014 // 1014 are 39 clock periods (I counted 3 times!)
40 #define BOSEWAVE_HEADER_SPACE 1468 // 1468(measured), 1456 are 56 clock periods
41 #define BOSEWAVE_BIT_MARK 520 // 520 are 20 clock periods
42 #define BOSEWAVE_ZERO_SPACE 468 // 468 are 18 clock periods
43 #define BOSEWAVE_ONE_SPACE 1468 // 1468(measured), 1456 are 56 clock periods
45 #define BOSEWAVE_REPEAT_PERIOD 75000
46 #define BOSEWAVE_REPEAT_DISTANCE 50000
47 #define BOSEWAVE_MAXIMUM_REPEAT_DISTANCE 62000
83 #if defined(LOCAL_DEBUG)
84 Serial.print(F(
"Bose: "));
85 Serial.println(F(
"Stop bit mark length is wrong"));
93 uint8_t tCommandNotInverted = tDecodedValue & 0xFF;
94 uint8_t tCommandInverted = tDecodedValue >> 8;
96 if ((tCommandNotInverted ^ tCommandInverted) != 0xFF) {
97 #if defined(LOCAL_DEBUG)
98 Serial.print(F(
"Bose: "));
99 Serial.println(F(
"Command and inverted command check failed"));
114 #if defined(LOCAL_DEBUG)
117 #endif // _IR_BOSEWAVE_HPP
#define MICROS_PER_TICK
microseconds per clock interrupt tick
#define BOSEWAVE_HEADER_SPACE
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
bool checkHeader_P(PulseDistanceWidthProtocolConstants const *aProtocolConstantsPGM)
void sendBoseWave(uint8_t aCommand, int_fast8_t aNumberOfRepeats=NO_REPEATS)
#define PROTOCOL_IS_PULSE_DISTANCE
void sendPulseDistanceWidth_P(PulseDistanceWidthProtocolConstants const *aProtocolConstantsPGM, IRRawDataType aData, uint_fast8_t aNumberOfBits, int_fast8_t aNumberOfRepeats)
IRRawDataType decodedRawData
Up to 32/64 bit decoded raw data, to be used for send<protocol>Raw functions.
void checkForRepeatSpaceTicksAndSetFlag(uint16_t aMaximumRepeatSpaceTicks)
#define IR_DEBUG_PRINT(...)
If DEBUG, print the arguments, otherwise do nothing.
struct PulseDistanceWidthProtocolConstants const BoseWaveProtocolConstants PROGMEM
#define BOSEWAVE_MAXIMUM_REPEAT_DISTANCE
#define BOSEWAVE_ZERO_SPACE
#define BOSEWAVE_BIT_MARK
#define PROTOCOL_IS_LSB_FIRST
#define BOSEWAVE_HEADER_MARK
uint16_t command
Decoded command, Distance protocol (tMarkTicksShort << 8) | tSpaceTicksShort.
#define BOSEWAVE_ONE_SPACE
bool matchMark(uint16_t aMeasuredTicks, uint16_t aMatchValueMicros)
Compensate for marks exceeded by demodulator hardware.
#define BOSEWAVE_REPEAT_PERIOD
IRRawbufType rawbuf[RAW_BUFFER_LENGTH]
raw data / tick counts per mark/space. With 8 bit we can only store up to 12.7 ms....
IRRawlenType rawlen
Counter of entries in rawbuf of last received frame.
#define IR_DEBUG_PRINTLN(...)
If DEBUG, print the arguments as a line, otherwise do nothing.
decode_type_t protocol
UNKNOWN, NEC, SONY, RC5, PULSE_DISTANCE, ...