<root>
<document scada='0' schema='102' license='1,mnfisher,592ZE1' title='Snakums' description='A &apos;Snake&apos; game - using a 32 x 32 MAX7219 driven LED display and a joystick to control

Scope for many improvements:
Sound
An &apos;attract&apos; mode
Animated Score screen

etc

Enjoy

Christmas 2018
Martin Fisher' fcversion='524544' target='ARD.ATMEGA.Arduino Nano 328' >
	<config data='' clkspd='16000000' simspd='1' usewdt='0' constif='0' commport='26' />
	<plugins >
		<dll_models enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug >
		<watch expr='snake' />
		<watch expr='SMove.i' />
		<watch expr='SMove.x' />
		<watch expr='SMove.y' />
		<watch expr='sLength' />
		<watch expr='die' />
		<watch expr='xDir' />
		<watch expr='yDir' />
		<watch expr='SMove.i' />
		<watch expr='SMove.t' />
		<watch expr='SMove.x' />
		<watch expr='SMove.y' />
	</debug>
	<ghost >
		<FK2 >
			<data name='FK2D0' port='4294967295' pin='4294967295' />
			<data name='FK2D1' port='4294967295' pin='4294967295' />
			<data name='FK2D2' port='4294967295' pin='4294967295' />
			<data name='FK2D3' port='4294967295' pin='4294967295' />
			<data name='FK2D4' port='4294967295' pin='4294967295' />
			<data name='FK2D5' port='4294967295' pin='4294967295' />
			<data name='FK2D6' port='4294967295' pin='4294967295' />
			<data name='FK2D7' port='4294967295' pin='4294967295' />
			<data name='FK2D8' port='4294967295' pin='4294967295' />
			<data name='FK2D9' port='4294967295' pin='4294967295' />
			<data name='FK2D10' port='4294967295' pin='4294967295' />
			<data name='FK2D11' port='4294967295' pin='4294967295' />
			<data name='FK2D12' port='4294967295' pin='4294967295' />
			<data name='FK2D13' port='4294967295' pin='4294967295' />
			<data name='FK2D14' port='4294967295' pin='4294967295' />
			<data name='FK2D15' port='4294967295' pin='4294967295' />
			<data name='FK2A0' port='4294967295' pin='4294967295' />
			<data name='FK2A1' port='4294967295' pin='4294967295' />
			<data name='FK2A2' port='4294967295' pin='4294967295' />
			<data name='FK2A3' port='4294967295' pin='4294967295' />
			<data name='FK2A4' port='4294967295' pin='4294967295' />
			<data name='FK2A5' port='4294967295' pin='4294967295' />
		</FK2>
		<ICD >
			<data name='AnalogPrescaleValue' value='19' />
			<data name='DigitalSampleRate' value='100000' />
			<data name='BreakpointCount' value='8' />
			<data name='CallStackDepthCount' value='8' />
			<data name='ClockPort' value='1' />
			<data name='ClockPin' value='1' />
			<data name='DataPort' value='1' />
			<data name='DataPin' value='0' />
			<data name='UseDefaultPins' value='1' />
			<data name='WrapEnabled' value='1' />
			<data name='CommsDelayOverridden' value='0' />
			<data name='CommsDelay' value='11' />
			<data name='CalculatedCommsDelay' value='11' />
		</ICD>
		<pins >
			<digital A='0' B='0' C='0' D='0' E='0' F='0' G='0' H='0' I='0' J='0' K='0' L='0' M='0' N='0' O='0' P='0' Q='0' R='0' S='0' T='0' U='0' V='0' W='0' X='0' Y='0' Z='0' />
			<analog A='0' B='0' C='0' D='0' E='0' F='0' G='0' H='0' I='0' J='0' K='0' L='0' M='0' N='0' O='0' P='0' Q='0' R='0' S='0' T='0' U='0' V='0' W='0' X='0' Y='0' Z='0' />
		</pins>
	</ghost>
	<components >
		<settings autoimg='1' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='7e378abf-221f-4512-ad0e-95671217924f' vstate='30' vmin='0' vmaj='1' srcleaf='max7219 final.fcfx' visiblename='Matrix7219' description='Max 7219 based 8 x8 matrix display - supporting 1-8 displays in a 8 x 8 to 64 x 8 grid' category='Displays' catenable='1' author='Martin Fisher' manuname='' manucode='' sysinfo='4875' keywords='' dynamic='1' scadaCompatible='0' embeddedCompatible='1' iconpath='' />
		<component class_type='root' codename='Max7219_v2' 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' scadavisible='1' interactive='1' solid='1' layer='0' poslock='0' macronames='$(type)_$(module)__$(macro)' >
			<resources />
			<properties >
				<property name='Prescale' target='cal_spi1::PR_SCALE' typeid='16' hidden='0' locked='0' info='Prescale option selector' filter='002Fosc/2
004Fosc/4
008Fosc/8
016Fosc/16
032Fosc/32
064Fosc/64
128Fosc/128' />
				<property name='CLK' target='cal_spi1::CLK' typeid='5' hidden='0' locked='0' info='' />
				<property name='MOSI' target='cal_spi1::MOSI' typeid='5' hidden='0' locked='0' info='' />
				<property name='Chip Select' target='CS' typeid='5' hidden='0' locked='0' info='' />
				<property name='Devices' target='NumDevices' typeid='21' hidden='0' locked='0' info='' />
				<property name='SwapX' target='Direction' typeid='7' hidden='0' locked='0' info='' />
				<property name='SwapY' target='SwapY' typeid='7' hidden='0' locked='0' info='' />
				<property name='Rotated' target='Rotated' typeid='16' hidden='0' locked='0' info='' filter='0000
0011' />
			</properties>
			<values >
				<value target='cal_spi1::PR_SCALE' data='004' />
				<value target='cal_spi1::CLK' data='$PORTD.3' />
				<value target='cal_spi1::MOSI' data='$PORTD.5' />
				<value target='CS' data='$PORTD.4' />
				<value target='NumDevices' data='16' />
				<value target='Direction' data='1' />
				<value target='SwapY' data='1' />
				<value target='Rotated' data='000' />
			</values>
			<events >
				<event class='Components' event='Property' target='Ev_Property' />
			</events>
			<apis >
				<api name='Pen' alt='Pen' type='1' proto='1' />
				<api name='DisplayStr' alt='DisplayStr' type='1' proto='1' />
				<api name='Shutdown' alt='Shutdown' type='1' proto='1' />
				<api name='InitialiseLED' alt='InitialiseLED' type='1' proto='1' />
				<api name='ClearDisplays' alt='ClearDisplays' type='1' proto='1' />
				<api name='SetIntensity' alt='SetIntensity' type='1' proto='1' />
			</apis>
			<variables >
				<variable public='0' >
					<def class_type='variable' name='die' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='OP_INTENSITY' type='s16' description='' isconst='1' isinit='1' usrinit='10' setinit='10' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='speed' 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='Parameter' type='s16' description='' isconst='1' isinit='1' usrinit='1' setinit='1' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Score' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='growValue' type='u16' description='Number of segments to grow by' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='OP_SHUTDOWN' type='s16' description='' isconst='1' isinit='1' usrinit='12' setinit='12' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='display' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='128' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Command' type='s16' description='' isconst='1' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='alive' type='u8' description='Is snake alive' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='OP_NOOP' type='s16' description='' isconst='1' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='yDir' type='s16' description='Current x/y direction (0, +1 or -1)' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='JOYCENTRE' type='s16' description='' isconst='1' isinit='1' usrinit='512' setinit='512' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='OP_DECODEMODE' type='s16' description='' isconst='1' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='HighScore' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='foodTimer' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='buffer' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='32' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='OP_SCANLIMIT' type='s16' description='' isconst='1' isinit='1' usrinit='11' setinit='11' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='OP_DISPLAYTEST' type='s16' description='' isconst='1' isinit='1' usrinit='15' setinit='15' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='snake' type='s16' description='Maximum (pro player!) length of snake' isconst='0' isinit='0' usrinit='0' setinit='' >
						<array size='868' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='foodY' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='foodValue' type='u8' description='No of &apos;points&apos; for current food' 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>
				<variable public='0' >
					<def class_type='variable' name='i' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='sLength' type='u16' description='Length of snake' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='xDir' type='s16' description='Current x/y direction (0, +1 or -1)' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='flag' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='foodX' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='TurnLeft' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<local name='temp' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.temp = yDir' />
							<exp exp='yDir = 0 - xDir' />
							<exp exp='xDir = .temp' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Plot16' description='Plot a point on a 32 x 32 square matrix - where first row of 4 is 0..7, second 8..15 etc for Y and x is 0..31 throughout.' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='x' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='y' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='set' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='v' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='addr' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='bit' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='decision' title='Decision' break='1' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.x &lt; 32 AND .y &lt; 32' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.addr = (.x / 8) * 8 + (.y / 8) * 32 + (7 - (.y % 8))' />
									<exp exp='.v = display[.addr]' />
									<exp exp='' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.bit = 1 &lt;&lt; (.x % 8)' />
								</command>
								<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.Set' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
											<exp exp='.v = .v | .bit' />
										</command>
									</flowline>
									<flowline >
										<command class_type='calculation' title='bit = ~bit' cmdcolor='16760919' cmdcolor_sec='16760832' >
											<exp exp='.bit = ~ .bit' />
											<exp exp='.v = .v &amp; .bit' />
										</command>
									</flowline>
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='display[.addr] = .v' />
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='spiLine' >
									<argument exp='7 - .y % 8' />
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Pen' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='device' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='char' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='ca' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='addr' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='i' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='d' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.addr = .device * 8' />
							<exp exp='.ca = .char - 32' />
							<exp exp='.ca = .ca * 8' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='2' forvar='.i' exp='8' >
							<flowline >
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='CharSet' macro='GetInt' >
									<return exp='.d' />
									<argument exp='.ca' />
								</command>
								<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='(Direction &amp; !SwapY) || (!Direction &amp; SwapY)' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
											<exp exp='.d = ((.d &amp; 0x1) &lt;&lt; 7) | ((.d &amp; 0x2) &lt;&lt; 5) | ((.d &amp; 0x4) &lt;&lt; 3) | ((.d &amp; 0x8) &lt;&lt; 1) | ((.d &amp; 0x10) &gt;&gt; 1) | ((.d &amp; 0x20) &gt;&gt; 3) | ((.d &amp; 0x40) &gt;&gt; 5) | ((.d &amp; 0x80) &gt;&gt; 7)' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='SwapY' swap='0' >
									<flowline >
										<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='WriteData' >
											<argument exp='.device' />
											<argument exp='7-.i' />
											<argument exp='.d' />
										</command>
									</flowline>
									<flowline >
										<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='WriteData' >
											<argument exp='.device' />
											<argument exp='.i' />
											<argument exp='.d' />
										</command>
									</flowline>
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.ca = .ca + 1' />
								</command>
							</flowline>
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Refresh' />
					</flowline>
				</macro>
				<macro >
					<flowline name='GameLoop' description='Main Game Loop
While snake alive
  Move Snake
  Check food timer
   - decrement or create new food randomly' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<local name='joy' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='turn' type='u8' description='set if just turned to stop constant rotation' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='addTimer' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='speedTimer' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='ClearDisplays' />
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='alive = true' />
							<exp exp='foodX = -1' />
							<exp exp='foodY = -1' />
							<exp exp='.addTimer = 0' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='0' exp='alive' >
							<flowline >
								<command class_type='call' title='Check the joystick position' cmdcolor='1879295' cmdcolor_sec='5751039' component='pot_panel1' macro='GetInt' >
									<return exp='.joy' />
								</command>
								<command class_type='decision' title='If we are turning already - wait for it to re-centre' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.turn' swap='0' >
									<flowline >
										<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='(.joy &gt; JOYCENTRE - 100) &amp; (.joy &lt; JOYCENTRE + 100)' swap='0' >
											<flowline >
												<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
													<exp exp='.turn = false' />
												</command>
											</flowline>
											<flowline />
										</command>
									</flowline>
									<flowline >
										<command class_type='decision' title='Joy pushed right?' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.joy &lt; JOYCENTRE - 200' swap='0' >
											<flowline >
												<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
													<exp exp='.turn = true' />
												</command>
												<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='TurnRight' />
											</flowline>
											<flowline >
												<command class_type='decision' title='Joy pushed left' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.joy &gt; JOYCENTRE + 200' swap='0' >
													<flowline >
														<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
															<exp exp='.turn = true' />
														</command>
														<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='TurnLeft' />
													</flowline>
													<flowline />
												</command>
											</flowline>
										</command>
									</flowline>
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='SnakeMove' >
									<return exp='die' />
									<argument exp='growValue &gt; 0' />
								</command>
								<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='growValue &gt; 0' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
											<exp exp='growValue = growValue - 1' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='die' swap='0' >
									<flowline >
										<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='KillSnake' />
										<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
											<exp exp='alive = false' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='foodTimer &gt; 0' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
											<exp exp='foodTimer = foodTimer - 1' />
										</command>
										<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='foodTimer = 0' swap='0' >
											<flowline >
												<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Plot16' >
													<argument exp='foodX' />
													<argument exp='foodY' />
													<argument exp='0' />
												</command>
												<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
													<exp exp='.addTimer = random () % 30' />
												</command>
											</flowline>
											<flowline />
										</command>
									</flowline>
									<flowline >
										<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.addTimer = 0' swap='0' >
											<flowline >
												<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='AddFood' />
											</flowline>
											<flowline >
												<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
													<exp exp='.addTimer = .addTimer - 1' />
												</command>
											</flowline>
										</command>
									</flowline>
								</command>
								<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.speedTimer = 0' swap='0' >
									<flowline >
										<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='speed &gt; 50' swap='0' >
											<flowline >
												<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
													<exp exp='speed = speed - 5' />
													<exp exp='.speedTimer = 100' />
												</command>
											</flowline>
											<flowline />
										</command>
									</flowline>
									<flowline >
										<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
											<exp exp='.speedTimer = .speedTimer - 1' />
										</command>
									</flowline>
								</command>
								<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='speed' type='1' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Shutdown' description='Set LED shutdown state' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='powerOff' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='decision' title='Decision' textarea='66,-24,66,-24' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.powerOff' swap='0' >
							<flowline >
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='spiAll' >
									<argument exp='OP_SHUTDOWN' />
									<argument exp='0' />
								</command>
							</flowline>
							<flowline >
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='spiAll' >
									<argument exp='OP_SHUTDOWN' />
									<argument exp='1' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='DisplayStr' description='Print a string to the display on matrix alignment' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='addr' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='str' type='T8*' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</param>
						<param name='clear' type='b1' description='Set to true to clear to end of display' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='i' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='len' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.len = Length$ (.str)' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='2' forvar='.i' exp='NumDevices' >
							<flowline >
								<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.i &lt; .len' swap='0' >
									<flowline >
										<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Pen' >
											<argument exp='.i+.addr' />
											<argument exp='.str[.i]' />
										</command>
									</flowline>
									<flowline >
										<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Pen' >
											<argument exp='.addr+.i' />
											<argument exp='&apos; &apos;' />
										</command>
									</flowline>
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='WriteData' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='device' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='addr' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='data' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='display[.device * 8 + .addr] = .data' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='spiTransfer' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='device' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='opCode' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='data' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='i' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='offset' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='maxbytes' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='n' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.maxbytes = NumDevices * 2' />
							<exp exp='.offset = .device * 2' />
							<exp exp='.n = .maxbytes' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='2' forvar='.i' exp='.maxbytes' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='buffer[.i] = 0' />
								</command>
							</flowline>
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='buffer[.offset + 1] = .opCode' />
							<exp exp='buffer[.offset] = .data' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='CS = 0' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='1' exp='.n == 0' start='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.n = .n - 1' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_spi1' macro='Master_Byte' >
									<argument exp='buffer[.n]' />
								</command>
							</flowline>
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='CS = 1' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='spiLine' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='y' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='i' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='n' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='line' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.n = NumDevices * 2' />
							<exp exp='.line = .y' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='2' forvar='.i' exp='NumDevices' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='buffer[.i * 2 + 1] = .line + 1' />
									<exp exp='buffer[.i * 2] = display[.i * 8 + .line]' />
									<exp exp='' />
								</command>
							</flowline>
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='CS = 0' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='1' exp='.n == 0' start='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.n = .n - 1' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_spi1' macro='Master_Byte' >
									<argument exp='buffer[.n]' />
								</command>
							</flowline>
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='CS = 1' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='InitialiseLED' description='Initialise an max72xx based LED display (or displays)' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_spi1' macro='Master_Init' />
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='CS = 1' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='spiAll' >
							<argument exp='OP_DISPLAYTEST' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Macro' textarea='42,2,42,2' cmdcolor='1879295' cmdcolor_sec='5751039' macro='spiAll' >
							<argument exp='OP_SCANLIMIT' />
							<argument exp='7' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='spiAll' >
							<argument exp='OP_DECODEMODE' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Shutdown' >
							<argument exp='1' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='ClearDisplays' />
					</flowline>
				</macro>
				<macro >
					<flowline name='DrawSnake' description='Draw the complete snake.  Needed for start position' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<local name='i' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='2' forvar='.i' exp='sLength' >
							<flowline >
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Plot16' >
									<argument exp='snake[.i] % 32' />
									<argument exp='snake[.i] / 32' />
									<argument exp='1' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='spiAll' description='Transfer the same instruction to all LED matrix' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='opCode' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='data' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='i' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='offset' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='maxbytes' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='n' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.maxbytes = NumDevices * 2' />
							<exp exp='.n = .maxbytes' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='2' forvar='.i' exp='NumDevices' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='buffer[.i * 2 + 1] = .opCode' />
									<exp exp='buffer[.i * 2] = .data' />
								</command>
							</flowline>
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='CS = 0' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='1' exp='.n == 0' start='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.n = .n - 1' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='cal_spi1' macro='Master_Byte' >
									<argument exp='buffer[.n]' />
								</command>
							</flowline>
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='CS = 1' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='DisplayScore' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<local name='ScoreStr' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</local>
						<local name='click' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='highStr' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</local>
						<local name='i' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='str' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='8' />
						</local>
						<local name='len' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='x' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='ClearDisplays' />
						<command class_type='decision' title='New high score?' cmdcolor='12615680' cmdcolor_sec='15376912' exp='Score &gt; HighScore' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='HighScore = Score' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.ScoreStr = ToString$ (Score)' />
							<exp exp='.highStr = ToString$ (HighScore)' />
							<exp exp='.i = 0' />
							<exp exp='' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='DisplayStr' >
							<argument exp='0' />
							<argument exp='&quot;GAMEOVER&quot;' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='DisplayStr' >
							<argument exp='12-Length$(.highStr)' />
							<argument exp='.highStr' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='DisplayStr' >
							<argument exp='16-Length$(.ScoreStr)' />
							<argument exp='.ScoreStr' />
							<argument exp='0' />
						</command>
						<command class_type='loop' title='Wait for button click' cmdcolor='12615680' cmdcolor_sec='15376912' type='1' exp='.click = 1' start='0' >
							<flowline >
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='pcb_switch1' macro='ReadState' >
									<return exp='.click' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Refresh' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<local name='y' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='2' forvar='.y' exp='8' >
							<flowline >
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='spiLine' >
									<argument exp='.y' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='AddFood' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='foodX = random () % 32' />
							<exp exp='foodY = random () % 32' />
							<exp exp='foodTimer = random () % 100 + 60' />
							<exp exp='foodValue = random () % 10 + 1' />
						</command>
						<command class_type='decision' title='If snake is over position then miss this pass' cmdcolor='12615680' cmdcolor_sec='15376912' exp='GetPixel16 (foodX,foodY)' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='foodTimer = 1 // - try again next loop' />
									<exp exp='foodX = -1' />
									<exp exp='foodY = -1' />
								</command>
							</flowline>
							<flowline >
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Plot16' >
									<argument exp='foodX' />
									<argument exp='foodY' />
									<argument exp='1' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='ClearDisplays' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<local name='i' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='2' forvar='.i' exp='NumDevices * 8' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='display[.i] = 0' />
								</command>
							</flowline>
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Refresh' />
					</flowline>
				</macro>
				<macro >
					<flowline name='TurnRight' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<local name='temp' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.temp = yDir' />
							<exp exp='yDir = xDir' />
							<exp exp='xDir = 0 - .temp' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='GetPixel16' description='Get a point on a 32 x 32 square matrix - where first row of 4 is 0..7, second 8..15 etc for Y and x is 0..31 throughout.  Return true if pixel set, else false' >
						<return name='Return' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='x' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='y' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='v' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='addr' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='bit' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='decision' title='Decision' break='1' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.x &lt; 32 AND .y &lt; 32' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.addr = (.x / 8) * 8 + (.y / 8) * 32 + (7 - (.y % 8))' />
									<exp exp='.v = display[.addr]' />
									<exp exp='' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.bit = 1 &lt;&lt; (.x % 8)' />
								</command>
								<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='(.v &amp; .bit)' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
											<exp exp='.Return = true' />
										</command>
									</flowline>
									<flowline >
										<command class_type='calculation' title='bit = ~bit' cmdcolor='16760919' cmdcolor_sec='16760832' >
											<exp exp='.Return = false' />
										</command>
									</flowline>
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SetIntensity' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='intensity' type='u8' description='LED segment intensity 0-15' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.intensity &lt; 16' swap='0' >
							<flowline >
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='spiAll' >
									<argument exp='OP_INTENSITY' />
									<argument exp='.intensity' />
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='KillSnake' description='Snake has crashed - erase from tail end and also erase any food' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<local name='i' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='2' forvar='.i' exp='sLength' >
							<flowline >
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Plot16' >
									<argument exp='snake[.i] % 32' />
									<argument exp='snake[.i] / 32' />
									<argument exp='0' />
								</command>
								<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='25' type='1' />
							</flowline>
						</command>
						<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='foodTimer &gt; 0' swap='0' >
							<flowline >
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Plot16' >
									<argument exp='foodX' />
									<argument exp='foodY' />
									<argument exp='00' />
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SnakeMove' description='Returns true if the snake has crashed and is to lose a life
Move snake to new position - and grow array holding if needed' >
						<return name='Return' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='grow' type='b1' description='Grow if true - else tail is deleted' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='i' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='x' type='s16' description='Current coordinates of head of snake' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='y' type='s16' description='Current coordinates of head of snake' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='t' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Get position of new head of snake' break='1' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.x = snake[sLength - 1] % 32' />
							<exp exp='.y = snake[sLength - 1] / 32' />
							<exp exp='.x = .x + xDir' />
							<exp exp='.y = .y + yDir' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.Return = false' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='(foodTimer &gt; 0) &amp; (.x = foodX) &amp; (.y = foodY)' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.grow = true' />
									<exp exp='foodTimer = 0' />
									<exp exp='Score = Score + foodValue' />
									<exp exp='growValue = growValue + foodValue' />
								</command>
							</flowline>
							<flowline >
								<command class_type='decision' title='Crashed or gone off screen' cmdcolor='12615680' cmdcolor_sec='15376912' exp='(.x &lt; 0) OR (.y &lt; 0) OR (.x &gt; 31) OR (.y &gt; 31) OR GetPixel16 (.x, .y)' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
											<exp exp='.Return = true' />
										</command>
									</flowline>
									<flowline >
										<command class_type='call' title='Draw the new head' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Plot16' >
											<argument exp='.x' />
											<argument exp='.y' />
											<argument exp='1' />
										</command>
									</flowline>
								</command>
							</flowline>
						</command>
						<command class_type='decision' title='Decision' break='1' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.grow &amp; sLength &lt; 868' swap='0' >
							<flowline >
								<command class_type='calculation' title='Grow the snake' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='sLength = sLength + 1' />
								</command>
							</flowline>
							<flowline >
								<command class_type='call' title='Erase the tail' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Plot16' >
									<argument exp='snake[0] % 32' />
									<argument exp='snake[0] / 32' />
									<argument exp='0' />
								</command>
								<command class_type='loop' title='Shift the snake up one space' cmdcolor='12615680' cmdcolor_sec='15376912' type='2' forvar='.i' exp='sLength - 1' >
									<flowline >
										<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
											<exp exp='snake[.i] = snake[.i + 1]' />
										</command>
									</flowline>
								</command>
							</flowline>
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='snake[sLength - 1] = .x + .y * 32' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<local name='I' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='tog' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='InitialiseLED' />
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='SetIntensity' >
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Shutdown' >
							<argument exp='false' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='0' exp='1' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='sLength = 1' />
									<exp exp='snake[0] = 15 * 32 + 15 // 0,0' />
									<exp exp='snake[1] = 1 // 1,0' />
									<exp exp='snake[2] = 2' />
									<exp exp='xDir = 0' />
									<exp exp='yDir = -1' />
									<exp exp='speed = 150' />
									<exp exp='foodTimer = 0' />
									<exp exp='foodValue = 0' />
									<exp exp='Score = 0' />
									<exp exp='growValue = 5' />
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='GameLoop' />
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='DisplayScore' />
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='c67171df-0ad6-4b11-8361-cfe14b072847' vmin='0' vmaj='2' codename='cal_spi1' x='0' y='90' z='0' xsz='25' ysz='25' zsz='25' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='ENABLED' data='1' />
					<value target='REF' data='1' />
					<value target='CHANNEL' data='000' />
					<value target='MOSI' data='$PORTD.5' />
					<value target='MOSIPins' data='008' />
					<value target='MISO' data='$PORTB.0' />
					<value target='MISOPins' data='013' />
					<value target='CLK' data='$PORTD.3' />
					<value target='CLKPins' data='004' />
					<value target='UseAutoCS' data='1' />
					<value target='UseCS' data='0' />
					<value target='SS' data='$PORTD.4' />
					<value target='SSPins' data='000' />
					<value target='AltSSPin' data='0' />
					<value target='Mode' data='000' />
					<value target='PR_SCALE' data='004' />
					<value target='CKE' data='001' />
					<value target='CKP' data='000' />
					<value target='SMP' data='001' />
					<value target='ScopeTraces' data='0' />
					<value target='ConsoleData' data='0' />
					<value target='Injector' data='000' />
					<value target='InjectorHandle' data='0' />
					<value target='BMODE' data='6' />
					<value target='MOSI_PORT' data='$PORTD.5' />
					<value target='MOSI_TRIS' data='$PORTD.5' />
					<value target='MOSI_PIN' data='5' />
					<value target='MISO_PORT' data='$PORTB.0' />
					<value target='MISO_TRIS' data='$PORTB.0' />
					<value target='MISO_PIN' data='0' />
					<value target='SCK_PORT' data='$PORTD.3' />
					<value target='SCK_TRIS' data='$PORTD.3' />
					<value target='SCK_PIN' data='3' />
					<value target='SS_PORT' data='$PORTD.4' />
					<value target='SS_TRIS' data='$PORTD.4' />
					<value target='SS_PIN' data='4' />
					<value target='Remappable' data='' />
					<value target='MOSIReg' data='008' />
					<value target='CLKREG' data='004' />
					<value target='MOSIRPNUM' data='5' />
					<value target='MOSIBank' data='a' />
					<value target='MOSIBank2' data='b' />
					<value target='CLKRPNUM' data='8' />
					<value target='CLKBank' data='' />
					<value target='MISORPREG' data='SDI1R' />
					<value target='MISOBank' data='a' />
					<value target='SPIName' data='' />
					<value target='MISOReg' data='000' />
					<value target='SPIClock' data='' />
					<value target='MISOBank2' data='' />
					<value target='CLKBank2' data='' />
					<value target='ParentName' data='' />
					<value target='BitDelay' data='0' />
					<value target='ClockSpeed' data='16000000' />
					<value target='MasterDivider' data='1' />
					<value target='Sim' data='1' />
					<value target='CLKRPREG' data='' />
					<value target='SSRPREG' data='' />
					<value target='SSBank' data='' />
					<value target='SSBank2' data='' />
					<value target='AltSSReg' data='' />
					<value target='AltSSMask' data='0' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='dfb4d07a-3d70-45d5-83ef-07e3c95d86ab' vmin='6' vmaj='1' codename='CharSet' x='0' y='0' z='0' xsz='25' ysz='25' zsz='25' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='StorageType' data='000' />
					<value target='Sign' data='000' />
					<value target='intfixed' data='0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x18,0x3C,0x3C,0x18,0x18,0x00,0x18,0x00,
0x36,0x36,0x00,0x00,0x00,0x00,0x00,0x00,
0x36,0x36,0x7F,0x36,0x7F,0x36,0x36,0x00,
0x0C,0x3E,0x03,0x1E,0x30,0x1F,0x0C,0x00,
0x00,0x63,0x33,0x18,0x0C,0x66,0x63,0x00,
0x1C,0x36,0x1C,0x6E,0x3B,0x33,0x6E,0x00,
0x06,0x06,0x03,0x00,0x00,0x00,0x00,0x00,
0x18,0x0C,0x06,0x06,0x06,0x0C,0x18,0x00,
0x06,0x0C,0x18,0x18,0x18,0x0C,0x06,0x00,
0x00,0x66,0x3C,0xFF,0x3C,0x66,0x00,0x00,
0x00,0x0C,0x0C,0x3F,0x0C,0x0C,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x06,
0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x00,
0x60,0x30,0x18,0x0C,0x06,0x03,0x01,0x00,
0x3E,0x63,0x73,0x7B,0x6F,0x67,0x3E,0x00,
0x0C,0x0E,0x0C,0x0C,0x0C,0x0C,0x3F,0x00,
0x1E,0x33,0x30,0x1C,0x06,0x33,0x3F,0x00,
0x1E,0x33,0x30,0x1C,0x30,0x33,0x1E,0x00,
0x38,0x3C,0x36,0x33,0x7F,0x30,0x78,0x00,
0x3F,0x03,0x1F,0x30,0x30,0x33,0x1E,0x00,
0x1C,0x06,0x03,0x1F,0x33,0x33,0x1E,0x00,
0x3F,0x33,0x30,0x18,0x0C,0x0C,0x0C,0x00,
0x1E,0x33,0x33,0x1E,0x33,0x33,0x1E,0x00,
0x1E,0x33,0x33,0x3E,0x30,0x18,0x0E,0x00,
0x00,0x0C,0x0C,0x00,0x00,0x0C,0x0C,0x00,
0x00,0x0C,0x0C,0x00,0x00,0x0C,0x0C,0x06,
0x18,0x0C,0x06,0x03,0x06,0x0C,0x18,0x00,
0x00,0x00,0x3F,0x00,0x00,0x3F,0x00,0x00,
0x06,0x0C,0x18,0x30,0x18,0x0C,0x06,0x00,
0x1E,0x33,0x30,0x18,0x0C,0x00,0x0C,0x00,
0x3E,0x63,0x7B,0x7B,0x7B,0x03,0x1E,0x00,
0x0C,0x1E,0x33,0x33,0x3F,0x33,0x33,0x00,
0x3F,0x66,0x66,0x3E,0x66,0x66,0x3F,0x00,
0x3C,0x66,0x03,0x03,0x03,0x66,0x3C,0x00,
0x1F,0x36,0x66,0x66,0x66,0x36,0x1F,0x00,
0x7F,0x46,0x16,0x1E,0x16,0x46,0x7F,0x00,
0x7F,0x46,0x16,0x1E,0x16,0x06,0x0F,0x00,
0x3C,0x66,0x03,0x03,0x73,0x66,0x7C,0x00,
0x33,0x33,0x33,0x3F,0x33,0x33,0x33,0x00,
0x1E,0x0C,0x0C,0x0C,0x0C,0x0C,0x1E,0x00,
0x78,0x30,0x30,0x30,0x33,0x33,0x1E,0x00,
0x67,0x66,0x36,0x1E,0x36,0x66,0x67,0x00,
0x0F,0x06,0x06,0x06,0x46,0x66,0x7F,0x00,
0x63,0x77,0x7F,0x7F,0x6B,0x63,0x63,0x00,
0x63,0x67,0x6F,0x7B,0x73,0x63,0x63,0x00,
0x1C,0x36,0x63,0x63,0x63,0x36,0x1C,0x00,
0x3F,0x66,0x66,0x3E,0x06,0x06,0x0F,0x00,
0x1E,0x33,0x33,0x33,0x3B,0x1E,0x38,0x00,
0x3F,0x66,0x66,0x3E,0x36,0x66,0x67,0x00,
0x1E,0x33,0x07,0x0E,0x38,0x33,0x1E,0x00,
0x3F,0x2D,0x0C,0x0C,0x0C,0x0C,0x1E,0x00,
0x33,0x33,0x33,0x33,0x33,0x33,0x3F,0x00,
0x33,0x33,0x33,0x33,0x33,0x1E,0x0C,0x00,
0x63,0x63,0x63,0x6B,0x7F,0x77,0x63,0x00,
0x63,0x63,0x36,0x1C,0x1C,0x36,0x63,0x00,
0x33,0x33,0x33,0x1E,0x0C,0x0C,0x1E,0x00,
0x7F,0x63,0x31,0x18,0x4C,0x66,0x7F,0x00,
0x1E,0x06,0x06,0x06,0x06,0x06,0x1E,0x00,
0x03,0x06,0x0C,0x18,0x30,0x60,0x40,0x00,
0x1E,0x18,0x18,0x18,0x18,0x18,0x1E,0x00,
0x08,0x1C,0x36,0x63,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,
0x0C,0x0C,0x18,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x1E,0x30,0x3E,0x33,0x6E,0x00,
0x07,0x06,0x06,0x3E,0x66,0x66,0x3B,0x00,
0x00,0x00,0x1E,0x33,0x03,0x33,0x1E,0x00,
0x38,0x30,0x30,0x3e,0x33,0x33,0x6E,0x00,
0x00,0x00,0x1E,0x33,0x3f,0x03,0x1E,0x00,
0x1C,0x36,0x06,0x0f,0x06,0x06,0x0F,0x00,
0x00,0x00,0x6E,0x33,0x33,0x3E,0x30,0x1F,
0x07,0x06,0x36,0x6E,0x66,0x66,0x67,0x00,
0x0C,0x00,0x0E,0x0C,0x0C,0x0C,0x1E,0x00,
0x30,0x00,0x30,0x30,0x30,0x33,0x33,0x1E,
0x07,0x06,0x66,0x36,0x1E,0x36,0x67,0x00,
0x0E,0x0C,0x0C,0x0C,0x0C,0x0C,0x1E,0x00,
0x00,0x00,0x33,0x7F,0x7F,0x6B,0x63,0x00,
0x00,0x00,0x1F,0x33,0x33,0x33,0x33,0x00,
0x00,0x00,0x1E,0x33,0x33,0x33,0x1E,0x00,
0x00,0x00,0x3B,0x66,0x66,0x3E,0x06,0x0F,
0x00,0x00,0x6E,0x33,0x33,0x3E,0x30,0x78,
0x00,0x00,0x3B,0x6E,0x66,0x06,0x0F,0x00,
0x00,0x00,0x3E,0x03,0x1E,0x30,0x1F,0x00,
0x08,0x0C,0x3E,0x0C,0x0C,0x2C,0x18,0x00,
0x00,0x00,0x33,0x33,0x33,0x33,0x6E,0x00,
0x00,0x00,0x33,0x33,0x33,0x1E,0x0C,0x00,
0x00,0x00,0x63,0x6B,0x7F,0x7F,0x36,0x00,
0x00,0x00,0x63,0x36,0x1C,0x36,0x63,0x00,
0x00,0x00,0x33,0x33,0x33,0x3E,0x30,0x1F,
0x00,0x00,0x3F,0x19,0x0C,0x26,0x3F,0x00,
0x38,0x0C,0x0C,0x07,0x0C,0x0C,0x38,0x00,
0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x00,
0x07,0x0C,0x0C,0x38,0x0C,0x0C,0x07,0x00,
0x6E,0x3B,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
' />
					<value target='floatfixed' data='' />
					<value target='fixedexp' data='0' />
					<value target='EmbedIntoC' data='1' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='8c97cc7d-3c7b-41b6-b255-6694b6b8eed9' vmin='4' vmaj='1' codename='pot_panel1' 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' scadavisible='1' interactive='1' solid='1' layer='0' poslock='1' >
				<resources />
				<properties />
				<values >
					<value target='angle_start' data='225.000000' />
					<value target='angle_sweep' data='270.000000' />
					<value target='ScopeTraces' data='0' />
					<value target='channel' data='3' />
					<value target='vrefvol' data='500' />
					<value target='vrefop' data='000' />
					<value target='convspd' data='003' />
					<value target='actime' data='40' />
					<value target='bits' data='10' />
					<value target='bitmul' data='0.004883' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='fc04a65f-f03d-40c8-9f69-0d23d2daac29' vmin='1' vmaj='1' codename='pcb_switch1' x='0' y='0' z='11.25' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='pin' data='$PORTD.2' />
					<value target='polarity' data='001' />
					<value target='debounce' data='20' />
					<value target='operation' data='000' />
					<value target='color' data='6908265' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<scadaresourcelookup />
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' perspective='1' >
		<background rgb='16760992' img='' style='0' />
		<camera xe='58.5526' ye='28.6748' ze='1366.67' xt='58.5526' yt='28.6748' 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' />
		<camerakey0 xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey1 xe='-3.67394e-14' ye='0' ze='-300' xt='0' yt='0' zt='0' xquat='0' yquat='1' zquat='0' wquat='6.12323e-17' />
		<camerakey2 xe='0' ye='-300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.707107' yquat='0' zquat='0' wquat='0.707107' />
		<camerakey3 xe='-3.67394e-14' ye='300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-4.32978e-17' yquat='0.707107' zquat='0.707107' wquat='4.32978e-17' />
		<camerakey4 xe='-300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='0.5' zquat='0.5' wquat='0.5' />
		<camerakey5 xe='300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='-0.5' zquat='-0.5' wquat='0.5' />
		<camerakey6 xe='-173.205' ye='-173.205' ze='173.205' xt='0' yt='0' zt='0' xquat='-0.424708' yquat='0.17592' zquat='0.339851' wquat='0.820473' />
	</panel3d>
	<layout >
		<view type='0' name='GetPixel16' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAyAcAALoDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='DisplayScore' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAyAcAALoDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='DisplayStr' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAyAcAALoDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='KillSnake' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAyAcAALoDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='AddFood' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAyAcAALoDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SnakeMove' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAyAcAALoDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='GameLoop' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAyAcAALoDAAA' zoom='75' scrollx='0' scrolly='1768' flags='0' />
		<view type='0' name='InitialiseLED' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAyAcAALoDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAyAcAALoDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='DrawSnake' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAyAcAALoDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='ClearDisplays' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAyAcAALoDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='TurnLeft' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAyAcAALoDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='TurnRight' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAyAcAALoDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Refresh' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAyAcAALoDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Plot16' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAyAcAALoDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='spiLine' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAyAcAALoDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Pen' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAyAcAALoDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='WriteData' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAyAcAALoDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='spiTransfer' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAyAcAALoDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='spiAll' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAyAcAALoDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Shutdown' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAyAcAALoDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SetIntensity' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAyAcAALoDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
