
driver.LED = LED;
LED.ID = driver.ID;

unit LED
{
	public const uint16 ID = 0;
	
	memory my_bit { type = [ uint32] uint8; }
	
	bit D0_DIR;
	my_bit bit D0_OUT = #addr ID * 0x00010000 + 0x0000;
	
	my_bit uint32 Color = #addr ID * 0x00010000 + 0x0003;
	
	void set_uint8( uint32 addr, uint8 b )
	{
		uint32 c;
		c.24(uint8) = 220;
		c.16(uint8) = 255;
		c.8(uint8) = 100;
		c.0(uint8) = 50;
		Color = c;

		if( b == 0 ) {
			b = 1;
		}
		else {
			b = 0;
		}
		#.OS.REMO_ModuleWrite( (int)addr, (int)b );
	}
	void set_uint32( uint32 addr, uint32 Data )
	{
		#.OS.REMO_ModuleWrite( (int)addr, (int)Data );
	}
	//---------------------------------------------------
	uint8 get_uint8( uint32 addr )
	{
		return (uint8)(uint16)(uint)#.OS.REMO_ModuleRead( (int)addr );
	}
}
public unit B12
{
	public const int8 INDEX = 0;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit B13
{
	public const int8 INDEX = 1;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit B14
{
	public const int8 INDEX = 2;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit B15
{
	public const int8 INDEX = 3;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit A8
{
	public const int8 INDEX = 4;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit A9
{
	public const int8 INDEX = 5;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit A10
{
	public const int8 INDEX = 6;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit A11
{
	public const int8 INDEX = 7;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit A12
{
	public const int8 INDEX = 8;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit A15
{
	public const int8 INDEX = 9;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit B3
{
	public const int8 INDEX = 10;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit B4
{
	public const int8 INDEX = 11;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit B5
{
	public const int8 INDEX = 12;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit B6
{
	public const int8 INDEX = 13;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit B7
{
	public const int8 INDEX = 14;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit B8
{
	public const int8 INDEX = 15;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit B9
{
	public const int8 INDEX = 16;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit C13
{
	public const int8 INDEX = 17;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit A0
{
	public const int8 INDEX = 18;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}

public unit A1
{
	public const int8 INDEX = 19;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}

public unit A2
{
	public const int8 INDEX = 20;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit A3
{
	public const int8 INDEX = 21;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit A4
{
	public const int8 INDEX = 22;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit A5
{
	public const int8 INDEX = 23;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit A6
{
	public const int8 INDEX = 24;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit A7
{
	public const int8 INDEX = 25;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit B0
{
	public const int8 INDEX = 26;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit B1
{
	public const int8 INDEX = 27;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit B10
{
	public const int8 INDEX = 28;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}
public unit B11
{
	public const int8 INDEX = 29;
	
	public bit D0_DIR;
	public bit D0_OUT;
	public bit D0_IN;
	public bit D0_PUL;
}






