Revision ce12e797 test/periphery-lld/MPU6050_v1/aos_test_MPU6050.c

View differences:

test/periphery-lld/MPU6050_v1/aos_test_MPU6050.c
47 47

  
48 48
aos_testresult_t aosTestMpu6050Func(BaseSequentialStream* stream, const aos_test_t* test)
49 49
{
50
    aos_testresult_t result = {0, 0};
50
    aos_testresult_t result;
51 51

  
52 52
    uint8_t data[1] = {0};
53 53
    int32_t status;
54 54

  
55
  aosTestResultInit(&result);
56

  
55 57
    status = mpu6050_lld_read_register(((aos_test_mpu6050data_t*)test->data)->mpu, MPU6050_LLD_WHO_AM_I, data, 1, ((aos_test_mpu6050data_t*)test->data)->timeout);
56 58
    if (status == APAL_STATUS_OK && data[0] == MPU6050_I_AM) {
57 59
      aosTestPassed(stream, &result);

Also available in: Unified diff