bmi160: fix compile warning and %zu replace %u

VELAPLATFO-45270

nuttx/drivers/sensors/bmi160.c: In function ‘bmi160_set_normal_imu’:
nuttx/drivers/sensors/bmi160.c:79:3: warning: implicit declaration of function ‘up_mdelay’ [-Wimplicit-function-declaration]
   79 |   up_mdelay(30);
      |   ^~~~~~~~~

Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
This commit is contained in:
zhangshoukui 2024-10-18 15:11:02 +08:00 committed by Xiang Xiao
parent cf95305934
commit 50f16c840c
2 changed files with 2 additions and 1 deletions

View File

@ -147,7 +147,7 @@ static ssize_t bmi160_read(FAR struct file *filep, FAR char *buffer,
if (len < sizeof(struct accel_gyro_st_s)) if (len < sizeof(struct accel_gyro_st_s))
{ {
snerr("Expected buffer size is %u\n", sizeof(struct accel_gyro_st_s)); snerr("Expected buffer size is %zu\n", sizeof(struct accel_gyro_st_s));
return 0; return 0;
} }

View File

@ -27,6 +27,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include <nuttx/arch.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include <nuttx/spi/spi.h> #include <nuttx/spi/spi.h>