
unit H595
{
	public link unit DI_0 {}
	public link unit DI_1 {}
	public link unit DI_2 {}
	public link unit DI_3 {}
	public link unit DI_4 {}
	public link unit DI_5 {}
	public link unit DI_6 {}
	public link unit DI_7 {}
	
	//[i] function_void OS_init;
	public void OS_init()
	{
		DI_0.D0_DIR = 1;
		DI_1.D0_DIR = 1;
		DI_2.D0_DIR = 1;
		DI_3.D0_DIR = 1;
		DI_4.D0_DIR = 1;
		DI_5.D0_DIR = 1;
		DI_6.D0_DIR = 1;
		DI_7.D0_DIR = 1;
		
		DI_0.D0_OUT = 0;
		DI_1.D0_OUT = 0;
		DI_2.D0_OUT = 0;
		DI_3.D0_OUT = 0;
		DI_4.D0_OUT = 0;
		DI_5.D0_OUT = 0;
		DI_6.D0_OUT = 0;
		DI_7.D0_OUT = 0;
	}
	
	//---------------------------------------------
	U0.D = DI_0;
	unit U0
	{
		public link unit D {}
		void set_uint8( uint8 addr, uint8 b )
		{
			if( b == 0 ) {
				D.D0_OUT = 1;
			}
			else {
				D.D0_OUT = 0;
			}
		}
		uint8 get_uint8( uint8 addr )
		{
			if( D.D0_IN == 0 ) {
				return 0xFF;
			}
			else {
				return 0x00;
			}
		}
	}
	memory my_bit0
	{
		target = U0;
		type = [ uint8 0, 255 ] uint8;
	}
	//---------------------------------------------
	U1.D = DI_1;
	unit U1
	{
		public link unit D {}
		void set_uint8( uint8 addr, uint8 b )
		{
			if( b == 0 ) {
				D.D0_OUT = 1;
			}
			else {
				D.D0_OUT = 0;
			}
		}
		uint8 get_uint8( uint8 addr )
		{
			if( D.D0_IN == 0 ) {
				return 0xFF;
			}
			else {
				return 0x00;
			}
		}
	}
	memory my_bit1
	{
		target = U1;
		type = [ uint8 0, 255 ] uint8;
	}
	//---------------------------------------------
	U2.D = DI_2;
	unit U2
	{
		public link unit D {}
		void set_uint8( uint8 addr, uint8 b )
		{
			if( b == 0 ) {
				D.D0_OUT = 1;
			}
			else {
				D.D0_OUT = 0;
			}
		}
		uint8 get_uint8( uint8 addr )
		{
			if( D.D0_IN == 0 ) {
				return 0xFF;
			}
			else {
				return 0x00;
			}
		}
	}
	memory my_bit2
	{
		target = U2;
		type = [ uint8 0, 255 ] uint8;
	}
	//---------------------------------------------
	U3.D = DI_3;
	unit U3
	{
		public link unit D {}
		void set_uint8( uint8 addr, uint8 b )
		{
			if( b == 0 ) {
				D.D0_OUT = 1;
			}
			else {
				D.D0_OUT = 0;
			}
		}
		uint8 get_uint8( uint8 addr )
		{
			if( D.D0_IN == 0 ) {
				return 0xFF;
			}
			else {
				return 0x00;
			}
		}
	}
	memory my_bit3
	{
		target = U3;
		type = [ uint8 0, 255 ] uint8;
	}
	//---------------------------------------------
	U4.D = DI_4;
	unit U4
	{
		public link unit D {}
		void set_uint8( uint8 addr, uint8 b )
		{
			if( b == 0 ) {
				D.D0_OUT = 1;
			}
			else {
				D.D0_OUT = 0;
			}
		}
		uint8 get_uint8( uint8 addr )
		{
			if( D.D0_IN == 0 ) {
				return 0xFF;
			}
			else {
				return 0x00;
			}
		}
	}
	memory my_bit4
	{
		target = U4;
		type = [ uint8 0, 255 ] uint8;
	}
	//---------------------------------------------
	U5.D = DI_5;
	unit U5
	{
		public link unit D {}
		void set_uint8( uint8 addr, uint8 b )
		{
			if( b == 0 ) {
				D.D0_OUT = 1;
			}
			else {
				D.D0_OUT = 0;
			}
		}
		uint8 get_uint8( uint8 addr )
		{
			if( D.D0_IN == 0 ) {
				return 0xFF;
			}
			else {
				return 0x00;
			}
		}
	}
	memory my_bit5
	{
		target = U5;
		type = [ uint8 0, 255 ] uint8;
	}
	//---------------------------------------------
	U6.D = DI_6;
	unit U6
	{
		public link unit D {}
		void set_uint8( uint8 addr, uint8 b )
		{
			if( b == 0 ) {
				D.D0_OUT = 1;
			}
			else {
				D.D0_OUT = 0;
			}
		}
		uint8 get_uint8( uint8 addr )
		{
			if( D.D0_IN == 0 ) {
				return 0xFF;
			}
			else {
				return 0x00;
			}
		}
	}
	memory my_bit6
	{
		target = U6;
		type = [ uint8 0, 255 ] uint8;
	}
	//---------------------------------------------
	U7.D = DI_7;
	unit U7
	{
		public link unit D {}
		void set_uint8( uint8 addr, uint8 b )
		{
			if( b == 0 ) {
				D.D0_OUT = 1;
			}
			else {
				D.D0_OUT = 0;
			}
		}
		uint8 get_uint8( uint8 addr )
		{
			if( D.D0_IN == 0 ) {
				return 0xFF;
			}
			else {
				return 0x00;
			}
		}
	}
	memory my_bit7
	{
		target = U7;
		type = [ uint8 0, 255 ] uint8;
	}
}

//¿Õ¶Ë¿Ú
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_bit0;
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;
}
D_1.my_bit = driver.my_bit1;
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;
}
D_2.my_bit = driver.my_bit2;
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;
}

D_3.my_bit = driver.my_bit3;
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;
}

D_4.my_bit = driver.my_bit4;
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;
}

D_5.my_bit = driver.my_bit5;
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;
}

D_6.my_bit = driver.my_bit6;
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;
}

D_7.my_bit = driver.my_bit7;
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;
}




