From ba617778ee01eaf7d0ed64709a472f082839c923 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Tue, 14 Jun 2011 00:28:16 +0200 Subject: src/common: stop led display when button is pressed --- src/common/button.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/common/button.c') diff --git a/src/common/button.c b/src/common/button.c index 716941d..78e5b26 100644 --- a/src/common/button.c +++ b/src/common/button.c @@ -43,3 +43,10 @@ button_wait (void) while (!IO_GET (BUTTON_IO)) ; } + +uint8_t +button_pressed (void) +{ + return !IO_GET (BUTTON_IO); +} + -- cgit v1.2.3