I2C. Nop.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3542 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
47654dcc4c
commit
5e18cf994d
|
@ -590,8 +590,13 @@ void i2c_lld_set_clock(I2CDriver *i2cp) {
|
|||
regCR2 = i2cp->id_i2c->CR2; /* Get the I2Cx CR2 value */
|
||||
regCR2 &= (uint16_t)~I2C_CR2_FREQ; /* Clear frequency FREQ[5:0] bits */
|
||||
freq = (uint16_t)(STM32_PCLK1 / 1000000); /* Set frequency bits depending on pclk1 value */
|
||||
#ifdef STM32F4XX
|
||||
chDbgCheck((freq >= 2) && (freq <= 42),
|
||||
"i2c_lld_set_clock() : Peripheral clock freq. out of range");
|
||||
#else
|
||||
chDbgCheck((freq >= 2) && (freq <= 36),
|
||||
"i2c_lld_set_clock() : Peripheral clock freq. out of range");
|
||||
#endif
|
||||
regCR2 |= freq;
|
||||
i2cp->id_i2c->CR2 = regCR2;
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ PLATFORMSRC = ${CHIBIOS}/os/hal/platforms/STM32F4xx/stm32_dma.c \
|
|||
${CHIBIOS}/os/hal/platforms/STM32/serial_lld.c \
|
||||
${CHIBIOS}/os/hal/platforms/STM32/spi_lld.c \
|
||||
${CHIBIOS}/os/hal/platforms/STM32/uart_lld.c \
|
||||
${CHIBIOS}/os/hal/platforms/STM32/i2c_lld.c \
|
||||
${CHIBIOS}/os/hal/platforms/STM32/GPIOv2/pal_lld.c
|
||||
|
||||
# Required include directories
|
||||
|
|
Loading…
Reference in New Issue