mirror of
https://github.com/binary-kitchen/doorlockd
synced 2024-12-22 02:14:26 +01:00
avr: add accessors for emergency buttons
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
This commit is contained in:
parent
0f6c837eb8
commit
25595f18f2
@ -160,6 +160,16 @@ static inline void setup_ports(void)
|
|||||||
DDRD = (1 << PD5) | (1 << PD6);
|
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)
|
static unsigned char get_keys(void)
|
||||||
{
|
{
|
||||||
unsigned char ret = 0;
|
unsigned char ret = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user