mirror of
https://github.com/qmk/qmk_firmware.git
synced 2026-10-02 06:49:16 +02:00
Make WaitWhileBusy function in the AVRISP project more explicit about how it sends and receives the busy check command.
Reduce size of PROGRAM FLASH ISP or PROGRAM EEPROM ISP buffer to 256 bytes to prevent blowing the stack on the smallest USB AVR models.
This commit is contained in:
@@ -161,8 +161,9 @@ uint8_t V2Protocol_WaitWhileTargetBusy(void)
|
||||
SPI_SendByte(0x00);
|
||||
|
||||
SPI_SendByte(0x00);
|
||||
bool DeviceBusy = (SPI_ReceiveByte() & 0x01);
|
||||
}
|
||||
while ((SPI_ReceiveByte() & 0x01) && (TCNT0 < TARGET_BUSY_TIMEOUT_MS));
|
||||
while (DeviceBusy && (TCNT0 < TARGET_BUSY_TIMEOUT_MS));
|
||||
|
||||
if (TCNT0 >= TARGET_BUSY_TIMEOUT_MS)
|
||||
return STATUS_RDY_BSY_TOUT;
|
||||
|
||||
Reference in New Issue
Block a user