mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
74 lines
2.3 KiB
C
74 lines
2.3 KiB
C
|
/*********************************************************************************************************************
|
|||
|
* COPYRIGHT NOTICE
|
|||
|
* Copyright (c) 2020,<EFBFBD><EFBFBD><EFBFBD>ɿƼ<EFBFBD>
|
|||
|
* All rights reserved.
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQȺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ<EFBFBD><EFBFBD>824575535
|
|||
|
*
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݰ<EFBFBD>Ȩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɿƼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD>δ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD>;<EFBFBD><EFBFBD>
|
|||
|
* <EFBFBD><EFBFBD>ӭ<EFBFBD><EFBFBD>λʹ<EFBFBD>ò<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD>뱣<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɿƼ<EFBFBD><EFBFBD>İ<EFBFBD>Ȩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*
|
|||
|
* @file eru
|
|||
|
* @company <EFBFBD>ɶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɿƼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾
|
|||
|
* @author <EFBFBD><EFBFBD><EFBFBD>ɿƼ<EFBFBD>(QQ3184284598)
|
|||
|
* @version <EFBFBD>鿴doc<EFBFBD><EFBFBD>version<EFBFBD>ļ<EFBFBD> <EFBFBD>汾˵<EFBFBD><EFBFBD>
|
|||
|
* @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><32>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>
|
|||
|
ERU_CH3_REQ6_P02_0 = 3*3, ERU_CH3_REQ3_P10_3, ERU_CH3_REQ15_P14_1, //ͨ<><CDA8>3<EFBFBD><33>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
//ͨ<><CDA8>4<EFBFBD><34>ͨ<EFBFBD><CDA8>0 <20><><EFBFBD><EFBFBD><EFBFBD>жϺ<D0B6><CFBA><EFBFBD> <20><><EFBFBD>ж<EFBFBD><D0B6><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD>жϱ<D0B6>־λ<D6BE><CEBB>ʶ<EFBFBD><CAB6><EFBFBD><EFBFBD><EFBFBD>ĸ<EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>
|
|||
|
ERU_CH4_REQ13_P15_5 = 4*3, ERU_CH4_REQ8_P33_7, //ͨ<><CDA8>4<EFBFBD><34>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>
|
|||
|
//ͨ<><CDA8>5<EFBFBD><35>ͨ<EFBFBD><CDA8>1 <20><><EFBFBD><EFBFBD><EFBFBD>жϺ<D0B6><CFBA><EFBFBD>
|
|||
|
ERU_CH5_REQ1_P15_8 = 5*3, //ͨ<><CDA8>5<EFBFBD><35>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>
|
|||
|
//ͨ<><CDA8>6<EFBFBD><36>ͨ<EFBFBD><CDA8>2 <20><><EFBFBD><EFBFBD><EFBFBD>жϺ<D0B6><CFBA><EFBFBD>
|
|||
|
ERU_CH6_REQ12_P11_10 = 6*3, ERU_CH6_REQ9_P20_0, //ͨ<><CDA8>6<EFBFBD><36>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>
|
|||
|
//ͨ<><CDA8>7<EFBFBD><37>ͨ<EFBFBD><CDA8>3 <20><><EFBFBD><EFBFBD><EFBFBD>жϺ<D0B6><CFBA><EFBFBD>
|
|||
|
ERU_CH7_REQ16_P15_1 = 7*3, ERU_CH7_REQ11_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
|