store uint8 ref in a let
This commit is contained in:
		
							parent
							
								
									db5a6e1246
								
							
						
					
					
						commit
						8a57662681
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
					@ -44,13 +44,14 @@ func diff(frame, newFrame: LcdFrame): FrameDiff =
 | 
				
			||||||
proc send(cs: ChipState, cd: ChipDiff) =
 | 
					proc send(cs: ChipState, cd: ChipDiff) =
 | 
				
			||||||
  for pageIdx in 0..7:
 | 
					  for pageIdx in 0..7:
 | 
				
			||||||
    for colIdx in 0..63:
 | 
					    for colIdx in 0..63:
 | 
				
			||||||
      if cd[pageIdx][colIdx] == nil:
 | 
					      let dataRef = cd[pageIdx][colIdx]
 | 
				
			||||||
 | 
					      if dataRef == nil:
 | 
				
			||||||
        continue
 | 
					        continue
 | 
				
			||||||
      if cs.page != pageIdx:
 | 
					      if cs.page != pageIdx:
 | 
				
			||||||
        lcdSetPage(pageIdx)
 | 
					        lcdSetPage(pageIdx)
 | 
				
			||||||
      if cs.address != colIdx:
 | 
					      if cs.address != colIdx:
 | 
				
			||||||
        lcdSetAddress(colIdx)
 | 
					        lcdSetAddress(colIdx)
 | 
				
			||||||
      lcdWriteData(cd[pageIdx][colIdx][])
 | 
					      lcdWriteData(dataRef[])
 | 
				
			||||||
      if cs.address == 63:
 | 
					      if cs.address == 63:
 | 
				
			||||||
        if cs.page == 7:
 | 
					        if cs.page == 7:
 | 
				
			||||||
          cs.page = 0
 | 
					          cs.page = 0
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue