Browse Source

stm32: i2c-v2: drop overly specific speed helpers

Will be replaced by generic speed helpers.
pull/758/head
Karl Palsson 8 years ago
parent
commit
1edcc1b7da
  1. 1
      include/libopencm3/stm32/common/i2c_common_v2.h
  2. 9
      lib/stm32/common/i2c_common_v2.c

1
include/libopencm3/stm32/common/i2c_common_v2.h

@ -406,7 +406,6 @@ void i2c_set_scl_high_period(uint32_t i2c, uint8_t period);
void i2c_set_scl_low_period(uint32_t i2c, uint8_t period);
void i2c_enable_stretching(uint32_t i2c);
void i2c_disable_stretching(uint32_t i2c);
void i2c_100khz_i2cclk8mhz(uint32_t i2c);
void i2c_set_7bit_addr_mode(uint32_t i2c);
void i2c_set_10bit_addr_mode(uint32_t i2c);
void i2c_set_7bit_address(uint32_t i2c, uint8_t addr);

9
lib/stm32/common/i2c_common_v2.c

@ -234,15 +234,6 @@ void i2c_disable_stretching(uint32_t i2c)
I2C_CR1(i2c) |= I2C_CR1_NOSTRETCH;
}
void i2c_100khz_i2cclk8mhz(uint32_t i2c)
{
i2c_set_prescaler(i2c, 1);
i2c_set_scl_low_period(i2c, 0x13);
i2c_set_scl_high_period(i2c, 0xF);
i2c_set_data_hold_time(i2c, 0x2);
i2c_set_data_setup_time(i2c, 0x4);
}
void i2c_set_7bit_addr_mode(uint32_t i2c)
{
I2C_CR2(i2c) &= ~I2C_CR2_ADD10;

Loading…
Cancel
Save