diff --git a/adc.h b/adc.h index cb34800..427266f 100755 --- a/adc.h +++ b/adc.h @@ -81,6 +81,9 @@ class Adc { static inline void Wait() { while (AdcConvert::value()); } + static bool ready() { + return !AdcConvert::value(); + } static inline int16_t ReadOut() { uint8_t low = ADCL; uint8_t high = ADCH; diff --git a/makefile.mk b/makefile.mk index c8a49bb..f22fd16 100644 --- a/makefile.mk +++ b/makefile.mk @@ -143,6 +143,10 @@ upload: $(TARGET_HEX) $(AVRDUDE) $(AVRDUDE_COM_OPTS) $(AVRDUDE_ISP_OPTS) \ -B 1 -U flash:w:$(TARGET_HEX):i -U lock:w:0x$(LOCK):m +slow_upload: $(TARGET_HEX) + $(AVRDUDE) $(AVRDUDE_COM_OPTS) $(AVRDUDE_ISP_OPTS) \ + -B 4 -U flash:w:$(TARGET_HEX):i -U lock:w:0x$(LOCK):m + clean: $(REMOVE) $(OBJS) $(TARGETS) $(DEP_FILE) $(DEPS)