mixer-slider/firmware/slider/button.h

22 lines
331 B
C
Raw Normal View History

2019-02-10 19:12:40 +01:00
#ifndef BUTTON_H_
#define BUTTON_H_
#include <avr/io.h>
/* button driver */
#define BUTTON_DDR DDRB
#define BUTTON_PORT PORTB
#define BUTTON_REG PINB
#define BUTTON_PIN 1
typedef enum {
BUTTON_RELEASED = 0,
BUTTON_PRESSED = 1
} button_state_t;
void button_init();
button_state_t button_is_pressed();
#endif // BUTTON_H_