* Compute the raw 32-bit data for an OpenLASIR frame from 8-bit address, 8-bit DeviceID, 5-bit Mode and 3-bit Data. * * @param aAddress 8-bit address (Block ID). Only lower 8 bits are used. * @param aDeviceID 8-bit Device ID. * @param aMode 5-bit Mode. * @param aData 3-bit Data (color, etc.). * @return 32-bit raw data ready for transmission. */
| 168 | * @return 32-bit raw data ready for transmission. |
| 169 | */ |
| 170 | uint16_t IRsend::computeOpenLASIRRawCommand(uint8_t aDeviceID, uint8_t aMode, uint8_t aData) { |
| 171 | WordUnion tRawCommand; |
| 172 | |
| 173 | tRawCommand.UByte.LowByte = aDeviceID; |
| 174 | tRawCommand.UByte.HighByte = (aMode & 0x1F) | ((aData & 0x07) << 5); |
| 175 | |
| 176 | return tRawCommand.UWord; |
| 177 | } |
| 178 | |
| 179 | /** |
| 180 | * Send an OpenLASIR frame with special NEC-style repeats. |
nothing calls this directly
no outgoing calls
no test coverage detected