
//------------------------------
//ͼλӶ˿

unit PORT
{
	public link bit D2_DIR = #.COM_MCU.DDRD.0; public link bit D2_IN = #.COM_MCU.PIND.0; public link bit D2_OUT = #.COM_MCU.PORTD.0;
	public link bit D3_DIR = #.COM_MCU.DDRD.1; public link bit D3_IN = #.COM_MCU.PIND.1; public link bit D3_OUT = #.COM_MCU.PORTD.1;
}

unit PD2
{
	public const int8 INT_INDEX = 0;
	public link bit D0_DIR = #.COM_MCU.DDRD.2; public link bit D0_IN = #.COM_MCU.PIND.2; public link bit D0_OUT = #.COM_MCU.PORTD.2; public link bit D0_PUL = #.COM_MCU.PORTD.2;
}
unit PD3
{
	public const int8 INT_INDEX = 1;
	public link bit D0_DIR = #.COM_MCU.DDRD.3; public link bit D0_IN = #.COM_MCU.PIND.3; public link bit D0_OUT = #.COM_MCU.PORTD.3; public link bit D0_PUL = #.COM_MCU.PORTD.3;
}
unit PD4
{
	public link bit D0_DIR = #.COM_MCU.DDRD.4; public link bit D0_IN = #.COM_MCU.PIND.4; public link bit D0_OUT = #.COM_MCU.PORTD.4; public link bit D0_PUL = #.COM_MCU.PORTD.4;
}
unit PD5
{
	public link bit D0_DIR = #.COM_MCU.DDRD.5; public link bit D0_IN = #.COM_MCU.PIND.5; public link bit D0_OUT = #.COM_MCU.PORTD.5; public link bit D0_PUL = #.COM_MCU.PORTD.5;
}

unit PB0
{
	public link bit D0_DIR = #.COM_MCU.DDRB.0; public link bit D0_IN = #.COM_MCU.PINB.0; public link bit D0_OUT = #.COM_MCU.PORTB.0; public link bit D0_PUL = #.COM_MCU.PORTB.0;
}

unit PB3
{
	public link bit D0_DIR = #.COM_MCU.DDRB.3; public link bit D0_IN = #.COM_MCU.PINB.3; public link bit D0_OUT = #.COM_MCU.PORTB.3; public link bit D0_PUL = #.COM_MCU.PORTB.3;
}
unit PB4
{
	public link bit D0_DIR = #.COM_MCU.DDRB.4; public link bit D0_IN = #.COM_MCU.PINB.4; public link bit D0_OUT = #.COM_MCU.PORTB.4; public link bit D0_PUL = #.COM_MCU.PORTB.4;
}
unit PB5
{
	public link bit D0_DIR = #.COM_MCU.DDRB.5; public link bit D0_IN = #.COM_MCU.PINB.5; public link bit D0_OUT = #.COM_MCU.PORTB.5; public link bit D0_PUL = #.COM_MCU.PORTB.5;
}


//AD
unit PC0
{
	public const int8 AD_INDEX = 0;
	public link bit D0_DIR = #.COM_MCU.DDRC.0; public link bit D0_IN = #.COM_MCU.PINC.0; public link bit D0_OUT = #.COM_MCU.PORTC.0; public link bit D0_PUL = #.COM_MCU.PORTC.0;
}
unit PC1
{
	public const int8 AD_INDEX = 1;
	public link bit D0_DIR = #.COM_MCU.DDRC.1; public link bit D0_IN = #.COM_MCU.PINC.1; public link bit D0_OUT = #.COM_MCU.PORTC.1; public link bit D0_PUL = #.COM_MCU.PORTC.1;
}
unit PC2
{
	public const int8 AD_INDEX = 2;
	public link bit D0_DIR = #.COM_MCU.DDRC.2; public link bit D0_IN = #.COM_MCU.PINC.2; public link bit D0_OUT = #.COM_MCU.PORTC.2; public link bit D0_PUL = #.COM_MCU.PORTC.2;
}
unit PC3
{
	public const int8 AD_INDEX = 3;
	public link bit D0_DIR = #.COM_MCU.DDRC.3; public link bit D0_IN = #.COM_MCU.PINC.3; public link bit D0_OUT = #.COM_MCU.PORTC.3; public link bit D0_PUL = #.COM_MCU.PORTC.3;
}




//---------------------------------------------------
PB1.D = iPB1;
PB1.power = driver.valueA;
PB1.DT = driver.DTA1;
unit PB1
{
	link unit D {}
	link int8 power;
	link int8 DT;
}
PC4.D = iPC4;
PC4.power = driver.valueA;
PC4.DT = driver.DTA2;
unit PC4
{
	link unit D {}
	link int8 power;
	link int8 DT;
}
//---------------------------------------------------

PB2.D = iPB2;
PB2.power = driver.valueB;
PB2.DT = driver.DTB1;
unit PB2
{
	link unit D {}
	link int8 power;
	link int8 DT;
}
PC5.D = iPC5;
PC5.power = driver.valueB;
PC5.DT = driver.DTB2;
unit PC5
{
	link unit D {}
	link int8 power;
	link int8 DT;
}


unit iPB1
{
	public link bit D0_DIR = #.COM_MCU.DDRB.1; public link bit D0_IN = #.COM_MCU.PINB.1; public link bit D0_OUT = #.COM_MCU.PORTB.1; public link bit D0_PUL = #.COM_MCU.PORTB.1;
}
unit iPB2
{
	public link bit D0_DIR = #.COM_MCU.DDRB.2; public link bit D0_IN = #.COM_MCU.PINB.2; public link bit D0_OUT = #.COM_MCU.PORTB.2; public link bit D0_PUL = #.COM_MCU.PORTB.2;
}
unit iPC4
{
	public link bit D0_DIR = #.COM_MCU.DDRC.4; public link bit D0_IN = #.COM_MCU.PINC.4; public link bit D0_OUT = #.COM_MCU.PORTC.4; public link bit D0_PUL = #.COM_MCU.PORTC.4;
}
unit iPC5
{
	public link bit D0_DIR = #.COM_MCU.DDRC.5; public link bit D0_IN = #.COM_MCU.PINC.5; public link bit D0_OUT = #.COM_MCU.PORTC.5; public link bit D0_PUL = #.COM_MCU.PORTC.5;
}



