/*
 * Interrupt.h
 *
 *  Created on: 2020?10?16?
 *      Author: zheng_s2
 */

#ifndef DRIVER_INTERRUPT_INTERRUPT_H_
#define DRIVER_INTERRUPT_INTERRUPT_H_

#include "S32K148.h"

/*Power INT Bit define*/
enum
{
	BACKUP_BATTERY_INT 	=1,	/*0000 0001*/
	SOS_KEY_INT			=2,	/*0000 0010*/
	AG550_WAKE_INT		=4,	/*0000 0100*/
	GSENSOR_INT			=8,	/*0000 1000*/
	CAN_WAKE_INT		=16,/*0001 0000*/
	BLE_WAKE_INT		=32,/*0010 0000*/
};



extern void PORTA_IRQHandler(void);
extern void PORTB_IRQHandler(void);
extern void PORTC_IRQHandler(void);
extern void PORTD_IRQHandler(void);
extern void PORTE_IRQHandler(void);
extern uint16_t Power_IntSrc;
extern uint32_t INT_Read_IRQ_Flag(PORT_Type *port_index);
extern uint32_t INT_Clear_IRQ_Flag(PORT_Type *port_index);
extern void INT_WakeUp_Set(PORT_Type *port_index, uint8_t pin_index, uint8_t int_type);

#endif /* DRIVER_INTERRUPT_INTERRUPT_H_ */
