mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
79 lines
4.5 KiB
C
79 lines
4.5 KiB
C
/*********************************************************************************************************************
|
||
* 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 gtm_pwm
|
||
* @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_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
|