Revision c60ee2dd test/periphery-lld/P9221R_v1/aos_test_P9221R.c
test/periphery-lld/P9221R_v1/aos_test_P9221R.c | ||
---|---|---|
56 | 56 |
aos_testresult_t result = {0, 0}; |
57 | 57 |
uint32_t status; |
58 | 58 |
uint8_t data[79] = {0xA5}; |
59 |
int8_t x_alignment[2] = {0xA5}; |
|
60 |
int8_t y_alignment[2] = {0xA5}; |
|
59 |
int8_t alignment[2] = {0xA5}; |
|
61 | 60 |
float voltage[1]; |
62 | 61 |
float current[1]; |
63 | 62 |
|
... | ... | |
72 | 71 |
aosTestFailed(stream, &result); |
73 | 72 |
} |
74 | 73 |
|
75 |
chprintf(stream, "read x_alignment for five seconds, move receiver ... \n");
|
|
74 |
chprintf(stream, "read alignment for five seconds, move receiver ... \n"); |
|
76 | 75 |
status = APAL_STATUS_SUCCESS; |
77 | 76 |
for (uint32_t i = 0; i <= 5; i++) { |
78 |
status |= p9221r_lld_read_x_alignment(((aos_test_p9221rdata_t*)test->data)->PRd, x_alignment, ((aos_test_p9221rdata_t*)test->data)->timeout); |
|
79 |
chprintf(stream, "x_alignment %d \n", x_alignment[0]); |
|
80 |
//aosTestPassed(stream, &result); |
|
81 |
aosThdSSleep(1); |
|
82 |
} |
|
83 |
if(status == APAL_STATUS_SUCCESS) { |
|
84 |
aosTestPassed(stream, &result); |
|
85 |
} else { |
|
86 |
aosTestFailed(stream, &result); |
|
87 |
} |
|
88 |
|
|
89 |
chprintf(stream, "read y_alignment for five seconds, move receiver ... \n"); |
|
90 |
status = APAL_STATUS_SUCCESS; |
|
91 |
for (uint32_t i = 0; i <= 5; i++) { |
|
92 |
status |= p9221r_lld_read_y_alignment(((aos_test_p9221rdata_t*)test->data)->PRd, y_alignment, ((aos_test_p9221rdata_t*)test->data)->timeout); |
|
93 |
chprintf(stream, "y_alignment: %d \n", y_alignment[0]); |
|
77 |
status |= p9221r_lld_read_alignment(((aos_test_p9221rdata_t*)test->data)->PRd, alignment, ((aos_test_p9221rdata_t*)test->data)->timeout); |
|
78 |
chprintf(stream, "x_alignment %2d \n", alignment[0]); |
|
79 |
chprintf(stream, "y_alignment %2d \n", alignment[1]); |
|
94 | 80 |
//aosTestPassed(stream, &result); |
95 | 81 |
aosThdSSleep(1); |
96 | 82 |
} |
Also available in: Unified diff