2022-01-18 00:58:54 +08:00

74 lines
2.3 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*********************************************************************************************************************
* COPYRIGHT NOTICE
* Copyright (c) 2020,<2C><><EFBFBD>ɿƼ<C9BF>
* All rights reserved.
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQȺ<51><C8BA><EFBFBD><EFBFBD>Ⱥ<EFBFBD><C8BA>824575535
*
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݰ<EFBFBD>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɿƼ<C9BF><C6BC><EFBFBD><EFBFBD>У<EFBFBD>δ<EFBFBD><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5>;<EFBFBD><CDBE>
* <20><>ӭ<EFBFBD><D3AD>λʹ<CEBB>ò<EFBFBD><C3B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EBB1A3><EFBFBD><EFBFBD><EFBFBD>ɿƼ<C9BF><C6BC>İ<EFBFBD>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*
* @file eru
* @company <09>ɶ<EFBFBD><C9B6><EFBFBD><EFBFBD>ɿƼ<C9BF><C6BC><EFBFBD><EFBFBD>޹<EFBFBD>˾
* @author <09><><EFBFBD>ɿƼ<C9BF>(QQ3184284598)
* @version <09>鿴doc<6F><63>version<6F>ļ<EFBFBD> <20>汾˵<E6B1BE><CBB5>
* @Software ADS v1.2.2
* @Target core TC264D
* @Taobao https://seekfree.taobao.com/
* @date 2020-3-23
********************************************************************************************************************/
#ifndef _zf_eru_h
#define _zf_eru_h
#include "common.h"
typedef enum // ö<>ٴ<EFBFBD><D9B4><EFBFBD><EFBFBD><EFBFBD>ʽ
{
RISING,
FALLING,
BOTH,
}TRIGGER_enum;
typedef enum // ö<><C3B6>ERUͨ<55><CDA8>
{
//һ<><D2BB>ͨ<EFBFBD><CDA8>ֻ<EFBFBD><D6BB>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ <20>ⲿ<EFBFBD>жϵ<D0B6><CFB5><EFBFBD><EFBFBD><EFBFBD>
//<2F><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>0 <20><>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>ΪP10_7 <20><> P15_4<5F><34>
//<2F><>LQFP144<34><34>װ<EFBFBD><D7B0>û<EFBFBD><C3BB>P10_7
ERU_CH0_REQ4_P10_7 = 0*3, ERU_CH0_REQ0_P15_4, //ͨ<><CDA8>0<EFBFBD><30>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD> LQFPû<50><C3BB>P10_7<5F><37><EFBFBD><EFBFBD>
//<2F><>LQFP144<34><34>װ<EFBFBD><D7B0>û<EFBFBD><C3BB>P10_8
ERU_CH1_REQ5_P10_8 = 1*3, ERU_CH1_REQ10_P14_3, //ͨ<><CDA8>1<EFBFBD><31>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD> LQFPû<50><C3BB>P10_8<5F><38><EFBFBD><EFBFBD>
ERU_CH2_REQ7_P00_4 = 2*3, ERU_CH2_REQ14_P02_1, ERU_CH2_REQ2_P10_2, //ͨ<><CDA8>2<EFBFBD><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11_P20_9, //ͨ<><CDA8>7<EFBFBD><37>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>
}ERU_PIN_enum;
//<2F>ر<EFBFBD>ע<EFBFBD><D7A2>ͨ<EFBFBD><CDA8>2 <20><> ͨ<><CDA8>3<EFBFBD><33><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷռ<CDB7>ã<EFBFBD><C3A3><EFBFBD>ζ<EFBFBD><CEB6>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⲿ<EFBFBD>жϿɹ<CFBF><C9B9>û<EFBFBD>ʹ<EFBFBD><CAB9>
//<2F>жϱ<D0B6>־λ<D6BE><CEBB>ȡ
#define GET_GPIO_FLAG(eru_pin) IfxScuEru_getEventFlagStatus((IfxScuEru_InputChannel)(eru_pin/3))
//<2F>жϱ<D0B6>־λ<D6BE><CEBB><EFBFBD><EFBFBD>
#define CLEAR_GPIO_FLAG(eru_pin) IfxScuEru_clearEventFlag((IfxScuEru_InputChannel)(eru_pin/3))
void eru_init(ERU_PIN_enum eru_pin, TRIGGER_enum trigger);
void eru_enable_interrupt(ERU_PIN_enum eru_pin);
void eru_disable_interrupt(ERU_PIN_enum eru_pin);
#endif