mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-25 01:05:21 +03:00
remove stm32_gpio.c from project and fix EXTI-using drivers w/local version of gpioExtiLineConfig.
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@465 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
parent
609df47cd4
commit
5107130ac0
5 changed files with 12 additions and 17 deletions
|
@ -31,3 +31,12 @@ void gpioInit(GPIO_TypeDef *gpio, gpio_config_t *config)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void gpioExtiLineConfig(uint8_t portsrc, uint8_t pinsrc)
|
||||
{
|
||||
uint32_t tmp = 0x00;
|
||||
|
||||
tmp = ((uint32_t)0x0F) << (0x04 * (pinsrc & (uint8_t)0x03));
|
||||
AFIO->EXTICR[pinsrc >> 0x02] &= ~tmp;
|
||||
AFIO->EXTICR[pinsrc >> 0x02] |= (((uint32_t)portsrc) << (0x04 * (pinsrc & (uint8_t)0x03)));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue