mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Move SCCB timing to board config files.
This commit is contained in:
parent
4ed92bf227
commit
3d722bc35d
@ -80,6 +80,7 @@
|
||||
#define SCCB_PORT (GPIOB)
|
||||
#define SCCB_SCL_PIN (GPIO_PIN_8)
|
||||
#define SCCB_SDA_PIN (GPIO_PIN_9)
|
||||
#define SCCB_TIMING (0x1090699B) // Frequency: 100KHz Rise Time: 100ns Fall Time: 20ns
|
||||
|
||||
/* DCMI */
|
||||
#define DCMI_TIM (TIM1)
|
||||
|
||||
@ -99,6 +99,7 @@
|
||||
#define SCCB_PORT (GPIOB)
|
||||
#define SCCB_SCL_PIN (GPIO_PIN_8)
|
||||
#define SCCB_SDA_PIN (GPIO_PIN_9)
|
||||
#define SCCB_TIMING (0x40604E73) // Frequency: 100KHz Rise Time: 100ns Fall Time: 20ns
|
||||
|
||||
/* DCMI */
|
||||
#define DCMI_TIM (TIM1)
|
||||
|
||||
@ -21,10 +21,8 @@ int cambus_init()
|
||||
/* Configure I2C */
|
||||
I2CHandle.Instance = SCCB_I2C;
|
||||
I2CHandle.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
|
||||
#if defined(MCU_SERIES_F7)
|
||||
I2CHandle.Init.Timing = 0x1090699B; // 100KHz, rise time = 100ns, fall time = 20ns
|
||||
#elif defined(MCU_SERIES_H7)
|
||||
I2CHandle.Init.Timing = 0x40604E73; // 100KHz, rise time = 100ns, fall time = 20ns
|
||||
#if defined(SCCB_TIMING)
|
||||
I2CHandle.Init.Timing = SCCB_TIMING;
|
||||
#else
|
||||
I2CHandle.Init.ClockSpeed = I2C_FREQUENCY;
|
||||
I2CHandle.Init.DutyCycle = I2C_DUTYCYCLE_2;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user