#ifndef __GPIO_DEF_H
#define	__GPIO_DEF_H

#define GPIO_A_H(x)			do{MCF_GPIO_PPDSDR_A   = (unsigned char) (1UL << x);}while(0)
#define GPIO_A_L(x)			if(0)////do{MCF_GPIO_PCLRR_A    = (unsigned char)~(1UL << x);}while(0)
#define GPIO_A_O(x)			do{MCF_GPIO_PDDR_A    |= (unsigned char) (1UL << x);}while(0)
#define GPIO_A_I(x)			do{MCF_GPIO_PDDR_A    &= (unsigned char)~(1UL << x);}while(0)
#define GPIO_A_S(x)			(MCF_GPIO_PPDSDR_A & (1UL << x))


#define GPIO_B_H(x)			do{MCF_GPIO_PPDSDR_B   = (unsigned char) (1UL << x);}while(0)
#define GPIO_B_L(x)			if(0)////do{MCF_GPIO_PCLRR_B    = (unsigned char)~(1UL << x);}while(0)
#define GPIO_B_O(x)			do{MCF_GPIO_PDDR_B    |= (unsigned char) (1UL << x);}while(0)
#define GPIO_B_I(x)			do{MCF_GPIO_PDDR_B    &= (unsigned char)~(1UL << x);}while(0)
#define GPIO_B_S(x)			(MCF_GPIO_PPDSDR_B & (1UL << x))

#define GPIO_C_H(x)			if(0)////do{MCF_GPIO_PPDSDR_C   = (unsigned char) (1UL << x);}while(0)
#define GPIO_C_L(x)			if(0)////do{MCF_GPIO_PCLRR_C    = (unsigned char)~(1UL << x);}while(0)
#define GPIO_C_O(x)			if(0)////do{MCF_GPIO_PDDR_C    |= (unsigned char) (1UL << x);}while(0)
#define GPIO_C_I(x)			if(0)////do{MCF_GPIO_PDDR_C    &= (unsigned char)~(1UL << x);}while(0)
#define GPIO_C_S(x)			x////(MCF_GPIO_PPDSDR_C & (1UL << x))

#define GPIO_D_H(x)			if(0)//do{MCF_GPIO_PPDSDR_D   = (unsigned char) (1UL << x);}while(0)
#define GPIO_D_L(x)			if(0)////do{MCF_GPIO_PCLRR_D    = (unsigned char)~(1UL << x);}while(0)
#define GPIO_D_O(x)			do{MCF_GPIO_PDDR_D    |= (unsigned char) (1UL << x);}while(0)
#define GPIO_D_I(x)			do{MCF_GPIO_PDDR_D    &= (unsigned char)~(1UL << x);}while(0)
#define GPIO_D_S(x)			(MCF_GPIO_PPDSDR_D & (1UL << x))

#define GPIO_E_H(x)			x//do{MCF_GPIO_PPDSDR_E   = (unsigned char) (1UL << x);}while(0)
#define GPIO_E_L(x)			if(0)////do{MCF_GPIO_PCLRR_E    = (unsigned char)~(1UL << x);}while(0)
#define GPIO_E_O(x)			do{MCF_GPIO_PDDR_E    |= (unsigned char) (1UL << x);}while(0)
#define GPIO_E_I(x)			do{MCF_GPIO_PDDR_E    &= (unsigned char)~(1UL << x);}while(0)
#define GPIO_E_S(x)			(MCF_GPIO_PPDSDR_E & (1UL << x))

#define GPIO_F_H(x)			if(0)//do{MCF_GPIO_PPDSDR_F   = (unsigned char) (1UL << x);}while(0)
#define GPIO_F_L(x)			if(0)////do{MCF_GPIO_PCLRR_F    = (unsigned char)~(1UL << x);}while(0)
#define GPIO_F_O(x)			if(0)//do{MCF_GPIO_PDDR_F    |= (unsigned char) (1UL << x);}while(0)
#define GPIO_F_I(x)			if(0)//do{MCF_GPIO_PDDR_F    &= (unsigned char)~(1UL << x);}while(0)
#define GPIO_F_S(x)			x//(MCF_GPIO_PPDSDR_F & (1UL << x))

#define GPIO_G_H(x)			x//do{MCF_GPIO_PPDSDR_G   = (unsigned char) (1UL << x);}while(0)
#define GPIO_G_L(x)			x//do{MCF_GPIO_PCLRR_G    = (unsigned char)~(1UL << x);}while(0)
#define GPIO_G_O(x)			x//do{MCF_GPIO_PDDR_G    |= (unsigned char) (1UL << x);}while(0)
#define GPIO_G_I(x)			x//do{MCF_GPIO_PDDR_G    &= (unsigned char)~(1UL << x);}while(0)
#define GPIO_G_S(x)			x//(MCF_GPIO_PPDSDR_G & (1UL << x))

#define GPIO_H_H(x)			x//do{MCF_GPIO_PPDSDR_H   = (unsigned char) (1UL << x);}while(0)
#define GPIO_H_L(x)			x//do{MCF_GPIO_PCLRR_H    = (unsigned char)~(1UL << x);}while(0)
#define GPIO_H_O(x)			x//do{MCF_GPIO_PDDR_H    |= (unsigned char) (1UL << x);}while(0)
#define GPIO_H_I(x)			x//do{MCF_GPIO_PDDR_H    &= (unsigned char)~(1UL << x);}while(0)
#define GPIO_H_S(x)			(MCF_GPIO_PPDSDR_H & (1UL << x))

#define GPIO_I_H(x)			x//do{MCF_GPIO_PPDSDR_I   = (unsigned char) (1UL << x);}while(0)
#define GPIO_I_L(x)			x//do{MCF_GPIO_PCLRR_I    = (unsigned char)~(1UL << x);}while(0)
#define GPIO_I_O(x)			x//do{MCF_GPIO_PDDR_I    |= (unsigned char) (1UL << x);}while(0)
#define GPIO_I_I(x)			x//do{MCF_GPIO_PDDR_I    &= (unsigned char)~(1UL << x);}while(0)
#define GPIO_I_S(x)			(MCF_GPIO_PPDSDR_I & (1UL << x))

#define GPIO_J_H(x)			x//do{MCF_GPIO_PPDSDR_J   = (unsigned char) (1UL << x);}while(0)
#define GPIO_J_L(x)			x//do{MCF_GPIO_PCLRR_J    = (unsigned char)~(1UL << x);}while(0)
#define GPIO_J_O(x)			x//do{MCF_GPIO_PDDR_J    |= (unsigned char) (1UL << x);}while(0)
#define GPIO_J_I(x)			x//do{MCF_GPIO_PDDR_J    &= (unsigned char)~(1UL << x);}while(0)
#define GPIO_J_S(x)			(MCF_GPIO_PPDSDR_J & (1UL << x))

#define GPIO_K_H(x)			x//do{MCF_GPIO_PPDSDR_K   = (unsigned char) (1UL << x);}while(0)
#define GPIO_K_L(x)			x//do{MCF_GPIO_PCLRR_K    = (unsigned char)~(1UL << x);}while(0)
#define GPIO_K_O(x)			x//do{MCF_GPIO_PDDR_K    |= (unsigned char) (1UL << x);}while(0)
#define GPIO_K_I(x)			x//do{MCF_GPIO_PDDR_K    &= (unsigned char)~(1UL << x);}while(0)
#define GPIO_K_S(x)			(MCF_GPIO_PPDSDR_K & (1UL << x))

#endif


