@@ -521,21 +521,8 @@ void IRsend::sendRaw_P(const uint8_t aBufferWithTicks[], uint_fast16_t aLengthOf
521521 * For LSB First the LSB of array[0] is sent first then all bits until MSB of array[0]. Next is LSB of array[1] and so on.
522522 * The output always ends with a space
523523 * Stop bit is always sent
524+ * @param aFlags Evaluated flags are PROTOCOL_IS_MSB_FIRST and SUPPRESS_STOP_BIT_FOR_THIS_DATA. Stop bit is otherwise sent for all pulse distance protocols.
524525 */
525- void IRsend::sendPulseDistanceWidthFromArray (uint_fast8_t aFrequencyKHz, uint16_t aHeaderMarkMicros, uint16_t aHeaderSpaceMicros,
526- uint16_t aOneMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros, uint16_t aZeroSpaceMicros,
527- IRRawDataType *aDecodedRawDataArray, uint16_t aNumberOfBits, bool aMSBFirst, bool aSendStopBit,
528- uint16_t aRepeatPeriodMillis, int_fast8_t aNumberOfRepeats) {
529- uint8_t tFlags = 0 ;
530- if (aMSBFirst) {
531- tFlags = PROTOCOL_IS_MSB_FIRST;
532- }
533- (void ) aSendStopBit;
534-
535- sendPulseDistanceWidthFromArray (aFrequencyKHz, aHeaderMarkMicros, aHeaderSpaceMicros, aOneMarkMicros, aOneSpaceMicros,
536- aZeroMarkMicros, aZeroSpaceMicros, aDecodedRawDataArray, aNumberOfBits, tFlags, aRepeatPeriodMillis, aNumberOfRepeats);
537- }
538-
539526void IRsend::sendPulseDistanceWidthFromArray (uint_fast8_t aFrequencyKHz, DistanceWidthTimingInfoStruct *aDistanceWidthTimingInfo,
540527 IRRawDataType *aDecodedRawDataArray, uint16_t aNumberOfBits, uint8_t aFlags, uint16_t aRepeatPeriodMillis,
541528 int_fast8_t aNumberOfRepeats) {
@@ -545,7 +532,6 @@ void IRsend::sendPulseDistanceWidthFromArray(uint_fast8_t aFrequencyKHz, Distanc
545532 aDistanceWidthTimingInfo->ZeroSpaceMicros , aDecodedRawDataArray, aNumberOfBits, aFlags, aRepeatPeriodMillis,
546533 aNumberOfRepeats);
547534}
548-
549535void IRsend::sendPulseDistanceWidthFromArray (uint_fast8_t aFrequencyKHz, uint16_t aHeaderMarkMicros, uint16_t aHeaderSpaceMicros,
550536 uint16_t aOneMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros, uint16_t aZeroSpaceMicros,
551537 IRRawDataType *aDecodedRawDataArray, uint16_t aNumberOfBits, uint8_t aFlags, uint16_t aRepeatPeriodMillis,
@@ -616,6 +602,9 @@ void IRsend::sendPulseDistanceWidthFromArray(uint_fast8_t aFrequencyKHz, uint16_
616602 * For LSB First the LSB of array[0] is sent first then all bits until MSB of array[0]. Next is LSB of array[1] and so on.
617603 * The output always ends with a space
618604 * Stop bit is always sent
605+ * @param aNumberOfBits Number of bits from aDecodedRawDataArray to be actually sent.
606+ * @param aNumberOfRepeats If < 0 and a aProtocolConstants->SpecialSendRepeatFunction() is specified
607+ * then it is called without leading and trailing space.
619608 */
620609void IRsend::sendPulseDistanceWidthFromArray (PulseDistanceWidthProtocolConstants *aProtocolConstants,
621610 IRRawDataType *aDecodedRawDataArray, uint16_t aNumberOfBits, int_fast8_t aNumberOfRepeats) {
@@ -692,7 +681,7 @@ void IRsend::sendPulseDistanceWidthFromArray(PulseDistanceWidthProtocolConstants
692681}
693682
694683/* *
695- * Sends PulseDistance frames and repeats and enables receiver again
684+ * Sends PulseDistance frames and repeats
696685 * @param aProtocolConstants The constants to use for sending this protocol.
697686 * @param aData uint32 or uint64 holding the bits to be sent.
698687 * @param aNumberOfBits Number of bits from aData to be actually sent.
@@ -761,23 +750,11 @@ void IRsend::sendPulseDistanceWidth(PulseDistanceWidthProtocolConstants *aProtoc
761750 * @param aFrequencyKHz, aHeaderMarkMicros, aHeaderSpaceMicros, aOneMarkMicros, aOneSpaceMicros, aZeroMarkMicros, aZeroSpaceMicros, aFlags, aRepeatPeriodMillis Values to use for sending this protocol, also contained in the PulseDistanceWidthProtocolConstants of this protocol.
762751 * @param aData uint32 or uint64 holding the bits to be sent.
763752 * @param aNumberOfBits Number of bits from aData to be actually sent.
753+ * @param aFlags Evaluated flags are PROTOCOL_IS_MSB_FIRST and SUPPRESS_STOP_BIT_FOR_THIS_DATA. Stop bit is otherwise sent for all pulse distance protocols.
764754 * @param aNumberOfRepeats If < 0 and a aProtocolConstants->SpecialSendRepeatFunction() is specified
765755 * then it is called without leading and trailing space.
766756 * @param aSpecialSendRepeatFunction If NULL, the first frame is repeated completely, otherwise this function is used for sending the repeat frame.
767757 */
768- void IRsend::sendPulseDistanceWidth (uint_fast8_t aFrequencyKHz, uint16_t aHeaderMarkMicros, uint16_t aHeaderSpaceMicros,
769- uint16_t aOneMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros, uint16_t aZeroSpaceMicros, IRRawDataType aData,
770- uint_fast8_t aNumberOfBits, bool aMSBFirst, bool aSendStopBit, uint16_t aRepeatPeriodMillis, int_fast8_t aNumberOfRepeats,
771- void (*aSpecialSendRepeatFunction)()) {
772- uint8_t tFlags = 0 ;
773- if (aMSBFirst) {
774- tFlags = PROTOCOL_IS_MSB_FIRST;
775- }
776- (void ) aSendStopBit;
777- sendPulseDistanceWidth (aFrequencyKHz, aHeaderMarkMicros, aHeaderSpaceMicros, aOneMarkMicros, aOneSpaceMicros, aZeroMarkMicros,
778- aZeroSpaceMicros, aData, aNumberOfBits, tFlags, aRepeatPeriodMillis, aNumberOfRepeats, aSpecialSendRepeatFunction);
779-
780- }
781758void IRsend::sendPulseDistanceWidth (uint_fast8_t aFrequencyKHz, uint16_t aHeaderMarkMicros, uint16_t aHeaderSpaceMicros,
782759 uint16_t aOneMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros, uint16_t aZeroSpaceMicros, IRRawDataType aData,
783760 uint_fast8_t aNumberOfBits, uint8_t aFlags, uint16_t aRepeatPeriodMillis, int_fast8_t aNumberOfRepeats,
@@ -825,9 +802,12 @@ void IRsend::sendPulseDistanceWidth(uint_fast8_t aFrequencyKHz, uint16_t aHeader
825802}
826803
827804/* *
828- * Sends PulseDistance data
805+ * Sends PulseDistance from data contained in parameter using ProtocolConstants structure for timing etc.
829806 * The output always ends with a space
830807 * Each additional call costs 16 bytes program memory
808+ * @param aProtocolConstants The constants to use for sending this protocol.
809+ * @param aData uint32 or uint64 holding the bits to be sent.
810+ * @param aNumberOfBits Number of bits from aData to be actually sent.
831811 */
832812void IRsend::sendPulseDistanceWidthData (PulseDistanceWidthProtocolConstants *aProtocolConstants, IRRawDataType aData,
833813 uint_fast8_t aNumberOfBits) {
@@ -838,18 +818,13 @@ void IRsend::sendPulseDistanceWidthData(PulseDistanceWidthProtocolConstants *aPr
838818}
839819
840820/* *
841- * Sends PulseDistance data
821+ * Sends PulseDistance data with timing parameters and flag parameters.
842822 * The output always ends with a space
823+ * @param aOneMarkMicros Timing for sending this protocol.
824+ * @param aData uint32 or uint64 holding the bits to be sent.
825+ * @param aNumberOfBits Number of bits from aData to be actually sent.
826+ * @param aFlags Evaluated flags are PROTOCOL_IS_MSB_FIRST and SUPPRESS_STOP_BIT_FOR_THIS_DATA. Stop bit is otherwise sent for all pulse distance protocols.
843827 */
844- void IRsend::sendPulseDistanceWidthData (uint16_t aOneMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros,
845- uint16_t aZeroSpaceMicros, IRRawDataType aData, uint_fast8_t aNumberOfBits, bool aMSBFirst, bool aSendStopBit) {
846- uint8_t tFlags = 0 ;
847- if (aMSBFirst) {
848- tFlags = PROTOCOL_IS_MSB_FIRST;
849- }
850- (void ) aSendStopBit;
851- sendPulseDistanceWidthData (aOneMarkMicros, aOneSpaceMicros, aZeroMarkMicros, aZeroSpaceMicros, aData, aNumberOfBits, tFlags);
852- }
853828void IRsend::sendPulseDistanceWidthData (uint16_t aOneMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroMarkMicros,
854829 uint16_t aZeroSpaceMicros, IRRawDataType aData, uint_fast8_t aNumberOfBits, uint8_t aFlags) {
855830
@@ -885,6 +860,7 @@ void IRsend::sendPulseDistanceWidthData(uint16_t aOneMarkMicros, uint16_t aOneSp
885860 /*
886861 * Stop bit is sent for all pulse distance protocols i.e. aOneMarkMicros == aZeroMarkMicros.
887862 * Therefore it is not sent for Sony and Magiquest :-)
863+ * For sending from an array, no intermediate stop bit must be sent for first data chunk.
888864 */
889865 if (!(aFlags & SUPPRESS_STOP_BIT_FOR_THIS_DATA) && aOneMarkMicros == aZeroMarkMicros) {
890866 // Send stop bit here
@@ -905,6 +881,8 @@ void IRsend::sendPulseDistanceWidthData(uint16_t aOneMarkMicros, uint16_t aOneSp
905881 * 1 -> space+mark
906882 * The output always ends with a space
907883 * can only send 31 bit data, since we put the start bit as 32th bit on front
884+ * @param aData uint32 or uint64 holding the bits to be sent.
885+ * @param aNumberOfBits Number of bits from aData to be actually sent.
908886 */
909887void IRsend::sendBiphaseData (uint16_t aBiphaseTimeUnit, uint32_t aData, uint_fast8_t aNumberOfBits) {
910888
0 commit comments