79 lines
4.5 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 gtm_pwm
* @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_gtm_pwm_h
#define _zf_gtm_pwm_h
#include "common.h"
#include "ifxGtm_PinMap.h"
#define GTM_ATOM0_PWM_DUTY_MAX 10000 //GTM_ATOM0 PWM<57><4D><EFBFBD><EFBFBD>ռ<EFBFBD>ձ<EFBFBD> <20><><EFBFBD><EFBFBD>ռ<EFBFBD>ձ<EFBFBD>Խ<EFBFBD><D4BD>ռ<EFBFBD>ձȵIJ<C8B5><C4B2><EFBFBD>ֵԽС
#define GTM_ATOM1_PWM_DUTY_MAX 10000 //GTM_ATOM1 PWM<57><4D><EFBFBD><EFBFBD>ռ<EFBFBD>ձ<EFBFBD> <20><><EFBFBD><EFBFBD>ռ<EFBFBD>ձ<EFBFBD>Խ<EFBFBD><D4BD>ռ<EFBFBD>ձȵIJ<C8B5><C4B2><EFBFBD>ֵԽС
#define GTM_ATOM2_PWM_DUTY_MAX 10000 //GTM_ATOM2 PWM<57><4D><EFBFBD><EFBFBD>ռ<EFBFBD>ձ<EFBFBD> <20><><EFBFBD><EFBFBD>ռ<EFBFBD>ձ<EFBFBD>Խ<EFBFBD><D4BD>ռ<EFBFBD>ձȵIJ<C8B5><C4B2><EFBFBD>ֵԽС
#define GTM_ATOM3_PWM_DUTY_MAX 10000 //GTM_ATOM3 PWM<57><4D><EFBFBD><EFBFBD>ռ<EFBFBD>ձ<EFBFBD> <20><><EFBFBD><EFBFBD>ռ<EFBFBD>ձ<EFBFBD>Խ<EFBFBD><D4BD>ռ<EFBFBD>ձȵIJ<C8B5><C4B2><EFBFBD>ֵԽС
//<2F><>ö<EFBFBD>ٶ<EFBFBD><D9B6><EFBFBD><E5B2BB><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>޸<EFBFBD>
typedef enum //ö<>ٴ<EFBFBD><D9B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
{
ATOM0_CH0_P00_0, ATOM0_CH0_P02_0, ATOM0_CH0_P02_8, ATOM0_CH0_P14_5, ATOM0_CH0_P21_2, ATOM0_CH0_P22_1,
ATOM0_CH1_P00_1, ATOM0_CH1_P00_2, ATOM0_CH1_P02_1, ATOM0_CH1_P10_1, ATOM0_CH1_P14_4, ATOM0_CH1_P21_3, ATOM0_CH1_P22_0, ATOM0_CH1_P33_9,
ATOM0_CH2_P00_3, ATOM0_CH2_P02_2, ATOM0_CH2_P10_2, ATOM0_CH2_P10_5, ATOM0_CH2_P14_3, ATOM0_CH2_P21_4, ATOM0_CH2_P33_11,
ATOM0_CH3_P00_4, ATOM0_CH3_P02_3, ATOM0_CH3_P10_3, ATOM0_CH3_P10_6, ATOM0_CH3_P14_2, ATOM0_CH3_P21_5, ATOM0_CH3_P22_2,
ATOM0_CH4_P00_5, ATOM0_CH4_P02_4, ATOM0_CH4_P14_1, ATOM0_CH4_P20_3, ATOM0_CH4_P21_6, ATOM0_CH4_P22_3,
ATOM0_CH5_P00_6, ATOM0_CH5_P02_5, ATOM0_CH5_P21_7, ATOM0_CH5_P32_4,
ATOM0_CH6_P00_7, ATOM0_CH6_P02_6, ATOM0_CH6_P20_0, ATOM0_CH6_P23_1,
ATOM0_CH7_P00_8, ATOM0_CH7_P02_7, ATOM0_CH7_P20_8,
ATOM1_CH0_P00_0, ATOM1_CH0_P02_0, ATOM1_CH0_P02_8, ATOM1_CH0_P15_5, ATOM1_CH0_P15_6, ATOM1_CH0_P20_12, ATOM1_CH0_P21_2, ATOM1_CH0_P22_1,
ATOM1_CH1_P00_1, ATOM1_CH1_P00_2, ATOM1_CH1_P02_1, ATOM1_CH1_P10_1, ATOM1_CH1_P14_6, ATOM1_CH1_P15_7, ATOM1_CH1_P15_8, ATOM1_CH1_P20_13, ATOM1_CH1_P21_3, ATOM1_CH1_P22_0, ATOM1_CH1_P33_9,
ATOM1_CH2_P00_3, ATOM1_CH2_P02_2, ATOM1_CH2_P10_2, ATOM1_CH2_P10_5, ATOM1_CH2_P14_0, ATOM1_CH2_P20_14, ATOM1_CH2_P21_4, ATOM1_CH2_P33_11,
ATOM1_CH3_P00_4, ATOM1_CH3_P02_3, ATOM1_CH3_P10_3, ATOM1_CH3_P10_6, ATOM1_CH3_P15_0, ATOM1_CH3_P21_5, ATOM1_CH3_P22_2,
ATOM1_CH4_P00_5, ATOM1_CH4_P02_4, ATOM1_CH4_P15_1, ATOM1_CH4_P20_3, ATOM1_CH4_P21_6, ATOM1_CH4_P22_3,
ATOM1_CH5_P00_6, ATOM1_CH5_P02_5, ATOM1_CH5_P15_2, ATOM1_CH5_P20_9, ATOM1_CH5_P21_7, ATOM1_CH5_P32_4,
ATOM1_CH6_P00_7, ATOM1_CH6_P02_6, ATOM1_CH6_P15_3, ATOM1_CH6_P20_0, ATOM1_CH6_P20_10, ATOM1_CH6_P23_1,
ATOM1_CH7_P00_8, ATOM1_CH7_P02_7, ATOM1_CH7_P15_4, ATOM1_CH7_P20_11,
ATOM2_CH0_P00_9, ATOM2_CH0_P13_3, ATOM2_CH0_P20_12, ATOM2_CH0_P33_4, ATOM2_CH0_P33_10,
ATOM2_CH1_P11_2, ATOM2_CH1_P20_13, ATOM2_CH1_P33_5,
ATOM2_CH2_P11_3, ATOM2_CH2_P20_14, ATOM2_CH2_P33_6,
ATOM2_CH3_P00_12, ATOM2_CH3_P11_6, ATOM2_CH3_P15_0, ATOM2_CH3_P33_7,
ATOM2_CH4_P11_9, ATOM2_CH4_P15_1, ATOM2_CH4_P33_8, ATOM2_CH4_P33_12,
ATOM2_CH5_P11_10, ATOM2_CH5_P13_0, ATOM2_CH5_P15_2, ATOM2_CH5_P20_9, ATOM2_CH5_P33_13,
ATOM2_CH6_P11_11, ATOM2_CH6_P13_1, ATOM2_CH6_P15_3, ATOM2_CH6_P20_6, ATOM2_CH6_P20_10, ATOM2_CH6_P32_0,
ATOM2_CH7_P11_12, ATOM2_CH7_P13_2, ATOM2_CH7_P15_4, ATOM2_CH7_P20_7, ATOM2_CH7_P20_8, ATOM2_CH7_P20_11,
ATOM3_CH0_P00_9, ATOM3_CH0_P13_3, ATOM3_CH0_P14_5, ATOM3_CH0_P15_5, ATOM3_CH0_P15_6, ATOM3_CH0_P33_4, ATOM3_CH0_P33_10,
ATOM3_CH1_P11_2, ATOM3_CH1_P14_4, ATOM3_CH1_P14_6, ATOM3_CH1_P15_7, ATOM3_CH1_P15_8, ATOM3_CH1_P33_5,
ATOM3_CH2_P11_3, ATOM3_CH2_P14_0, ATOM3_CH2_P14_3, ATOM3_CH2_P33_6,
ATOM3_CH3_P00_12, ATOM3_CH3_P11_6, ATOM3_CH3_P14_2, ATOM3_CH3_P33_7,
ATOM3_CH4_P11_9, ATOM3_CH4_P14_1, ATOM3_CH4_P33_8, ATOM3_CH4_P33_12,
ATOM3_CH5_P11_10, ATOM3_CH5_P13_0, ATOM3_CH5_P33_13,
ATOM3_CH6_P11_11, ATOM3_CH6_P13_1, ATOM3_CH6_P20_6, ATOM3_CH6_P32_0,
ATOM3_CH7_P11_12, ATOM3_CH7_P13_2, ATOM3_CH7_P20_7,
}ATOM_PIN_enum;
void gtm_pwm_init(ATOM_PIN_enum pwmch, uint32 freq, uint32 duty);
void pwm_duty(ATOM_PIN_enum pwmch, uint32 duty);
#endif