ARC-GLC_IODefine.h 7.74 KB
/*******************************************************************************
* Function Name  : _ARC_GLC_IODEFINE_H_
* Description    : Define ARC_GLC_IO initial
* Input          : Ë«ÏòDZ·üʽ
* Output         :
* Return         : 
*******************************************************************************/

#ifndef _ARC_GLC_IODEFINE_H_
#define _ARC_GLC_IODEFINE_H_

#include <stm32f4xx.h>

/***************************************
INPUT24V_PIN:

******************************************/

//---------------------------------------------------
#define INPUT24V1_PIN			GPIO_Pin_7  
#define INPUT24V1_PORT			GPIOI

#define INPUT24V2_PIN			GPIO_Pin_6 
#define INPUT24V2_PORT			GPIOI

#define INPUT24V3_PIN			GPIO_Pin_5 	
#define INPUT24V3_PORT			GPIOI

#define INPUT24V4_PIN			GPIO_Pin_4  
#define INPUT24V4_PORT			GPIOI

#define INPUT24V5_PIN			GPIO_Pin_1  
#define INPUT24V5_PORT			GPIOE

#define INPUT24V6_PIN			GPIO_Pin_0	
#define INPUT24V6_PORT			GPIOE

#define INPUT24V7_PIN			GPIO_Pin_9	
#define INPUT24V7_PORT			GPIOB

#define INPUT24V8_PIN			GPIO_Pin_8	
#define INPUT24V8_PORT			GPIOB

#define INPUT24V9_PIN			GPIO_Pin_7	
#define INPUT24V9_PORT			GPIOB

#define INPUT24V10_PIN		GPIO_Pin_4	
#define INPUT24V10_PORT			GPIOB

#define INPUT24V11_PIN		GPIO_Pin_15  
#define INPUT24V11_PORT			GPIOG

#define INPUT24V12_PIN		GPIO_Pin_13	
#define INPUT24V12_PORT			GPIOG

#define INPUT24V13_PIN		GPIO_Pin_12	
#define INPUT24V13_PORT			GPIOG

#define INPUT24V14_PIN		GPIO_Pin_11	
#define INPUT24V14_PORT			GPIOG

#define INPUT24V15_PIN		GPIO_Pin_10	
#define INPUT24V15_PORT			GPIOG

#define INPUT24V16_PIN		GPIO_Pin_7	
#define INPUT24V16_PORT			GPIOD

#define INPUT24V17_PIN		GPIO_Pin_4	
#define INPUT24V17_PORT			GPIOD

#define INPUT24V18_PIN		GPIO_Pin_3 
#define INPUT24V18_PORT			GPIOD

#define INPUT24V19_PIN		GPIO_Pin_1 	
#define INPUT24V19_PORT			GPIOD

#define INPUT24V20_PIN		GPIO_Pin_0	
#define INPUT24V20_PORT			GPIOD

#define INPUT24V21_PIN		GPIO_Pin_15	
#define INPUT24V21_PORT			GPIOA

#define INPUT24V22_PIN		GPIO_Pin_3	
#define INPUT24V22_PORT			GPIOI

#define INPUT24V23_PIN		GPIO_Pin_2	
#define INPUT24V23_PORT			GPIOI

#define INPUT24V24_PIN		GPIO_Pin_1	
#define INPUT24V24_PORT			GPIOI

#define INPUT24V25_PIN		GPIO_Pin_0  
#define INPUT24V25_PORT			GPIOI

#define INPUT24V26_PIN		GPIO_Pin_15
#define INPUT24V26_PORT			GPIOH

#define INPUT24V27_PIN		GPIO_Pin_14	
#define INPUT24V27_PORT			GPIOH

#define INPUT24V28_PIN		GPIO_Pin_13	
#define INPUT24V28_PORT			GPIOH

#define INPUT24V29_PIN		GPIO_Pin_9	
#define INPUT24V29_PORT			GPIOC

#define INPUT24V30_PIN		GPIO_Pin_8	
#define INPUT24V30_PORT			GPIOG

#define INPUT24V31_PIN		GPIO_Pin_7	
#define INPUT24V31_PORT			GPIOG

#define INPUT24V32_PIN		GPIO_Pin_6	
#define INPUT24V32_PORT			GPIOG

#define INPUT24V33_PIN		GPIO_Pin_5	
#define INPUT24V33_PORT			GPIOG

#define INPUT24V34_PIN		GPIO_Pin_4	
#define INPUT24V34_PORT			GPIOG

#define INPUT24V35_PIN		GPIO_Pin_3	
#define INPUT24V35_PORT			GPIOG

#define INPUT24V36_PIN		GPIO_Pin_2	
#define INPUT24V36_PORT			GPIOG

#define INPUT24V37_PIN		GPIO_Pin_15	
#define INPUT24V37_PORT			GPIOD

#define INPUT24V38_PIN		GPIO_Pin_14	
#define INPUT24V38_PORT			GPIOD

#define INPUT24V39_PIN		GPIO_Pin_11	
#define INPUT24V39_PORT			GPIOD

#define INPUT24V40_PIN		GPIO_Pin_10	
#define INPUT24V40_PORT			GPIOD


/*********************************************
OUTPUT24V_PIN:

**********************************************/
//---------------------------------------------------
#define OUTPUT24V1_PIN			GPIO_Pin_2		
#define OUTPUT24V1_PORT			GPIOH

#define OUTPUT24V2_PIN			GPIO_Pin_3		
#define OUTPUT24V2_PORT			GPIOH

#define OUTPUT24V3_PIN			GPIO_Pin_4		
#define OUTPUT24V3_PORT			GPIOH

#define OUTPUT24V4_PIN			GPIO_Pin_5		
#define OUTPUT24V4_PORT			GPIOH

#define OUTPUT24V5_PIN			GPIO_Pin_3		
#define OUTPUT24V5_PORT			GPIOA

#define OUTPUT24V6_PIN			GPIO_Pin_4		
#define OUTPUT24V6_PORT			GPIOA

#define OUTPUT24V7_PIN			GPIO_Pin_5		
#define OUTPUT24V7_PORT			GPIOA

#define OUTPUT24V8_PIN			GPIO_Pin_0      
#define OUTPUT24V8_PORT			GPIOB

#define OUTPUT24V9_PIN			GPIO_Pin_1     
#define OUTPUT24V9_PORT			GPIOB

#define OUTPUT24V10_PIN			GPIO_Pin_11     
#define OUTPUT24V10_PORT		GPIOF

#define OUTPUT24V11_PIN			GPIO_Pin_12     
#define OUTPUT24V11_PORT		GPIOF

#define OUTPUT24V12_PIN			GPIO_Pin_13     
#define OUTPUT24V12_PORT		GPIOF

#define OUTPUT24V13_PIN			GPIO_Pin_14     
#define OUTPUT24V13_PORT		GPIOF

#define OUTPUT24V14_PIN			GPIO_Pin_15    
#define OUTPUT24V14_PORT		GPIOF

#define OUTPUT24V15_PIN			GPIO_Pin_0     
#define OUTPUT24V15_PORT		GPIOG

#define OUTPUT24V16_PIN			GPIO_Pin_1     
#define OUTPUT24V16_PORT		GPIOG

#define OUTPUT24V17_PIN			GPIO_Pin_7   
#define OUTPUT24V17_PORT		GPIOE

#define OUTPUT24V18_PIN			GPIO_Pin_8    
#define OUTPUT24V18_PORT		GPIOE

#define OUTPUT24V19_PIN			GPIO_Pin_9   
#define OUTPUT24V19_PORT		GPIOE

#define OUTPUT24V20_PIN			GPIO_Pin_10   
#define OUTPUT24V20_PORT		GPIOE

#define OUTPUT24V21_PIN			GPIO_Pin_12     
#define OUTPUT24V21_PORT		GPIOE

#define OUTPUT24V22_PIN			GPIO_Pin_13    
#define OUTPUT24V22_PORT		GPIOE

#define OUTPUT24V23_PIN			GPIO_Pin_14     
#define OUTPUT24V23_PORT		GPIOE

#define OUTPUT24V24_PIN			GPIO_Pin_15     
#define OUTPUT24V24_PORT		GPIOE

#define OUTPUT24V25_PIN			GPIO_Pin_7   
#define OUTPUT24V25_PORT		GPIOH

#define OUTPUT24V26_PIN			GPIO_Pin_8    
#define OUTPUT24V26_PORT		GPIOH

#define OUTPUT24V27_PIN			GPIO_Pin_9  
#define OUTPUT24V27_PORT		GPIOH

#define OUTPUT24V28_PIN			GPIO_Pin_11   
#define OUTPUT24V28_PORT		GPIOH
/******************************************************/


static GPIO_TypeDef* INPUT24V_PORT_List[40] =
{
	INPUT24V1_PORT,
	INPUT24V2_PORT,
	INPUT24V3_PORT,
	INPUT24V4_PORT,
	INPUT24V5_PORT,
	INPUT24V6_PORT,
	INPUT24V7_PORT,
	INPUT24V8_PORT,
	INPUT24V9_PORT,
	INPUT24V10_PORT,
	INPUT24V11_PORT,
	INPUT24V12_PORT,
	INPUT24V13_PORT,
	INPUT24V14_PORT,
	INPUT24V15_PORT,
	INPUT24V16_PORT,
	INPUT24V17_PORT,
	INPUT24V18_PORT,
	INPUT24V19_PORT,
	INPUT24V20_PORT,
	INPUT24V21_PORT,
	INPUT24V22_PORT,
	INPUT24V23_PORT,
	INPUT24V24_PORT,
	INPUT24V25_PORT,
	INPUT24V26_PORT,
	INPUT24V27_PORT,
	INPUT24V28_PORT,
	INPUT24V29_PORT,
	INPUT24V30_PORT,
	INPUT24V31_PORT,
	INPUT24V32_PORT,
	INPUT24V33_PORT,
	INPUT24V34_PORT,
	INPUT24V35_PORT,
	INPUT24V36_PORT,
	INPUT24V37_PORT,
	INPUT24V38_PORT,
	INPUT24V39_PORT,
	INPUT24V40_PORT
};

static uint16_t INPUT24V_PIN_List[40] =
{
	INPUT24V1_PIN,
	INPUT24V2_PIN,
	INPUT24V3_PIN,
	INPUT24V4_PIN,
	INPUT24V5_PIN,
	INPUT24V6_PIN,
	INPUT24V7_PIN,
	INPUT24V8_PIN,
	INPUT24V9_PIN,
	INPUT24V10_PIN,
	INPUT24V11_PIN,
	INPUT24V12_PIN,
	INPUT24V13_PIN,
	INPUT24V14_PIN,
	INPUT24V15_PIN,
	INPUT24V16_PIN,
	INPUT24V17_PIN,
	INPUT24V18_PIN,
	INPUT24V19_PIN,
	INPUT24V20_PIN,
	INPUT24V21_PIN,
	INPUT24V22_PIN,
	INPUT24V23_PIN,
	INPUT24V24_PIN,
	INPUT24V25_PIN,
	INPUT24V26_PIN,
	INPUT24V27_PIN,
	INPUT24V28_PIN,
	INPUT24V29_PIN,
	INPUT24V30_PIN,
	INPUT24V31_PIN,
	INPUT24V32_PIN,
	INPUT24V33_PIN,
	INPUT24V34_PIN,
	INPUT24V35_PIN,
	INPUT24V36_PIN,
	INPUT24V37_PIN,
	INPUT24V38_PIN,
	INPUT24V39_PIN,
	INPUT24V40_PIN
};

static GPIO_TypeDef* OUTPUT24V_PORT_List[28] =
{
	OUTPUT24V1_PORT,
	OUTPUT24V2_PORT,
	OUTPUT24V3_PORT,
	OUTPUT24V4_PORT,
	OUTPUT24V5_PORT,
	OUTPUT24V6_PORT,
	OUTPUT24V7_PORT,
	OUTPUT24V8_PORT,
	OUTPUT24V9_PORT,
	OUTPUT24V10_PORT,
	OUTPUT24V11_PORT,
	OUTPUT24V12_PORT,
	OUTPUT24V13_PORT,
	OUTPUT24V14_PORT,
	OUTPUT24V15_PORT,
	OUTPUT24V16_PORT,
	OUTPUT24V17_PORT,
	OUTPUT24V18_PORT,
	OUTPUT24V19_PORT,
	OUTPUT24V20_PORT
};

static uint16_t OUTPUT24V_PIN_List[28] =
{
	OUTPUT24V1_PIN,
	OUTPUT24V2_PIN,
	OUTPUT24V3_PIN,
	OUTPUT24V4_PIN,
	OUTPUT24V5_PIN,
	OUTPUT24V6_PIN,
	OUTPUT24V7_PIN,
	OUTPUT24V8_PIN,
	OUTPUT24V9_PIN,
	OUTPUT24V10_PIN,
	OUTPUT24V11_PIN,
	OUTPUT24V12_PIN,
	OUTPUT24V13_PIN,
	OUTPUT24V14_PIN,
	OUTPUT24V15_PIN,
	OUTPUT24V16_PIN,
	OUTPUT24V17_PIN,
	OUTPUT24V18_PIN,
	OUTPUT24V19_PIN,
	OUTPUT24V20_PIN
};



#endif