mirror of
				https://github.com/mfulz/qmk_firmware.git
				synced 2025-10-31 05:12:33 +01:00 
			
		
		
		
	Bit-bang ISP in the AVRISP-MKII clone project needs to set MOSI pin to the MSB of the data byte on startup, not the LSB.
This commit is contained in:
		
							parent
							
								
									70f3d8e933
								
							
						
					
					
						commit
						24ca2d49fe
					
				| @ -243,7 +243,8 @@ uint8_t ISPTarget_TransferSoftSPIByte(const uint8_t Byte) | |||||||
| 	SoftSPI_Data          = Byte; | 	SoftSPI_Data          = Byte; | ||||||
| 	SoftSPI_BitsRemaining = 8; | 	SoftSPI_BitsRemaining = 8; | ||||||
| 
 | 
 | ||||||
| 	if (SoftSPI_Data & 0x01) | 	/* Set initial MOSI pin state according to the byte to be transferred */ | ||||||
|  | 	if (SoftSPI_Data & (1 << 7)) | ||||||
| 	  PORTB |=  (1 << 2); | 	  PORTB |=  (1 << 2); | ||||||
| 	else | 	else | ||||||
| 	  PORTB &= ~(1 << 2); | 	  PORTB &= ~(1 << 2); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Dean Camera
						Dean Camera