stm32_serDes_protobuf_project/bsp/stm32f4xx_it.c
2024-05-13 15:21:22 +03:00

38 lines
592 B
C

#include "stm32f4xx_it.h"
#include "lwip/ethernetif.h"
// extern ETH_HandleTypeDef heth;
static volatile uint32_t sys_tick = 0;
void SysTick_Handler(void)
{
sys_tick++;
}
uint32_t getSysTick() {
return sys_tick;
}
#define MAX_DELAY 0xFFFFFFFFU
void delay(uint32_t delay) {
uint32_t tickStart = getSysTick();
uint32_t wait = delay;
if (wait < MAX_DELAY) {
wait++;
}
while((getSysTick() - tickStart) < wait) {}
}
void USART2_IRQHandler(void)
{
}
void ETH_IRQHandler(void)
{
HAL_ETH_IRQHandler(getEthStruct());
}