
//------------------------------
//图形化连接端口

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 D2_PUL = #.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;
	public link bit D3_PUL = #.COM_MCU.PORTD.1;
}

unit GND
{
	public const uint8 TYPE = 0;
	public bit D0_DIR; public bit D0_IN; public bit D0_OUT; public bit D0_PUL;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit GND1
{
	public const uint8 TYPE = 0;
	public bit D0_DIR; public bit D0_IN; public bit D0_OUT; public bit D0_PUL;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit VCC1
{
	public const uint8 TYPE = 2;
	public bit D0_DIR; public bit D0_IN; public bit D0_OUT; public bit D0_PUL;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit GND2
{
	public const uint8 TYPE = 0;
	public bit D0_DIR; public bit D0_IN; public bit D0_OUT; public bit D0_PUL;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit VCC2
{
	public const uint8 TYPE = 2;
	public bit D0_DIR; public bit D0_IN; public bit D0_OUT; public bit D0_PUL;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}

unit D0
{
	public const uint8 TYPE = 10;
	public link bit D0_DIR = #.COM_MCU.DDRD.0; public link bit D0_IN = #.COM_MCU.PIND.0; public link bit D0_OUT = #.COM_MCU.PORTD.0;
	public link bit D0_PUL = #.COM_MCU.PORTD.0;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit D1
{
	public const uint8 TYPE = 10;
	public link bit D0_DIR = #.COM_MCU.DDRD.1; public link bit D0_IN = #.COM_MCU.PIND.1; public link bit D0_OUT = #.COM_MCU.PORTD.1;
	public link bit D0_PUL = #.COM_MCU.PORTD.1;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit D2
{
	public const uint8 TYPE = 10;
	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;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit D3
{
	public const uint8 TYPE = 10;
	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;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit D4
{
	public const uint8 TYPE = 10;
	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;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit D5
{
	public const uint8 TYPE = 10;
	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;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit D6
{
	public const uint8 TYPE = 10;
	public link bit D0_DIR = #.COM_MCU.DDRD.6; public link bit D0_IN = #.COM_MCU.PIND.6; public link bit D0_OUT = #.COM_MCU.PORTD.6;
	public link bit D0_PUL = #.COM_MCU.PORTD.6;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit D7
{
	public const uint8 TYPE = 10;
	public link bit D0_DIR = #.COM_MCU.DDRD.7; public link bit D0_IN = #.COM_MCU.PIND.7; public link bit D0_OUT = #.COM_MCU.PORTD.7;
	public link bit D0_PUL = #.COM_MCU.PORTD.7;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit D8
{
	public const uint8 TYPE = 10;
	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;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit D9
{
	public const uint8 TYPE = 10;
	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;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit D10
{
	public const uint8 TYPE = 10;
	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;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit D11
{
	public const uint8 TYPE = 10;
	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;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit D12
{
	public const uint8 TYPE = 10;
	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;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit D13
{
	public const uint8 TYPE = 10;
	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;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit DD11
{
	public const uint8 TYPE = 10;
	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;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit DD12
{
	public const uint8 TYPE = 10;
	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;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit DD13
{
	public const uint8 TYPE = 10;
	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;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
//AD口
unit A0
{
	public const uint8 TYPE = 10;
	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;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit A1
{
	public const uint8 TYPE = 10;
	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;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit A2
{
	public const uint8 TYPE = 10;
	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;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit A3
{
	public const uint8 TYPE = 10;
	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;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit A4
{
	public const uint8 TYPE = 10;
	public const int8 AD_INDEX = 4;
	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;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit A5
{
	public const uint8 TYPE = 10;
	public const int8 AD_INDEX = 5;
	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;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit A6
{
	public const uint8 TYPE = 10;
	public const int8 AD_INDEX = 6;
	public link bit D0_DIR = #.COM_MCU.DDRC.6; public link bit D0_IN = #.COM_MCU.PINC.6; public link bit D0_OUT = #.COM_MCU.PORTC.6;
	public link bit D0_PUL = #.COM_MCU.PORTC.6;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}
unit A7
{
	public const uint8 TYPE = 10;
	public const int8 AD_INDEX = 7;
	public link bit D0_DIR = #.COM_MCU.DDRC.7; public link bit D0_IN = #.COM_MCU.PINC.7; public link bit D0_OUT = #.COM_MCU.PORTC.7;
	public link bit D0_PUL = #.COM_MCU.PORTC.7;
	public void OutputMode() { D0_DIR = 1; }
	public void InputMode() { D0_DIR = 0; }
}







