mirror of
				https://git.familie-radermacher.ch/linux/ptouch-print.git
				synced 2025-11-03 21:24:25 +00:00 
			
		
		
		
	change init to first invalidate, then init (maybe needed for some ptouch models?)
This commit is contained in:
		
							parent
							
								
									ffc1b1f7b1
								
							
						
					
					
						commit
						71396e8ff1
					
				@ -186,7 +186,11 @@ int ptouch_send(ptouch_dev ptdev, uint8_t *data, size_t len)
 | 
			
		||||
 | 
			
		||||
int ptouch_init(ptouch_dev ptdev)
 | 
			
		||||
{
 | 
			
		||||
	char cmd[]="\x1b\x40";		/* 1B 40 = ESC @ = INIT */
 | 
			
		||||
	/* first invalidate, then send init command */
 | 
			
		||||
	uint8_t cmd[102];
 | 
			
		||||
	memset(cmd, 0, 100);
 | 
			
		||||
	cmd[100] = 0x1b;	/* ESC */
 | 
			
		||||
	cmd[101] = 0x40;	/* @ */
 | 
			
		||||
	return ptouch_send(ptdev, (uint8_t *)cmd, strlen(cmd));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user