cdc32xxg-c2-pm.h
来自「最新版IAR FOR ARM(EWARM)5.11中的代码例子」· C头文件 代码 · 共 558 行
H
558 行
/*
**************************************************************************
** Copyright(C) Micronas GmbH
** This program is the property of Micronas GmbH. Its contents is proprietary
** information and is not to be reproduced in whole or part by any means or is
** to be disclosed to anyone except employees of Micronas GmbH, or as agreed in
** writing signed by an authorized person of Micronas GmbH.
** The software is delivered "AS IS" without warranty or condition of any
** kind, either express, implied or statutory. This includes without
** limitation any warranty or condition with respect to merchantability or
** fitness for any particular purpose, or against the infringements of
** intellectual property rights of others.
** -----------------------------------------------------------------------
**
** file: cdc32xxG-c2-pm.h
**
** description: port mapping definition for CDC32xxG-C2 special function ports
**
** Some special functions are availables at several ports.
** Then one port is defined in this file and the remaining
** port definitions are commented out, e.g.:
**
** #define P_CO0 7 // CO0 @ U7.7
** #define B_CO0 BIT_7
** // #define P_CO0 1 // CO0 @ U1.6
** // #define B_CO0 BIT_6
** // #define P_CO0 3 // CO0 @ U3.3
** // #define B_CO0 BIT_3
**
** In this case this header file must be adapted according
** to the usage of the ports in the application.
**
** -----------------------------------------------------------------------
** author: Erwin Bruechig, July 29, 2003
** modified: -
** Version: V0.01
**************************************************************************
*/
#ifndef __CDC32XXG_C2_PM_H
#define __CDC32XXG_C2_PM_H
/*======================================================================*/
/* definitions */
/*======================================================================*/
//-----------------------------------------------------------------------
// Bit Definitions
//-----------------------------------------------------------------------
#define BIT_31 0x80000000
#define BIT_30 0x40000000
#define BIT_29 0x20000000
#define BIT_28 0x10000000
#define BIT_27 0x08000000
#define BIT_26 0x04000000
#define BIT_25 0x02000000
#define BIT_24 0x01000000
#define BIT_23 0x800000
#define BIT_22 0x400000
#define BIT_21 0x200000
#define BIT_20 0x100000
#define BIT_19 0x080000
#define BIT_18 0x040000
#define BIT_17 0x020000
#define BIT_16 0x010000
#define BIT_15 0x8000
#define BIT_14 0x4000
#define BIT_13 0x2000
#define BIT_12 0x1000
#define BIT_11 0x0800
#define BIT_10 0x0400
#define BIT_9 0x0200
#define BIT_8 0x0100
#define BIT_7 0x80
#define BIT_6 0x40
#define BIT_5 0x20
#define BIT_4 0x10
#define BIT_3 0x08
#define BIT_2 0x04
#define BIT_1 0x02
#define BIT_0 0x01
//----------------------------------------------------------------------
// Port and bit definition for special functions
// P_... defines port
// B_... defines bit position
//-----------------------------------------------------------------------
// U3
#define P_CC1_OUT 3 // CC1-OUT -> U3.1
#define B_CC1_OUT BIT_1
#define P_CC1_IN 3 // CC1-IN -> U3.1
#define B_CC1_IN BIT_1
#define P_TMS 3 // TMS -> U3.1
#define B_TMS BIT_1
#define P_CC2_OUT 3
#define B_CC2_OUT BIT_0
//#define P_CC2_IN 3
//#define B_CC2_IN BIT_0
#define P_TDI 3
#define B_TDI BIT_0
// U2
#define P_DIGIT_OUT 2
#define B_DIGIT_OUT BIT_6
#define P_DIGIT_IN 2
#define B_DIGIT_IN BIT_6
// #define P_CC1_OUT 2
// #define B_CC1_OUT BIT_5
#define P_UART0_RX 2
#define B_UART0_RX BIT_5
#define P_UART0_TX 2
#define B_UART0_TX BIT_4
// #define P_DIGIT_IN 2
// #define B_DIGIT_IN BIT_4
// #define P_CC1_IN 2
// #define B_CC1_IN BIT_4
// #define P_CC2_OUT 2
// #define B_CC2_OUT BIT_3
#define P_UART1_RX 2
#define B_UART1_RX BIT_3
#define P_UART1_TX 2
#define B_UART1_TX BIT_2
#define P_CC2_IN 2
#define B_CC2_IN BIT_2
// U7
#define P_CO0 7
#define B_CO0 BIT_7
#define P_CO1 7
#define B_CO1 BIT_6
#define P_LCK 7
#define B_LCK BIT_5
#define P_CC5_OUT 7
#define B_CC5_OUT BIT_4
#define P_CC5_IN 7
#define B_CC5_IN BIT_4
// U5
// #define P_CC4_OUT 5
// #define B_CC4_OUT BIT_3
#define P_CC4_IN 5
#define B_CC4_IN BIT_3
#define P_SDA1 5
#define B_SDA1 BIT_2
#define P_SCL1 5
#define B_SCL1 BIT_1
#define P_PFM0 5
#define B_PFM0 BIT_0
// U2
#define P_SDA0 2
#define B_SDA0 BIT_1
#define P_WP6 2
#define B_WP6 BIT_1
//#define P_CAN0_RX 2
//#define B_CAN0_RX BIT_1
#define P_SCL0 2
#define B_SCL0 BIT_0
//#define P_CAN0_TX 2
//#define B_CAN0_TX BIT_0
// U1
// #define P_PFM0 1
// #define B_PFM0 BIT_7
#define P_PINT0 1
#define B_PINT0 BIT_7
#define P_PINT0_IN P_PINT0 // to be compatible with CDC16xxF
#define B_PINT0_IN B_PINT0
#define P_WP0 1
#define B_WP0 BIT_7
#define P_INTRES 1
#define B_INTRES BIT_6
// #define P_CO0 1
// #define B_CO0 BIT_6
#define P_PINT1 1
#define B_PINT1 BIT_6
#define P_PINT1_IN P_PINT1 // to be compatible with CDC16xxF
#define B_PINT1_IN B_PINT1
// #define P_CO1 1
// #define B_CO1 BIT_5
#define P_CO0Q 1
#define B_CO0Q BIT_5
#define P_PINT2 1
#define B_PINT2 BIT_5
#define P_PINT2_IN P_PINT2 // to be compatible with CDC16xxF
#define B_PINT2_IN B_PINT2
#define P_ITSTOUT 1
#define B_ITSTOUT BIT_4
#define P_AM_OUT 1
#define B_AM_OUT BIT_4
#define P_MTO 1
#define B_MTO BIT_3
#define P_AM_PWM 1
#define B_AM_PWM BIT_3
#define P_WP3 1
#define B_WP3 BIT_3
// #define P_INTRES 1
// #define B_INTRES BIT_2
#define P_T0_OUT 1
#define B_T0_OUT BIT_2
#define P_MTI 1
#define B_MTI BIT_2
#define P_ITSTIN 1
#define B_ITSTIN BIT_2
#define P_T1_OUT 1
#define B_T1_OUT BIT_1
#define P_T2_OUT 1
#define B_T2_OUT BIT_0
// U0
#define P_T3_OUT 0
#define B_T3_OUT BIT_7
#define P_WP4 0
#define B_WP4 BIT_7
// #define P_CC3_OUT 0
// #define B_CC3_OUT BIT_6
#define P_T4_OUT 0
#define B_T4_OUT BIT_6
#define P_CC3_IN 0
#define B_CC3_IN BIT_6
// #define P_CC3_OUT 0
// #define B_CC3_OUT BIT_5
#define P_PINT4 0
#define B_PINT4 BIT_5
// #define P_CO1 0
// #define B_CO1 BIT_4
#define P_PINT5 0
#define B_PINT5 BIT_4
#define P_PWM0 0
#define B_PWM0 BIT_3
#define P_PWM1 0
#define B_PWM1 BIT_2
#define P_PWM2 0
#define B_PWM2 BIT_1
#define P_PWM3 0
#define B_PWM3 BIT_0
// H7
#define P_SME1P 7
#define B_SME1P BIT_3
#define P_PWM4 7
#define B_PWM4 BIT_3
#define P_SME_COMP3 7
#define B_SME_COMP3 BIT_3
#define P_SME1M 7
#define B_SME1M BIT_2
#define P_PWM6 7
#define B_PWM6 BIT_2
#define P_SME_COMP2 7
#define B_SME_COMP2 BIT_2
#define P_SME2P 7
#define B_SME2P BIT_1
// #define P_PWM8 7
// #define B_PWM8 BIT_1
#define P_SME_COMP1 7
#define B_SME_COMP1 BIT_1
#define P_SME2M 7
#define B_SME2M BIT_0
// #define P_PWM9 7
// #define B_PWM9 BIT_0
#define P_SME_COMP0 7
#define B_SME_COMP0 BIT_0
#define P_SME 7 // common port for all SME outputs
// H6
#define P_PWM8 6
#define B_PWM8 BIT_3
#define P_PWM9 6
#define B_PWM9 BIT_2
#define P_PWM10 6
#define B_PWM10 BIT_1
#define P_PWM11 6
#define B_PWM11 BIT_0
// H5
#define P_SMD1P 5
#define B_SMD1P BIT_3
#define P_SMD_COMP3 5
#define B_SMD_COMP3 BIT_3
#define P_SMD1M 5
#define B_SMD1M BIT_2
#define P_SMD_COMP2 5
#define B_SMD_COMP2 BIT_2
#define P_SMD2P 5
#define B_SMD2P BIT_1
#define P_SMD_COMP1 5
#define B_SMD_COMP1 BIT_1
#define P_SMD2M 5
#define B_SMD2M BIT_0
#define P_SMD_COMP0 5
#define B_SMD_COMP0 BIT_0
#define P_SMD 5 // common port for all SMD outputs
// H4
#define P_SMA1P 4
#define B_SMA1P BIT_3
#define P_SMA_COMP3 4
#define B_SMA_COMP3 BIT_3
#define P_SMA1M 4
#define B_SMA1M BIT_2
#define P_SMA_COMP2 4
#define B_SMA_COMP2 BIT_2
#define P_SMA2P 4
#define B_SMA2P BIT_1
#define P_SMA2_COMP1 4
#define B_SMA2_COMP1 BIT_1
#define P_SMA2M 4
#define B_SMA2M BIT_0
#define P_SMA_COMP0 4
#define B_SMA_COMP0 BIT_0
#define P_SMA 4 // common port for all SMA outputs
// H3
#define P_SMB1P 3
#define B_SMB1P BIT_3
#define P_SMB_COMP3 3
#define B_SMB_COMP3 BIT_3
#define P_SMB1M 3
#define B_SMB1M BIT_2
#define P_SMB_COMP2 3
#define B_SMB_COMP2 BIT_2
#define P_SMB2P 3
#define B_SMB2P BIT_1
#define P_SMB_COMP1 3
#define B_SMB_COMP1 BIT_1
#define P_SMB2M 3
#define B_SMB2M BIT_0
#define P_SMB_COMP0 3
#define B_SMB_COMP0 BIT_0
#define P_SMB 3 // common port for all SMB outputs
// H2
#define P_SMC1P 2
#define B_SMC1P BIT_3
#define P_SMC_COMP3 2
#define B_SMC_COMP3 BIT_3
#define P_SMC1M 2
#define B_SMC1M BIT_2
#define P_SMC_COMP2 2
#define B_SMC_COMP2 BIT_2
#define P_SMC2P 2
#define B_SMC2P BIT_1
#define P_SMC_COMP1 2
#define B_SMC_COMP1 BIT_1
#define P_SMC2M 2
#define B_SMC2M BIT_0
#define P_SMC_COMP0 2
#define B_SMC_COMP0 BIT_0
#define P_SMC 2 // common port for all SMC outputs
// H1
#define P_SMF1P 1
#define B_SMF1P BIT_3
#define P_SMF_COMP3 1
#define B_SMF_COMP3 BIT_3
#define P_SMF1M 1
#define B_SMF1M BIT_2
#define P_SMF_COMP2 1
#define B_SMF_COMP2 BIT_2
#define P_SMF2P 1
#define B_SMF2P BIT_1
#define P_SMF_COMP1 1
#define B_SMF_COMP1 BIT_1
#define P_SMF2M 1
#define B_SMF2M BIT_0
#define P_SMF_COMP0 1
#define B_SMF_COMP0 BIT_0
#define P_SMF 1 // common port for all SMF outputs
// H0
#define P_SMG1P 0
#define B_SMG1P BIT_3
// #define P_PWM1 0
// #define B_PWM1 BIT_3
#define P_SMG_COMP3 0
#define B_SMG_COMP3 BIT_3
#define P_SMG1M 0
#define B_SMG1M BIT_2
// #define P_PWM3 0
// #define B_PWM3 BIT_2
#define P_POL 0
#define B_POL BIT_2
#define P_SMG_COMP2 0
#define B_SMG_COMP2 BIT_2
#define P_SMG2P 0
#define B_SMG2P BIT_1
#define P_PWM5 0
#define B_PWM5 BIT_1
#define P_SMG_COMP1 0
#define B_SMG_COMP1 BIT_1
#define P_SMG2M 0
#define B_SMG2M BIT_0
#define P_PWM7 0
#define B_PWM7 BIT_0
#define P_SMG_COMP0 0
#define B_SMG_COMP0 BIT_0
#define P_SMG 0 // common port for all SMG outputs
// U6
#define P_GWEQ 6
#define B_GWEQ BIT_2
#define P_CAN1_RX 6
#define B_CAN1_RX BIT_1
#define P_WP7 6
#define B_WP7 BIT_1
#define P_GOEQ 6
#define B_GOEQ BIT_1
#define P_CAN1_TX 6
#define B_CAN1_TX BIT_0
// U8
#define P_CAN2_RX 8
#define B_CAN2_RX BIT_5
#define P_PINT3 8
#define B_PINT3 BIT_5
#define P_PINT3_IN P_PINT3 // to be compatible with CDC16xxF
#define B_PINT3_IN B_PINT3
#define P_WP8 8
#define B_WP8 BIT_5
#define P_LCD_SYNC_OUT 8
#define B_LCD_SYNC_OUT BIT_5
#define P_LCD_SYNC_IN 8
#define B_LCD_SYNC_IN BIT_4
#define P_CAN2_TX 8
#define B_CAN2_TX BIT_4
#define P_CAN3_RX 8
#define B_CAN3_RX BIT_3
#define P_WP9 8
#define B_WP9 BIT_3
#define P_LCD_CLK_OUT 8
#define B_LCD_CLK_OUT BIT_3
#define P_LCD_CLK_IN 8
#define B_LCD_CLK_IN BIT_2
#define P_CAN3_TX 8
#define B_CAN3_TX BIT_2
#define P_CC3_OUT 8
#define B_CC3_OUT BIT_1
#define P_CC4_OUT 8
#define B_CC4_OUT BIT_0
// U4
#define P_CAN0_RX 4
#define B_CAN0_RX BIT_3
#define P_WP5 4
#define B_WP5 BIT_3
#define P_TO2 4
#define B_TO2 BIT_3
#define P_CAN0_TX 4
#define B_CAN0_TX BIT_2
// #define P_CC0_IN 4
// #define B_CC0_IN BIT_1
#define P_SPI1_D_OUT 4
#define B_SPI1_D_OUT BIT_1
#define P_SPI1_D_IN 4
#define B_SPI1_D_IN BIT_0
#define P_CC0_OUT 4
#define B_CC0_OUT BIT_0
// U3
#define P_SPI1_CLK_IN 3
#define B_SPI1_CLK_IN BIT_7
#define P_SPI1_CLK_OUT 3
#define B_SPI1_CLK_OUT BIT_7
#define P_SPI0_D_OUT 3
#define B_SPI0_D_OUT BIT_6
#define P_SPI0_D_IN 3
#define B_SPI0_D_IN BIT_5
#define P_TO3 3
#define B_TO3 BIT_5
#define P_SPI0_CLK_IN 3
#define B_SPI0_CLK_IN BIT_4
#define P_SPI0_CLK_OUT 3
#define B_SPI0_CLK_OUT BIT_4
// #define P_CO0 3
// #define B_CO0 BIT_3
#define P_TDO 3
#define B_TDO BIT_3
#define P_CC0_IN 3
#define B_CC0_IN BIT_2
#define P_TCK 3
#define B_TCK BIT_2
// #define P_CC0_OUT 3
// #define B_CC0_OUT BIT_2
//------------------------------------------------------------------------
#endif /* ifndef __CDC32XXG_C2_PM_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?