1
0
mirror of https://github.com/binary-kitchen/doorlockd synced 2024-12-22 10:24:26 +01:00

avr: add accessors for emergency buttons

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
This commit is contained in:
Ralf Ramsauer 2018-09-03 21:57:03 +00:00
parent 0f6c837eb8
commit 25595f18f2

View File

@ -160,6 +160,16 @@ static inline void setup_ports(void)
DDRD = (1 << PD5) | (1 << PD6);
}
static inline bool is_emergency(void)
{
return !(PINB & (1 << PB3));
}
static inline bool is_door_open(void)
{
return !(PINB & (1 << PB2));
}
static unsigned char get_keys(void)
{
unsigned char ret = 0;