From 6ddf76103a6b49fbe8721b219ce8240a4e27b8a9 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Wed, 31 May 2023 14:53:51 +0200 Subject: [PATCH 1/2] drivers/bmx055: fix crazy use of FPU --- drivers/bmx055/bmx055.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bmx055/bmx055.c b/drivers/bmx055/bmx055.c index b2014372ce..3aa50dc4a5 100644 --- a/drivers/bmx055/bmx055.c +++ b/drivers/bmx055/bmx055.c @@ -234,7 +234,7 @@ int bmx055_gyro_read(const bmx055_t *dev, int16_t *data) uint16_t scale; /* converting scale info into real scaling values */ - scale = (GYRO_2000_DPS / pow(2, dev->p.gyro_scale)); + scale = GYRO_2000_DPS >> dev->p.gyro_scale; /* reading gyroscope data */ i2c_acquire(BUS); From 340b2b6d719f9a7ad35a15d00817aec4b73e1141 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Wed, 31 May 2023 18:12:30 +0200 Subject: [PATCH 2/2] tests/drivers/epd_bw_spi_disp_dev: fix accidental use of FPU --- tests/drivers/epd_bw_spi_disp_dev/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/drivers/epd_bw_spi_disp_dev/main.c b/tests/drivers/epd_bw_spi_disp_dev/main.c index cedf4bc9ab..db3f2003c8 100644 --- a/tests/drivers/epd_bw_spi_disp_dev/main.c +++ b/tests/drivers/epd_bw_spi_disp_dev/main.c @@ -53,7 +53,7 @@ int main(void) .x1 = 0, .x2 = riot_200_width - 1, .y1 = 0, - .y2 = riot_200_width - 1. + .y2 = riot_200_width - 1, }; dev->driver = &epd_bw_spi_disp_dev_driver; @@ -70,7 +70,7 @@ int main(void) .x1 = x, .x2 = x + riot_32_width - 1, .y1 = y, - .y2 = y + riot_32_height - 1. + .y2 = y + riot_32_height - 1, }; disp_dev_map(dev, &small_area, (void *)riot_logo_32);