forked from wanrenqi/PASII
1
0
Fork 0
PASII/CandeII_1.4/User/isr.c

68 lines
1.7 KiB
C
Raw Permalink Normal View History

/*************************************************************************************************
**Filename: isr.c
**Version :
**Author :
**Date :
**Description:
**
*************************************************************************************************/
#include "mcu_bsp.h"
#include "lsm6d.h"
#include "DebugLog.h"
/*********************************************************************
* Global Function declared ('extern')
*/
extern void pack_timer_event();
/*************************************************************************************************
* Function Name:
* Description :
* Arguments :
* Return Value :
*************************************************************************************************/
void Timer_2_callback(void)
{
if(PAS.exist == 1) //<2F><>ʼ<EFBFBD><CABC>
{
Lsm6dso_RPM_Cal();
}
pack_timer_event();
}
/*************************************************************************************************
* Function Name:
* Description :
* Arguments :
* Return Value :
*************************************************************************************************/
void GPIO_callback(void)
{
unsigned int SW;
SW = GPIO_IRQ_CTRL->GPIO_INT;
if(SW & U32BIT(LIS2D_INT2))
{
if((GPIO_Pin_Read(U32BIT(LIS2D_INT2)) & U32BIT(LIS2D_INT2))!= 0)
{
}
}
if(SW & U32BIT(CHARGE_STATE_PIN))
{
if((GPIO_Pin_Read(U32BIT(CHARGE_STATE_PIN)) & U32BIT(CHARGE_STATE_PIN))!= 0)
{
2025-06-20 14:26:06 +08:00
if(PAS.transpModes == 1)
{
PAS.transpModes = 0;
PAS.exitTransmode = 1;
}
}
}
}
/*************************************************************************************************/