42 lines
1.9 KiB
Diff
42 lines
1.9 KiB
Diff
From d6fea51098dae1c0922183e7844c76bc83afd6e5 Mon Sep 17 00:00:00 2001
|
|
From: Alexander Entinger <cto@lxrobotics.com>
|
|
Date: Tue, 16 Feb 2021 06:30:59 +0100
|
|
Subject: [PATCH 023/204] RP2040: prefix pico-sdk's i2c_init function with a
|
|
'_'
|
|
|
|
to avoid name clashes with mbed I2C API.
|
|
---
|
|
.../TARGET_RP2040/pico-sdk/rp2_common/hardware_i2c/i2c.c | 2 +-
|
|
.../pico-sdk/rp2_common/hardware_i2c/include/hardware/i2c.h | 2 +-
|
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_i2c/i2c.c b/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_i2c/i2c.c
|
|
index cc4212ae9a..dc2810187e 100644
|
|
--- a/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_i2c/i2c.c
|
|
+++ b/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_i2c/i2c.c
|
|
@@ -31,7 +31,7 @@ static inline bool i2c_reserved_addr(uint8_t addr) {
|
|
return (addr & 0x78) == 0 || (addr & 0x78) == 0x78;
|
|
}
|
|
|
|
-uint i2c_init(i2c_inst_t *i2c, uint baudrate) {
|
|
+uint _i2c_init(i2c_inst_t *i2c, uint baudrate) {
|
|
i2c_reset(i2c);
|
|
i2c_unreset(i2c);
|
|
i2c->restart_on_next = false;
|
|
diff --git a/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_i2c/include/hardware/i2c.h b/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_i2c/include/hardware/i2c.h
|
|
index dda598c3e0..ead7bf1b1b 100644
|
|
--- a/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_i2c/include/hardware/i2c.h
|
|
+++ b/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_i2c/include/hardware/i2c.h
|
|
@@ -80,7 +80,7 @@ extern i2c_inst_t i2c1_inst;
|
|
* \param baudrate Baudrate in Hz (e.g. 100kHz is 100000)
|
|
* \return Actual set baudrate
|
|
*/
|
|
-uint i2c_init(i2c_inst_t *i2c, uint baudrate);
|
|
+uint _i2c_init(i2c_inst_t *i2c, uint baudrate);
|
|
|
|
/*! \brief Disable the I2C HW block
|
|
* \ingroup hardware_i2c
|
|
--
|
|
2.39.1
|
|
|