mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-15 07:29:15 +01:00
Move EXTI handlers into other drivers
This commit is contained in:
parent
6d018c046e
commit
77cca9ba30
@ -82,6 +82,7 @@ void PIOS_BMP085_Init(const struct pios_bmp085_cfg * cfg)
|
||||
GPIO_Init(cfg->drdy.gpio, &cfg->drdy.init);
|
||||
|
||||
/* Configure the End Of Conversion (EOC) interrupt */
|
||||
SYSCFG_EXTILineConfig(cfg->eoc_exti.port_source, cfg->eoc_exti.pin_source);
|
||||
EXTI_Init(&cfg->eoc_exti.init);
|
||||
|
||||
/* Enable and set EOC EXTI Interrupt to the lowest priority */
|
||||
@ -290,4 +291,23 @@ int32_t PIOS_BMP085_Test()
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* PIOS_INCLUDE_BMP085 */
|
||||
/**
|
||||
* Handle external lines 15 to 10 interrupt requests
|
||||
*/
|
||||
//void EXTI15_10_IRQHandler(void)
|
||||
//{
|
||||
// if (EXTI_GetITStatus(EXTI15_10) != RESET) {
|
||||
// /* Read the ADC Value */
|
||||
// PIOS_BMP085_EOC=1;
|
||||
//
|
||||
// /* Clear the EXTI line pending bit */
|
||||
// EXTI_ClearITPendingBit(EXTI15_10);
|
||||
// }
|
||||
//}
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
*/
|
||||
|
@ -62,7 +62,7 @@ void PIOS_HMC5883_Init(const struct pios_hmc5883_cfg * cfg)
|
||||
GPIO_Init(cfg->drdy.gpio, &cfg->drdy.init);
|
||||
|
||||
/* Configure the End Of Conversion (EOC) interrupt */
|
||||
//GPIO_EXTILineConfig(cfg->eoc_exit.port_source, cfg->eoc_exit.pin_source);
|
||||
SYSCFG_EXTILineConfig(cfg->eoc_exti.port_source, cfg->eoc_exti.pin_source);
|
||||
EXTI_Init(&cfg->eoc_exti.init);
|
||||
|
||||
/* Enable and set EOC EXTI Interrupt to the lowest priority */
|
||||
@ -371,6 +371,20 @@ void PIOS_HMC5883_IRQHandler(void)
|
||||
pios_hmc5883_data_ready = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* The physical IRQ handler
|
||||
* Soon this will be generic in pios_exti and the BMA180 will register
|
||||
* against it. Right now this is crap!
|
||||
*/
|
||||
void EXTI9_5_IRQHandler(void)
|
||||
{
|
||||
if (EXTI_GetITStatus(EXTI9_5_IRQn) != RESET) {
|
||||
PIOS_HMC5883_IRQHandler();
|
||||
EXTI_ClearITPendingBit(EXTI9_5_IRQn);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif /* PIOS_INCLUDE_HMC5883 */
|
||||
|
||||
/**
|
||||
|
@ -63,7 +63,7 @@ void PIOS_IMU3000_Init(const struct pios_imu3000_cfg * cfg)
|
||||
GPIO_Init(cfg->drdy.gpio, &cfg->drdy.init);
|
||||
|
||||
/* Configure the End Of Conversion (EOC) interrupt */
|
||||
//GPIO_EXTILineConfig(cfg->eoc_exit.port_source, cfg->eoc_exit.pin_source);
|
||||
SYSCFG_EXTILineConfig(cfg->eoc_exti.port_source, cfg->eoc_exti.pin_source);
|
||||
EXTI_Init(&cfg->eoc_exti.init);
|
||||
|
||||
/* Enable and set EOC EXTI Interrupt to the lowest priority */
|
||||
@ -292,7 +292,21 @@ void PIOS_IMU3000_IRQHandler(void)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* PIOS_INCLUDE_IMU3000 */
|
||||
/**
|
||||
* The physical IRQ handler
|
||||
* Soon this will be generic in pios_exti and the BMA180 will register
|
||||
* against it. Right now this is crap!
|
||||
*/
|
||||
void EXTI1_IRQHandler(void)
|
||||
{
|
||||
if (EXTI_GetITStatus(EXTI_Line1) != RESET)
|
||||
{
|
||||
PIOS_IMU3000_IRQHandler();
|
||||
EXTI_ClearITPendingBit(EXTI_Line1);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
Loading…
x
Reference in New Issue
Block a user