<root>
<document schema='101' license='1,UTT-PIC-DSPIC-V6 ,U2VDNQ' title='' description='' target='PIC16.24F.24FJ64GB004' >
	<config data='!0,ff3f!10,ffff!20,cbbd!30,7f7f%0,f%4,1%5,1%6,0%7,0%8,ff%10,3f%16,3%18,3%1a,3%1c,1%1d,1%1e,1%1f,1%20,1%22,1%23,1%24,1%25,1%26,2%28,3%2b,1%2c,4%2f,1%30,f%34,1%35,1%36,1%37,0%38,3%3a,1%3b,1%3c,1%3d,1%3e,1%3f,0' clkspd='32000000' simspd='1' usewdt='0' constif='0' />
	<plugins >
		<dll_dbg_icd enabled='0' >
			<data name='debug' value='1' />
			<data name='userpins' value='0' />
			<data name='speed' value='0' />
			<data name='usev9' value='0' />
			<data name='breaks' value='8' />
			<data name='stacks' value='8' />
			<data name='clkport' value='1' />
			<data name='clkbit' value='6' />
			<data name='dataport' value='1' />
			<data name='databit' value='7' />
			<data name='ghostype' value='0' />
			<data name='monitor' value='1' />
			<data name='ictloop' value='0' />
			<data name='ictrate' value='20000' />
			<data name='ictmask' value='0' />
			<data name='anlpres' value='255' />
			<data name='digmask1' value='-1' />
			<data name='digmask2' value='-1' />
		</dll_dbg_icd>
		<dll_models enabled='1' />
		<dll_upgrader enabled='1' />
		<dll_webhelp enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug />
	<components >
		<settings autoimg='1' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='' description='' category='' catenable='1' author='' manuname='' manucode='' sysinfo='0' keywords='' dynamic='0' iconpath='' />
		<component class_type='root' codename='panel' x='0' y='0' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
			<resources />
			<properties />
			<values />
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='usb_lu2' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='usb_lu1' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='usb_lu0' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='false' type='b1' description='' isconst='1' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='usb_rx' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='true' type='b1' description='' isconst='1' isinit='1' usrinit='1' setinit='1' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='Main' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='comment' title='' comment='CETTE Version fonctionne...' textarea='12,0,12,0' />
						<command class_type='call' title='Appel de la Routine Composant' textarea='36,0,511,300' component='v5__usbslave0' macro='Initialise' />
						<command class_type='loop' title='Boucle' textarea='36,0,511,300' type='0' exp='1' >
							<flowline >
								<command class_type='call' title='Appel de la Routine Composant' textarea='36,0,511,300' ccode='// Appel de la Routine Composant
// Appel de la Routine Composant: usb_rx=v5__usbslave0::CheckRx()
	MX_UINT8 FCR_RETVAL;


	FCR_RETVAL = 0;

	if (!USBHandleBusy(USBGenericOutHandle))
	{
	  FCR_RETVAL = transfer;			//Return length
	  transfer = 0;
	USBGenericOutHandle = USBGenRead(USBGEN_EP_NUM,(BYTE*)&amp;OUTPacket,USBGEN_EP_SIZE);
	}

FCV_USB_RX = FCR_RETVAL;
' customize='1' component='v5__usbslave0' macro='CheckRx' >
									<return exp='usb_rx' />
								</command>
								<command class_type='decision' title='Décision' textarea='36,0,511,300' exp='usb_rx' swap='0' >
									<flowline >
										<command class_type='call' title='Appel de la Routine Composant' textarea='36,0,511,300' ccode='// Appel de la Routine Composant
// Appel de la Routine Composant: usb_lu0=v5__usbslave0::GetByte(0)
FCV_USB_LU0 = FCD_07281_v5__usbslave0__GetByte(0);
' customize='1' component='v5__usbslave0' macro='GetByte' >
											<return exp='usb_lu0' />
											<argument exp='0' />
										</command>
										<command class_type='call' title='Appel de la Routine Composant' textarea='36,0,511,300' ccode='// Appel de la Routine Composant
// Appel de la Routine Composant: usb_lu1=v5__usbslave0::GetByte(1)
FCV_USB_LU1 = FCD_07281_v5__usbslave0__GetByte(1);
' component='v5__usbslave0' macro='GetByte' >
											<return exp='usb_lu1' />
											<argument exp='1' />
										</command>
										<command class_type='call' title='Appel de la Routine Composant' textarea='36,0,511,300' component='v5__usbslave0' macro='GetByte' >
											<return exp='usb_lu2' />
											<argument exp='2' />
										</command>
										<command class_type='decision' title='Décision' textarea='36,0,511,300' exp='usb_lu0 = 1' swap='0' >
											<flowline >
												<command class_type='call' title='Appel de la Routine Composant' textarea='36,0,511,300' ccode='// Appel de la Routine Composant
// Appel de la Routine Composant: v5__usbslave0::SendString(&quot;yes&quot;, 3)
FCD_07281_v5__usbslave0__SendString(&quot;yes&quot;, 4, 3);
/*	MX_UINT16 FCL_TIMEOUT = (0x0);
	MX_UINT8 FCL_IDX = (0x0);
	MX_UINT8 FCR_RETVAL;

MX_CHAR FCL_DATA[] = &quot;yes&quot;;
MX_UINT8 FCL_LENGTH = 3;

FCR_RETVAL = 0;

		if (FCL_LENGTH &gt;= USBGEN_EP_SIZE)				//If send string is larger then send buffer
			FCL_LENGTH = USBGEN_EP_SIZE;

	while (FCL_IDX &lt; FCL_LENGTH)
	{

	  INPacket._byte[FCL_IDX] = FCL_DATA[FCL_IDX];			//Place data into the string to be sent

		FCL_IDX = FCL_IDX + 1;


	}

	while( IsTxBusy() &amp;&amp; FCL_TIMEOUT &lt; 32000)		//Wait for any previous transmissions to finish
		FCL_TIMEOUT = FCL_TIMEOUT + 1;

	if (FCL_TIMEOUT == 32000)
		FCR_RETVAL = 1;

	if (FCR_RETVAL == 0)
	{
		  reply = 1;
		  USBGenericInHandle = USBGenWrite(USBGEN_EP_NUM,(BYTE*)&amp;INPacket,FCL_LENGTH);
	USBGenericOutHandle = USBGenRead(USBGEN_EP_NUM,(BYTE*)&amp;OUTPacket,USBGEN_EP_SIZE);
	}
*/' customize='1' component='v5__usbslave0' macro='SendString' >
													<argument exp='&quot;yes&quot;' />
													<argument exp='3' />
												</command>
											</flowline>
											<flowline />
										</command>
										<command class_type='decision' title='Décision' textarea='36,0,511,300' exp='usb_lu0 = 2' swap='0' >
											<flowline >
												<command class_type='call' title='Appel de la Routine Composant' textarea='36,0,511,300' ccode='// Appel de la Routine Composant
// Appel de la Routine Composant: v5__usbslave0::SendString(&quot;AAA&quot;, 3)
FCD_07281_v5__usbslave0__SendString(&quot;AAA&quot;, 4, 3);
/*	MX_UINT16 FCL_TIMEOUT = (0x0);
	MX_UINT8 FCL_IDX = (0x0);
	MX_UINT8 FCR_RETVAL;
MX_CHAR FCL_DATA[] = &quot;AAA&quot;;
MX_UINT8 FCL_LENGTH = 3;

FCR_RETVAL = 0;

		if (FCL_LENGTH &gt;= USBGEN_EP_SIZE)				//If send string is larger then send buffer
			FCL_LENGTH = USBGEN_EP_SIZE;

	while (FCL_IDX &lt; FCL_LENGTH)
	{

	  INPacket._byte[FCL_IDX] = FCL_DATA[FCL_IDX];			//Place data into the string to be sent

		FCL_IDX = FCL_IDX + 1;


	}

	while( IsTxBusy() &amp;&amp; FCL_TIMEOUT &lt; 32000)		//Wait for any previous transmissions to finish
		FCL_TIMEOUT = FCL_TIMEOUT + 1;

	if (FCL_TIMEOUT == 32000)
		FCR_RETVAL = 1;

	if (FCR_RETVAL == 0)
	{
		  reply = 1;
		  USBGenericInHandle = USBGenWrite(USBGEN_EP_NUM,(BYTE*)&amp;INPacket,FCL_LENGTH);
	USBGenericOutHandle = USBGenRead(USBGEN_EP_NUM,(BYTE*)&amp;OUTPacket,USBGEN_EP_SIZE);
	}
*/' customize='1' component='v5__usbslave0' macro='SendString' >
													<argument exp='&quot;AAA&quot;' />
													<argument exp='3' />
												</command>
											</flowline>
											<flowline />
										</command>
										<command class_type='decision' title='Décision' textarea='36,0,511,300' exp='usb_lu0 = 3' swap='0' >
											<flowline >
												<command class_type='call' title='Appel de la Routine Composant' textarea='36,0,511,300' ccode='// Appel de la Routine Composant
// Appel de la Routine Composant: v5__usbslave0::SendString(&quot;NOP&quot;, 3)
FCD_07281_v5__usbslave0__SendString(&quot;NOP&quot;, 4, 3);
' customize='1' component='v5__usbslave0' macro='SendString' >
													<argument exp='&quot;NOP&quot;' />
													<argument exp='3' />
												</command>
											</flowline>
											<flowline />
										</command>
									</flowline>
									<flowline />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='usb_macro' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='26cbc2df-5ef0-47db-ab2f-c2425b14462f' vmin='1' vmaj='1' codename='v5__usbslave0' x='0' y='0' z='0' xsz='10.5714' ysz='10.5714' zsz='1.14286' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='vendor_ID' data='4799' />
					<value target='product_ID' data='61488' />
					<value target='dev_name' data='Flowcode USB Slave' />
					<value target='dev_manufacturer' data='Matrix Multimedia Ltd.' />
					<value target='major_version' data='1' />
					<value target='minor_version' data='0' />
					<value target='enumeration_tout' data='0' />
					<value target='timeout' data='10' />
					<value target='country_code' data='0' />
					<value target='max_current' data='50' />
					<value target='usb_type' data='1' />
					<value target='slave_macro' data='usb_macro' />
					<value target='slave_params' data='0' />
					<value target='driver_directory' data='$(srcdir)' />
					<value target='driver_filename' data='mm_mchpusb' />
					<value target='gen_driver' data='0' />
					<value target='Instance' data='000' />
					<value target='SimTimeout' data='1000' />
					<value target='vid_pid_str' data='vid_12bf&amp;pid_f030' />
					<value target='label' data='USB Slave' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='15335401' img='' style='0' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel2d>
	<panel3d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='25' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel3d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAmgQAAIwCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='usb_macro' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAmgQAAIwCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
