summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2018-12-24 22:52:09 +0800
committerGitHub <[email protected]>2018-12-24 22:52:09 +0800
commit0b79f45075ee36ce66ffd1a3c493530906cdafe1 (patch)
tree099053f33df76d4a28febf6cfcb6c2ac2173d8e5
parentcd4ac30b8025f81157ef42f8a33f452e5823d33f (diff)
parent6dacf27d4e9abc9827607de102adb5ad291f8efa (diff)
Merge pull request #2089 from wuhanstudio/upstream-stm32f10x-i2c
[driver][i2c] Fix GPIO_SPEED_FREQ_HIGH
-rw-r--r--bsp/stm32f10x-HAL/drivers/drv_i2c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bsp/stm32f10x-HAL/drivers/drv_i2c.c b/bsp/stm32f10x-HAL/drivers/drv_i2c.c
index 3109e95bd3..7836103f9c 100644
--- a/bsp/stm32f10x-HAL/drivers/drv_i2c.c
+++ b/bsp/stm32f10x-HAL/drivers/drv_i2c.c
@@ -31,12 +31,12 @@ static void drv_i2c_gpio_init()
GPIO_Initure.Pin = I2C_SCL_PIN;
GPIO_Initure.Mode = GPIO_MODE_OUTPUT_OD;
GPIO_Initure.Pull = GPIO_PULLUP;
- GPIO_Initure.Speed = GPIO_SPEED_HIGH;
+ GPIO_Initure.Speed = GPIO_SPEED_FREQ_HIGH;
HAL_GPIO_Init(I2C_SCL_PORT, &GPIO_Initure);
GPIO_Initure.Pin = I2C_SDA_PIN;
GPIO_Initure.Mode = GPIO_MODE_OUTPUT_OD;
GPIO_Initure.Pull = GPIO_PULLUP;
- GPIO_Initure.Speed = GPIO_SPEED_HIGH;
+ GPIO_Initure.Speed = GPIO_SPEED_FREQ_HIGH;
HAL_GPIO_Init(I2C_SDA_PORT, &GPIO_Initure);
HAL_GPIO_WritePin(I2C_SCL_PORT, I2C_SCL_PIN, GPIO_PIN_SET);
HAL_GPIO_WritePin(I2C_SDA_PORT, I2C_SDA_PIN, GPIO_PIN_SET);