diff --git a/stk500v2/main.cpp b/stk500v2/main.cpp index c8f0b35..73cf410 100644 --- a/stk500v2/main.cpp +++ b/stk500v2/main.cpp @@ -21,9 +21,9 @@ struct Message { uint8_t checksum; }; -static inline bool receiveByte(uint8_t &data, uint16_t timeout = 1000) +static inline bool receiveByte(uint8_t &data, uint32_t timeout = 100000) { - for (uint16_t i = 0; i < timeout; ++i) { + for (uint32_t i = 0; i < timeout; ++i) { if (serial.rxByte(data)) return true; }