mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 19:40:31 +03:00
added softi2c source file (oops)
changed gpio speeds to 2mhz from 50, nothing is toggling at 50mhz here. reduce ringing/noise. git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@181 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
parent
23d11299b8
commit
e70d7b5d16
11 changed files with 781 additions and 549 deletions
|
@ -265,7 +265,7 @@ void i2cInit(I2C_TypeDef *I2C)
|
|||
|
||||
// Init pins
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10 | GPIO_Pin_11;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_OD;
|
||||
GPIO_Init(GPIOB, &GPIO_InitStructure);
|
||||
|
||||
|
@ -313,7 +313,7 @@ static void i2cUnstick(void)
|
|||
uint8_t i;
|
||||
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10 | GPIO_Pin_11;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_OD;
|
||||
GPIO_Init(GPIOB, &GPIO_InitStructure);
|
||||
|
||||
|
@ -345,7 +345,7 @@ static void i2cUnstick(void)
|
|||
|
||||
// Init pins
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10 | GPIO_Pin_11;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_OD;
|
||||
GPIO_Init(GPIOB, &GPIO_InitStructure);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue