set the blink delay too 20 instead of 200
This commit is contained in:
parent
5da6bd3219
commit
34778b7e04
15
main.c
15
main.c
|
@ -5,6 +5,8 @@
|
|||
* has options to save settings in EEPROM.
|
||||
*/
|
||||
|
||||
//#define __AVR_ATtiny13A__
|
||||
|
||||
#ifndef MCU
|
||||
#define MCU atiny13a
|
||||
#endif
|
||||
|
@ -45,10 +47,6 @@
|
|||
//Debounce check number.
|
||||
#define MAX_CHECKS 5
|
||||
|
||||
// Define DISABLE_TEMPORARY_SWITCH to turn off the ability to hold
|
||||
// the switch to temporarily engage/bypass.
|
||||
//#define DISABLE_TEMPORARY_SWITCH
|
||||
|
||||
#define PIN_SW2 PINB3
|
||||
#define PIN_BYPASS2 PB4
|
||||
#define PIN_SW1 PINB2
|
||||
|
@ -58,7 +56,7 @@
|
|||
//The BLINK_QTY can be edited from 0-255 blinks
|
||||
#define BLINK_QTY 2
|
||||
#define BLINK_CNT 2 * BLINK_QTY
|
||||
#define BLINK_DELAY 200
|
||||
#define BLINK_DELAY 20
|
||||
|
||||
|
||||
|
||||
|
@ -134,7 +132,7 @@ void init_prog()
|
|||
init_btn(&btn2, PIN_SW2, PIN_BYPASS2);
|
||||
|
||||
/*Wait 5ms for pull-up resistors voltage to become stable.*/
|
||||
//_delay_ms(5);
|
||||
_delay_ms(5);
|
||||
|
||||
/*check if the eeprom has info. */
|
||||
while(! eeprom_is_ready()) {} //Blocks until eeprom is ready.
|
||||
|
@ -375,11 +373,11 @@ static inline void init_timer0() {
|
|||
}
|
||||
|
||||
|
||||
//ISR(TIMER0_OVF_vect)
|
||||
|
||||
/*The interrupt service routine for the timer0*/
|
||||
ISR(TIM0_OVF_vect, ISR_BLOCK)
|
||||
{
|
||||
cli();
|
||||
|
||||
/*Check the state of the switches*/
|
||||
debounce_switch();
|
||||
|
||||
|
@ -391,7 +389,6 @@ ISR(TIM0_OVF_vect, ISR_BLOCK)
|
|||
btn2.pressed_ticks += 1;
|
||||
}
|
||||
|
||||
|
||||
/*Re-Enable global interrupts*/
|
||||
sei();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue