Revision ce12e797 test/periphery-lld/VCNL4020_v1/aos_test_VCNL4020.c
test/periphery-lld/VCNL4020_v1/aos_test_VCNL4020.c | ||
---|---|---|
56 | 56 |
(((aos_test_vcnl4020data_t*)(test->data))->evtsource != NULL)); |
57 | 57 |
|
58 | 58 |
// local variables |
59 |
aos_testresult_t result = {0, 0};
|
|
59 |
aos_testresult_t result; |
|
60 | 60 |
int32_t status; |
61 | 61 |
uint8_t reg_buf[4] = {0}; |
62 | 62 |
uint8_t* reg_8 = (uint8_t*)(reg_buf); |
... | ... | |
64 | 64 |
event_listener_t event_listener; |
65 | 65 |
aos_timestamp_t tcurrent, tend; |
66 | 66 |
|
67 |
aosTestResultInit(&result); |
|
68 |
|
|
67 | 69 |
chprintf(stream, "reading register...\n"); |
68 | 70 |
status = vcnl4020_lld_readreg(((aos_test_vcnl4020data_t*)(test->data))->vcnld, VCNL4020_LLD_REGADDR_IDREV, ®_8[0], ((aos_test_vcnl4020data_t*)(test->data))->timeout); |
69 | 71 |
if ((status == APAL_STATUS_OK || status == APAL_STATUS_WARNING) && reg_8[0] == 0x21u) { |
Also available in: Unified diff