2020-12-14 15:21:17 +00:00
|
|
|
#include "main.h"
|
|
|
|
#include "stm32g0xx_it.h"
|
|
|
|
|
2021-07-05 14:23:27 +00:00
|
|
|
extern I2C_HandleTypeDef hi2c1;
|
|
|
|
|
2020-12-14 15:21:17 +00:00
|
|
|
void NMI_Handler(void)
|
|
|
|
{
|
2021-07-05 14:23:27 +00:00
|
|
|
while (1) {}
|
2020-12-14 15:21:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void HardFault_Handler(void)
|
|
|
|
{
|
2021-07-05 14:23:27 +00:00
|
|
|
while (1) {}
|
2020-12-14 15:21:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SVC_Handler(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void PendSV_Handler(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void SysTick_Handler(void)
|
|
|
|
{
|
2021-07-05 14:23:27 +00:00
|
|
|
HAL_IncTick();
|
|
|
|
}
|
|
|
|
|
|
|
|
void I2C1_IRQHandler(void)
|
|
|
|
{
|
|
|
|
if(hi2c1.Instance->ISR & (I2C_FLAG_BERR | I2C_FLAG_ARLO | I2C_FLAG_OVR)) {
|
|
|
|
HAL_I2C_ER_IRQHandler(&hi2c1);
|
|
|
|
} else {
|
|
|
|
HAL_I2C_EV_IRQHandler(&hi2c1);
|
|
|
|
}
|
2020-12-14 15:21:17 +00:00
|
|
|
}
|