Revision 4532b1ab unittests/periphery-lld/src/ut_alld_P9221R_v1.c
unittests/periphery-lld/src/ut_alld_P9221R_v1.c | ||
---|---|---|
54 | 54 |
// local variables |
55 | 55 |
aos_utresult_t result = {0, 0}; |
56 | 56 |
uint32_t status; |
57 |
uint16_t data[18];
|
|
57 |
uint16_t data[19];
|
|
58 | 58 |
|
59 | 59 |
chprintf(stream, "read registers...\n"); |
60 |
status = p9221r_lld_read_register(((ut_p9221rdata_t*)ut->data)->PRd, P9221R_LLD_REGISTER_BATTERY_STATUS_SENT, data, 18, ((ut_p9221rdata_t*)ut->data)->timeout);
|
|
60 |
status = p9221r_lld_read_register(((ut_p9221rdata_t*)ut->data)->PRd, P9221R_LLD_REGISTER_BATTERY_STATUS_SENT, data, 19, ((ut_p9221rdata_t*)ut->data)->timeout);
|
|
61 | 61 |
if (status == APAL_STATUS_SUCCESS) { |
62 | 62 |
aosUtPassed(stream, &result); |
63 |
for(int i=0; i<18; i++){
|
|
63 |
for(int i=0; i<19; i++){
|
|
64 | 64 |
chprintf(stream, "register: %02x, data: %u \n", 0x3A+i, data[i]); |
65 | 65 |
} |
66 | 66 |
} else { |
Also available in: Unified diff