summaryrefslogtreecommitdiff
path: root/cts
diff options
context:
space:
mode:
Diffstat (limited to 'cts')
-rw-r--r--cts/common/cts_common.h8
-rw-r--r--cts/common/dut_common.c2
-rw-r--r--cts/common/th_common.c2
-rw-r--r--cts/gpio/dut.c26
-rw-r--r--cts/gpio/th.c24
5 files changed, 31 insertions, 31 deletions
diff --git a/cts/common/cts_common.h b/cts/common/cts_common.h
index 4f0036039f..6233740167 100644
--- a/cts/common/cts_common.h
+++ b/cts/common/cts_common.h
@@ -19,10 +19,10 @@
* return a useful result (i.e. success, failure, etc)
*/
enum cts_error_code {
- SUCCESS,
- FAILURE,
- BAD_SYNC,
- UNKNOWN
+ CTS_SUCCESS,
+ CTS_ERROR_FAILURE,
+ CTS_ERROR_BAD_SYNC,
+ CTS_ERROR_UNKNOWN
};
#endif
diff --git a/cts/common/dut_common.c b/cts/common/dut_common.c
index 9b0561eaa9..3c8a64b4da 100644
--- a/cts/common/dut_common.c
+++ b/cts/common/dut_common.c
@@ -28,5 +28,5 @@ enum cts_error_code sync(void)
} while (input_level);
gpio_set_level(GPIO_HANDSHAKE_OUTPUT, 0);
- return UNKNOWN;
+ return CTS_ERROR_UNKNOWN;
}
diff --git a/cts/common/th_common.c b/cts/common/th_common.c
index 8e9bd47fa3..d30d5ffe32 100644
--- a/cts/common/th_common.c
+++ b/cts/common/th_common.c
@@ -32,5 +32,5 @@ enum cts_error_code sync(void)
input_level = gpio_get_level(GPIO_HANDSHAKE_INPUT);
} while (input_level);
- return SUCCESS;
+ return CTS_SUCCESS;
}
diff --git a/cts/gpio/dut.c b/cts/gpio/dut.c
index 20248f2642..7858d81f57 100644
--- a/cts/gpio/dut.c
+++ b/cts/gpio/dut.c
@@ -13,7 +13,7 @@
enum cts_error_code sync_test(void)
{
- return SUCCESS;
+ return CTS_SUCCESS;
}
enum cts_error_code set_high_test(void)
@@ -21,7 +21,7 @@ enum cts_error_code set_high_test(void)
gpio_set_flags(GPIO_OUTPUT_TEST, GPIO_ODR_LOW);
gpio_set_level(GPIO_OUTPUT_TEST, 1);
msleep(READ_WAIT_TIME_MS*2);
- return UNKNOWN;
+ return CTS_ERROR_UNKNOWN;
}
enum cts_error_code set_low_test(void)
@@ -29,7 +29,7 @@ enum cts_error_code set_low_test(void)
gpio_set_flags(GPIO_OUTPUT_TEST, GPIO_ODR_LOW);
gpio_set_level(GPIO_OUTPUT_TEST, 0);
msleep(READ_WAIT_TIME_MS*2);
- return UNKNOWN;
+ return CTS_ERROR_UNKNOWN;
}
enum cts_error_code read_high_test(void)
@@ -40,9 +40,9 @@ enum cts_error_code read_high_test(void)
msleep(READ_WAIT_TIME_MS);
level = gpio_get_level(GPIO_INPUT_TEST);
if (level)
- return SUCCESS;
+ return CTS_SUCCESS;
else
- return FAILURE;
+ return CTS_ERROR_FAILURE;
}
enum cts_error_code read_low_test(void)
@@ -53,9 +53,9 @@ enum cts_error_code read_low_test(void)
msleep(READ_WAIT_TIME_MS);
level = gpio_get_level(GPIO_INPUT_TEST);
if (!level)
- return SUCCESS;
+ return CTS_SUCCESS;
else
- return FAILURE;
+ return CTS_ERROR_FAILURE;
}
enum cts_error_code od_read_high_test(void)
@@ -66,9 +66,9 @@ enum cts_error_code od_read_high_test(void)
msleep(READ_WAIT_TIME_MS);
level = gpio_get_level(GPIO_OUTPUT_TEST);
if (!level)
- return SUCCESS;
+ return CTS_SUCCESS;
else
- return FAILURE;
+ return CTS_ERROR_FAILURE;
}
#include "cts_testlist.h"
@@ -88,16 +88,16 @@ void cts_task(void)
CPRINTS("Results:");
for (i = 0; i < CTS_TEST_ID_COUNT; i++) {
switch (results[i]) {
- case SUCCESS:
+ case CTS_SUCCESS:
CPRINTS("%s) Passed", tests[i].name);
break;
- case FAILURE:
+ case CTS_ERROR_FAILURE:
CPRINTS("%s) Failed", tests[i].name);
break;
- case BAD_SYNC:
+ case CTS_ERROR_BAD_SYNC:
CPRINTS("%s) Bad sync", tests[i].name);
break;
- case UNKNOWN:
+ case CTS_ERROR_UNKNOWN:
CPRINTS("%s) Test result unknown", tests[i].name);
break;
default:
diff --git a/cts/gpio/th.c b/cts/gpio/th.c
index ed1d582a75..3938f7951b 100644
--- a/cts/gpio/th.c
+++ b/cts/gpio/th.c
@@ -13,7 +13,7 @@
enum cts_error_code sync_test(void)
{
- return SUCCESS;
+ return CTS_SUCCESS;
}
enum cts_error_code set_high_test(void)
@@ -24,9 +24,9 @@ enum cts_error_code set_high_test(void)
msleep(READ_WAIT_TIME_MS);
level = gpio_get_level(GPIO_INPUT_TEST);
if (level)
- return SUCCESS;
+ return CTS_SUCCESS;
else
- return FAILURE;
+ return CTS_ERROR_FAILURE;
}
enum cts_error_code set_low_test(void)
@@ -37,9 +37,9 @@ enum cts_error_code set_low_test(void)
msleep(READ_WAIT_TIME_MS);
level = gpio_get_level(GPIO_INPUT_TEST);
if (!level)
- return SUCCESS;
+ return CTS_SUCCESS;
else
- return FAILURE;
+ return CTS_ERROR_FAILURE;
}
enum cts_error_code read_high_test(void)
@@ -47,7 +47,7 @@ enum cts_error_code read_high_test(void)
gpio_set_flags(GPIO_OUTPUT_TEST, GPIO_ODR_LOW);
gpio_set_level(GPIO_OUTPUT_TEST, 1);
msleep(READ_WAIT_TIME_MS*2);
- return UNKNOWN;
+ return CTS_ERROR_UNKNOWN;
}
enum cts_error_code read_low_test(void)
@@ -55,14 +55,14 @@ enum cts_error_code read_low_test(void)
gpio_set_flags(GPIO_OUTPUT_TEST, GPIO_ODR_LOW);
gpio_set_level(GPIO_OUTPUT_TEST, 0);
msleep(READ_WAIT_TIME_MS*2);
- return UNKNOWN;
+ return CTS_ERROR_UNKNOWN;
}
enum cts_error_code od_read_high_test(void)
{
gpio_set_flags(GPIO_INPUT_TEST, GPIO_OUTPUT | GPIO_ODR_LOW);
msleep(READ_WAIT_TIME_MS*2);
- return UNKNOWN;
+ return CTS_ERROR_UNKNOWN;
}
#include "cts_testlist.h"
@@ -82,16 +82,16 @@ void cts_task(void)
CPRINTS("Results:");
for (i = 0; i < CTS_TEST_ID_COUNT; i++) {
switch (results[i]) {
- case SUCCESS:
+ case CTS_SUCCESS:
CPRINTS("%s) Passed", tests[i].name);
break;
- case FAILURE:
+ case CTS_ERROR_FAILURE:
CPRINTS("%s) Failed", tests[i].name);
break;
- case BAD_SYNC:
+ case CTS_ERROR_BAD_SYNC:
CPRINTS("%s) Bad sync", tests[i].name);
break;
- case UNKNOWN:
+ case CTS_ERROR_UNKNOWN:
CPRINTS("%s) Test result unknown", tests[i].name);
break;
default: