From b604934189efc53b54c3f9be40ccf16374ae10c4 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Thu, 22 Aug 2019 11:56:40 +0200 Subject: [PATCH] cpu/stm32_common: Updated i2c_release() --- cpu/stm32_common/periph/i2c_1.c | 4 ++-- cpu/stm32_common/periph/i2c_2.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cpu/stm32_common/periph/i2c_1.c b/cpu/stm32_common/periph/i2c_1.c index 61d8347155..084e0685dc 100644 --- a/cpu/stm32_common/periph/i2c_1.c +++ b/cpu/stm32_common/periph/i2c_1.c @@ -32,6 +32,7 @@ * @} */ +#include #include #include @@ -145,14 +146,13 @@ int i2c_acquire(i2c_t dev) return 0; } -int i2c_release(i2c_t dev) +void i2c_release(i2c_t dev) { assert(dev < I2C_NUMOF); periph_clk_dis(i2c_config[dev].bus, i2c_config[dev].rcc_mask); mutex_unlock(&locks[dev]); - return 0; } int i2c_write_regs(i2c_t dev, uint16_t addr, uint16_t reg, diff --git a/cpu/stm32_common/periph/i2c_2.c b/cpu/stm32_common/periph/i2c_2.c index 7c1b38ddef..8a1542417b 100644 --- a/cpu/stm32_common/periph/i2c_2.c +++ b/cpu/stm32_common/periph/i2c_2.c @@ -34,6 +34,7 @@ * @} */ +#include #include #include @@ -195,7 +196,7 @@ int i2c_acquire(i2c_t dev) return 0; } -int i2c_release(i2c_t dev) +void i2c_release(i2c_t dev) { assert(dev < I2C_NUMOF); @@ -207,7 +208,6 @@ int i2c_release(i2c_t dev) #endif mutex_unlock(&locks[dev]); - return 0; } int i2c_read_bytes(i2c_t dev, uint16_t address, void *data, size_t length,