keil/include/drivers/lis3dh_driver.c
@@ -198,7 +198,7 @@
    io_pin_mux_set(SCL_PIN, IO_FUNC0);
    gpio_pin_set_dir(SDA_PIN , GPIO_DIR_OUT, 1);
//      io_open_drain_set(SDA_PIN, 1);
      //io_open_drain_set(SDA_PIN, 1);
    io_pull_set(SDA_PIN , IO_PULL_UP, IO_PULL_UP_LEVEL2);//输出高阻态
    gpio_pin_set_dir(SCL_PIN , GPIO_DIR_OUT, 1);
@@ -676,7 +676,13 @@
    }
    return temp;
}
void SC7A22H_ReadLenByte(uint16_t ReadAddr, uint8_t Len, uint8_t *buf)
{
    for(uint8_t t = 0; t < Len; t++)
    {
        buf[t] = LIS3DH_ReadOneByte(ReadAddr + t);
    }
}
//在mir3da里面的指定地址开始读一字节数据
//ReadAddr   :读出的地址
//返回值     :读出的数据