63 lines
1.7 KiB
C
Raw Normal View History

2022-01-18 00:58:54 +08:00
/*********************************************************************************************************************
* 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 ccu6_pit
* @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_ccu6_pit_h
#define _zf_ccu6_pit_h
#include "common.h"
//<2F><>ö<EFBFBD>ٶ<EFBFBD><D9B6><EFBFBD><E5B2BB><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>޸<EFBFBD>
typedef enum //ö<><C3B6>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD>
{
CCU6_0,
CCU6_1,
}CCU6N_enum;
typedef enum //ö<><C3B6>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>
{
PIT_CH0,
PIT_CH1,
}CCU6_CHN_enum;
#define PIT_CLEAR_FLAG(ccu6n,pit_ch) IfxCcu6_clearInterruptStatusFlag(IfxCcu6_getAddress((IfxCcu6_Index)ccu6n), (IfxCcu6_InterruptSource)(7+(pit_ch*2)))
void pit_init(CCU6N_enum ccu6n, CCU6_CHN_enum pit_ch, uint32 time);
void pit_close(CCU6N_enum ccu6n, CCU6_CHN_enum pit_ch);
void pit_start(CCU6N_enum ccu6n, CCU6_CHN_enum pit_ch);
void pit_disable_interrupt(CCU6N_enum ccu6n, CCU6_CHN_enum pit_ch);
void pit_enable_interrupt(CCU6N_enum ccu6n, CCU6_CHN_enum pit_ch);
//------------------------------------<2D><><EFBFBD>´<EFBFBD><C2B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>PIT<49>ж<EFBFBD>------------------------------------
#define pit_interrupt_ms(ccu6n, pit_ch, time) pit_init(ccu6n, pit_ch, time*1000) //(<28><>λΪ <20><><EFBFBD><EFBFBD>)
#define pit_interrupt_us(ccu6n, pit_ch, time) pit_init(ccu6n, pit_ch, time) //(<28><>λΪ ΢<><CEA2>)
#endif