From 50f16c840cbbb9b238928de807c452709a407aab Mon Sep 17 00:00:00 2001 From: zhangshoukui Date: Fri, 18 Oct 2024 15:11:02 +0800 Subject: [PATCH] bmi160: fix compile warning and %zu replace %u MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- drivers/sensors/bmi160.c | 2 +- drivers/sensors/bmi160_base.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/sensors/bmi160.c b/drivers/sensors/bmi160.c index b50ba4537f..b68c3c852e 100644 --- a/drivers/sensors/bmi160.c +++ b/drivers/sensors/bmi160.c @@ -147,7 +147,7 @@ static ssize_t bmi160_read(FAR struct file *filep, FAR char *buffer, 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; } diff --git a/drivers/sensors/bmi160_base.h b/drivers/sensors/bmi160_base.h index 130233c9ee..3ca6560119 100644 --- a/drivers/sensors/bmi160_base.h +++ b/drivers/sensors/bmi160_base.h @@ -27,6 +27,7 @@ #include +#include #include #include #include