Lexus
April 26, 2023, 6:09am
#1
Which system do you use? Android, Ubuntu, OOWOW or others?
Android.
problem:
How to add your own infrared user code to the power. c file code in the BL30 project?
describe:
My remote control’s user code is 04cb;
In the following array list, the last four digits represent the user code, so how are the preceding numbers calculated?
Please let me know, thank you!
route:
bl30/src_ao/demos/amlogic/n200/t7/kvim4/power.c
static IRPowerKey_t prvPowerKeyList[] = {
{ 0xef10fe01, IR_NORMAL}, /* ref tv pwr */
{ 0xba45bd02, IR_NORMAL}, /* small ir pwr */
{ 0xef10fb04, IR_NORMAL}, /* old ref tv pwr */
{ 0xf20dfe01, IR_NORMAL},
{ 0xe51afb04, IR_NORMAL},
{ 0x3ac5bd02, IR_CUSTOM},
{}
/* add more */
};
numbqq
April 26, 2023, 7:24am
#2
Hello @Lexus
@goenjoy @xiong.zhang will help you there.
1 Like
@Lexus 2 digit key value inverse code+2 digit key value code+4 digit user code. For example, the khadas ir remote control sets the power key to wake up.
bootloader/uboot$ git diff
--- a/bl30/src_ao/demos/amlogic/n200/t7/kvim4/power.c
+++ b/bl30/src_ao/demos/amlogic/n200/t7/kvim4/power.c
@@ -51,7 +51,7 @@ static TaskHandle_t cecTask = NULL;
//static int vdd_ee;
static IRPowerKey_t prvPowerKeyList[] = {
- { 0xef10fe01, IR_NORMAL}, /* ref tv pwr */
+ { 0xeb14ff00, IR_NORMAL}, /* ref tv pwr */
2 digit key value inverse code+2 digit key value code+4 digit user code:
key^(0xeb) + key(0x14) + customcode(0xff00) = 0xeb14ff00
1 Like
Lexus
April 26, 2023, 11:56am
#4
Thank you!
but How did 0xeb come from?
Lexus
April 26, 2023, 12:07pm
#5
Thank you very much. I understand.