
unit H595
{
	public const uint16 ID = 0;
	
	public link unit D {}
	public link unit L {}
	public link unit C {}
	
	//[i] function_void OS_init;
	
	
	#include "$run$.txt"
	
	//端口缓冲区数据
	uint8 back_data;
	
	//---------------------------------------------
	memory my_bit { type = [ uint8 0, 255 ] uint8; }
	//memory my_uint8 {}
}

	//---------------------------------------------
	void set_uint8( uint8 data )
	{
		driver.back_data = data;
		driver.send_byte( driver.back_data );
	}
	
	//---------------------------------------------
	uint8 get_uint8()
	{
		return driver.back_data;
	}

//空端口
uint8 NULL_uint8;
bit NULL_bit;

public memory my_uint8 {}

//图形化配置端口
public my_uint8 uint8 D_OUT; public link uint8 D_IN = D_OUT; public link uint8 D_DIR = NULL_uint8;

D_0.my_bit = driver.my_bit;
D_0.NULL_bit = NULL_bit;
public unit D_0
{
	public link memory my_bit {}
	public link bit NULL_bit;
	public my_bit bit D0_OUT = #addr 0; public link bit D0_IN = D0_OUT; public link bit D0_DIR = NULL_bit;
	public void OutputMode() {}
	public const uint8 TYPE = 10;
}
D_1.my_bit = driver.my_bit;
D_1.NULL_bit = NULL_bit;
public unit D_1
{
	public link memory my_bit {}
	public link bit NULL_bit;
	public my_bit bit D0_OUT = #addr 1; public link bit D0_IN = D0_OUT; public link bit D0_DIR = NULL_bit;
	public void OutputMode() {}
	public const uint8 TYPE = 10;
}
D_2.my_bit = driver.my_bit;
D_2.NULL_bit = NULL_bit;
public unit D_2
{
	public link memory my_bit {}
	public link bit NULL_bit;
	public my_bit bit D0_OUT = #addr 2; public link bit D0_IN = D0_OUT; public link bit D0_DIR = NULL_bit;
	public void OutputMode() {}
	public const uint8 TYPE = 10;
}

D_3.my_bit = driver.my_bit;
D_3.NULL_bit = NULL_bit;
public unit D_3
{
	public link memory my_bit {}
	public link bit NULL_bit;
	public my_bit bit D0_OUT = #addr 3; public link bit D0_IN = D0_OUT; public link bit D0_DIR = NULL_bit;
	public void OutputMode() {}
	public const uint8 TYPE = 10;
}

D_4.my_bit = driver.my_bit;
D_4.NULL_bit = NULL_bit;
public unit D_4
{
	public link memory my_bit {}
	public link bit NULL_bit;
	public my_bit bit D0_OUT = #addr 4; public link bit D0_IN = D0_OUT; public link bit D0_DIR = NULL_bit;
	public void OutputMode() {}
	public const uint8 TYPE = 10;
}

D_5.my_bit = driver.my_bit;
D_5.NULL_bit = NULL_bit;
public unit D_5
{
	public link memory my_bit {}
	public link bit NULL_bit;
	public my_bit bit D0_OUT = #addr 5; public link bit D0_IN = D0_OUT; public link bit D0_DIR = NULL_bit;
	public void OutputMode() {}
	public const uint8 TYPE = 10;
}

D_6.my_bit = driver.my_bit;
D_6.NULL_bit = NULL_bit;
public unit D_6
{
	public link memory my_bit {}
	public link bit NULL_bit;
	public my_bit bit D0_OUT = #addr 6; public link bit D0_IN = D0_OUT; public link bit D0_DIR = NULL_bit;
	public void OutputMode() {}
	public const uint8 TYPE = 10;
}

D_7.my_bit = driver.my_bit;
D_7.NULL_bit = NULL_bit;
public unit D_7
{
	public link memory my_bit {}
	public link bit NULL_bit;
	public my_bit bit D0_OUT = #addr 7; public link bit D0_IN = D0_OUT; public link bit D0_DIR = NULL_bit;
	public void OutputMode() {}
	public const uint8 TYPE = 10;
}




