
	I2C.SDA = SDA;
	I2C.SCL = SCL;
	I2C =
	#include <system\common\I2C\driver.txt>
	
	const uint8 DeviceAddr = 0B0100_0110;
	
	//--------------------------------------------
	//[i] function_void OS_init;
	public void OS_init()
	{
		I2C.Init();
		int32 d = get_channel0();
	}
	//---------------------------------------------------
	//[i] function_int32 get_channel0;
	public int32 get_channel0()
	{
		//读取上一次的光照强度
		I2C.start_iic();
		I2C.write_byte( DeviceAddr + 1 );
		uint32 data = 0;
		data.8(uint8) = I2C.read_byte();
		I2C.Ack();
		data.0(uint8) = I2C.read_byte();
		I2C.NoAck();
		I2C.end_iic();
		loop( 10 ) {}
		
		//触发一次测量
		I2C.start_iic();
		I2C.write_byte( DeviceAddr );
		I2C.write_byte( 0x01 );
		I2C.end_iic();
		loop( 10 ) {}
		
		//不知道干嘛的 (2016.3.4 现在知道了, 哈哈哈...)
		// 0x10:  1lx
		// 0x11:  0.5lx
		I2C.start_iic();
		I2C.write_byte( DeviceAddr );
		I2C.write_byte( 0x11 );
		I2C.end_iic();
		loop( 10 ) {}
		
		//这个180ms的延时就不需要了
		//loop( 180 ) loop( 1000 ) loop( 16 ) {}
		
		return (int)data;
	}