| cmdIRP_CFG | Index |
Command Code:
The Packet:
| 0 | 1 | 2 | 3 | 4 | ||||
| address | 3 | cmdIRP_CFG | DigID | IRPCFG |
| DigID - | Index of digital IO pin. |
| IRPCFG - | [ (3) ENA | (2:0) IRP (0-7) ] |
Description:
| NOTE: | This command is only applicable to GP 2.0 modules. |
This command configures a digital IO pin for IR transmission or reception. Only digital pins 1-4 are capable of IR reception. Only digital 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.
If the command packet does not have an IRPCFG byte, the Stem will send a cmdIRP_CFG reply packet with the pin ID and current IRPCFG byte.
The IRPCFG byte has flags for the digital IO pin settings. Setting the ENA bit makes the digital pin ready for IR communication. Clearing the ENA bit will reset the digital IO pin to an input. At power-up all digital IO pins are also configured as inputs. The 3-bit IRP field must contain one of the following protocol codes:
| Protocol | IRP Code |
|---|---|
| NEC | 0 |
| RC5 | 1 |
Once this command has been issued, a cmdPTIME_RD command must be issued to start reception. Some example commands are shown for a GP 2.0 module with an address of 2:
| Command | Effect |
|---|---|
| 2 70 4 8 | Configure digital pin 4 for NEC IR reception |
| 2 70 4 9 | Configure digital pin 4 for RC5 IR reception |
| 2 29 68 | Data received on pin 4 will trigger reflex |
| 2 29 132 | Data received on pin 4 will be sent to host |
| 2 29 196 | Data received on pin 4 will be sent to host and to a reflex |