2021-07-26 17:17:04 +08:00
|
|
|
#include "user_isr.h"
|
|
|
|
|
2021-07-27 09:58:57 +08:00
|
|
|
void timer4_isr()
|
2021-07-26 17:17:04 +08:00
|
|
|
{
|
|
|
|
static uint16_t cnt = 0;
|
|
|
|
if (cnt > 999)
|
|
|
|
{
|
|
|
|
HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);
|
|
|
|
cnt = 0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
cnt++;
|
|
|
|
}
|
2021-07-27 09:58:57 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void adc1_dma_isr()
|
|
|
|
{
|
|
|
|
eem_power_get_current();
|
|
|
|
}
|
|
|
|
|
|
|
|
GPIO_PinState fault_state;
|
|
|
|
|
|
|
|
void exti2_isr()
|
|
|
|
{
|
|
|
|
|
|
|
|
fault_state = HAL_GPIO_ReadPin(EEM_POWER_FAULT_GPIO_Port, EEM_POWER_FAULT_Pin);
|
|
|
|
HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, fault_state);
|
2021-07-26 17:17:04 +08:00
|
|
|
}
|