Skip to content

Commit

Permalink
tests_ir: change the test buttons to 1 ~ 9, 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiangfu Liu committed Jun 10, 2011
1 parent 2fe1bf9 commit 55852b2
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/tests_ir.c
Expand Up @@ -28,21 +28,27 @@ static int reception()
int pre_rx,i,rx;
int result;

int rc5_code[5] = {0x0c, 0x01, 0x03, 0x05, 0x10};
int rc5_code[10] = {0x01, 0x02, 0x03, 0x04, 0x05,
0x06, 0x07, 0x08, 0x09, 0x00};

char *code_strings[] = {
"[Standby] passed",
"[1] passed",
"[2] passed",
"[3] passed",
"[4] passed",
"[5] passed",
"[VolumeUp] passed"
"[6] passed",
"[7] passed",
"[8] passed",
"[9] passed",
"[0] passed",
};

pre_rx = 0;
i = 0;
result = TEST_STATUS_NOT_DONE;

printf("Press the remote's [standby], [1], [3], [5], [VolumeUp] one by one\n");
printf("Press the remote's [1] ... [9], [0], one by one\n");
printf("Waiting for remote. e for exit\n");

while(1) {
Expand All @@ -57,7 +63,7 @@ static int reception()
rx = CSR_RC5_RX;
irq_ack(IRQ_IR);

if(i == 5 || i == -1) { /* 5: all passed, -1: failed */
if(i == 10 || i == -1) { /* 10: all passed, -1: failed */
printf("Now press 'e' exit Infrared test. rx [0x%04x]\n", rx);
continue;
}
Expand All @@ -78,7 +84,7 @@ static int reception()
pre_rx = rx;
i++;

if(i == 5) {
if(i == 10) {
result = TEST_STATUS_PASSED;
continue;
}
Expand Down

0 comments on commit 55852b2

Please sign in to comment.