
unit ultrasonic
{
	public const uint16 ID = 0;
	
	public link unit TRIG {}
	public link unit ECHO {}
	
	public link bit TRIG_DIR = TRIG.D0_DIR;
	public link bit TRIG_IN = TRIG.D0_IN;
	public link bit TRIG_OUT = TRIG.D0_OUT;
	
	public link bit ECHO_DIR = ECHO.D0_DIR;
	public link bit ECHO_IN = ECHO.D0_IN;
	public link bit ECHO_OUT = ECHO.D0_OUT;
	
	#include "$run$.txt"
	
	//---------------------------------------------------
	//[i] function_void OS_init;
	void OS_init()
	{
		TRIG_DIR = 1;
		TRIG_OUT = 0;
		
		ECHO_DIR = 0;
		ECHO_OUT = 1;
	}
	//---------------------------------------------------
	//[i] function_int32_debug get_value;
	//int32 get_value()
	
	//---------------------------------------------------
	//[i] function_int32_old get_good_value;
	//int32 get_good_value()
}




