getter method for abzug_state

master
Eggert Jung 3 years ago
parent dcf1531033
commit e514d57ddf

@ -1,5 +1,7 @@
#include <avr/io.h> #include <avr/io.h>
#include <stdint.h>
#include "avrIOhelper/io-helper.h" #include "avrIOhelper/io-helper.h"
#include "common.h"
uint16_t abzug_speed = 100; uint16_t abzug_speed = 100;
@ -14,8 +16,11 @@ void timer3_init()
DDRE |= 1 << 4; DDRE |= 1 << 4;
} }
uint8_t get_abzug_state(){
return TCCR3B & _BV(CS31);
}
void send_settings(void); extern void send_settings(void);
void do_abzug(){ void do_abzug(){
if (read_Input(BTN_ABZUG_EIN, RISING)) { if (read_Input(BTN_ABZUG_EIN, RISING)) {

@ -7,5 +7,6 @@ extern uint16_t abzug_speed;
void do_abzug(void); void do_abzug(void);
void timer3_init(void); void timer3_init(void);
uint8_t get_abzug_state(void);
#endif #endif