reduce delays
This commit is contained in:
parent
5d76525ed4
commit
b0e59996cd
@ -837,7 +837,12 @@ static void cmdloop(void)
|
|||||||
spi_rxtx(val[2]);
|
spi_rxtx(val[2]);
|
||||||
ser_send(spi_rxtx(val[3]));
|
ser_send(spi_rxtx(val[3]));
|
||||||
|
|
||||||
|
/* most CMD_WRITE_* commands need delay */
|
||||||
|
if (val[0] == CMD_WRITE_LOCK_1)
|
||||||
|
{
|
||||||
_delay_ms(10);
|
_delay_ms(10);
|
||||||
|
}
|
||||||
|
|
||||||
ser_send('\r');
|
ser_send('\r');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -938,7 +943,7 @@ static void reset_statemachine(uint8_t event)
|
|||||||
case STATE_RESET_SYNC:
|
case STATE_RESET_SYNC:
|
||||||
if (event == EV_STATE_ENTER) {
|
if (event == EV_STATE_ENTER) {
|
||||||
led_mode = LED_ON;
|
led_mode = LED_ON;
|
||||||
timer = 5; /* timeout 50ms */
|
timer = 1; /* timeout 50ms */
|
||||||
|
|
||||||
/* set SPI speed */
|
/* set SPI speed */
|
||||||
SPCR = spi_modes[spi_speed];
|
SPCR = spi_modes[spi_speed];
|
||||||
|
Loading…
Reference in New Issue
Block a user