37 lines
527 B
C
37 lines
527 B
C
#include "main.h"
|
|
#include "stm32g0xx_it.h"
|
|
|
|
extern I2C_HandleTypeDef hi2c1;
|
|
|
|
void NMI_Handler(void)
|
|
{
|
|
while (1) {}
|
|
}
|
|
|
|
void HardFault_Handler(void)
|
|
{
|
|
while (1) {}
|
|
}
|
|
|
|
void SVC_Handler(void)
|
|
{
|
|
}
|
|
|
|
void PendSV_Handler(void)
|
|
{
|
|
}
|
|
|
|
void SysTick_Handler(void)
|
|
{
|
|
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);
|
|
}
|
|
}
|