| cmdIRP_XMIT | Index |
Command Code:
The Packet:
| 0 | 1 | 2 | 3 | 4 | 5 | |||||
| address | 4 | cmdIRP_XMIT | DigID | paramH | paramL |
| DigID - | Index of digital IO pin. |
| paramH - | High byte of data to be transmitted. |
| paramL - | Low byte of data to be transmitted. |
Description:
| NOTE: | This command is only applicable to GP 2.0 modules. |
This command transmits a message via a digital IO pin configured for IR transmission with a specified protocol. Only pins 5-6 are capable of IR transmission. A digital IO pin index that is out of range will generate an error message. There is no reply packet.
NEC Protocol (0)
This protocol transmits 16 bits of data. The two bytes in the command may have arbitrary data. The paramH byte is an 8-bit device address. The paramL byte is an 8-bit device command.
RC5 Protocol (1)
This protocol transmits 11 bits of data. The 6 least significant bits of the paramL byte are a 6-bit device command. The 3 least significant bits of paramH combined with the 2 most significant bits of paramL make up a 5-bit device address. The two most significant bits of paramH must be 0. After these bits, the next two bits must be 1. These are start bits. The next bit is a toggle bit. When used in a remote control, it indicates the state of a button. No change in the toggle bit indicates that a button is held down. A change in the toggle bit means a new press of the button. Based on this description, the two bytes of data must adhere to the following format:
0011TXXX XXYYYYYY
where T is the toggle bit, XXXXX is the device address, and YYYYYY is the device command.