-
Notifications
You must be signed in to change notification settings - Fork 0
3.3 Appendix C
This document covers the 8-bit NEC register |
---|
The conversion between the RCU Infrared Codes and Key Values can be mapped through the file remote.conf
In this example, the MENU button is used.
When pressing the MENU button, the transmitter sends Infrared Codes to the receiver as RAW data. These RAW data need to be converted into a Key Event before they can be processed by the Operating System.
The RAW data fetched for the MENU key are 0xae517f80 and contain Factory as well as Infrared Codes.
The data are structured in the following manner:
0x | CC | KK | FFFF |
---|---|---|---|
0x | ae | 51 | 7f80 |
On soc Amlogic only sections 0x
, KK
and FFFF
are used, while section CC
contains information used for data comparison.
FFFF is a custom value used to configure the factory_code = 0xFFFF0001. The factory code becomes: 0x7f80
0001
CC & KK are the data value. Of these values, only KK is used. The Infrared Code for the MENU button becomes: 0x51
Next the Operating System needs to translate 0x51
to a corresponding Key Value from the input-event-codes.h file.
* Keys and buttons
...
#define KEY_MENU 139
...
This is done by associating the Infrared Code and the Key Value in the file remote.conf
SYNTAX:
IR CODE | SPACE | KEY EVENT | COMMENT |
---|
Mapping of the MENU button in remote.conf would look like this:
key_begin
...
0x51 125 # KEY_MENU
...
key_end
Now the Operating System is able to map the Infrared Code to the corresponding Key Value.
NOTE: The remote.conf file is loaded on system startup.