From 947caf8be9d94713d012443f950e148f8fa6e7c8 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Tue, 5 Jun 2012 18:13:20 -0400 Subject: isButtonPressed(): Take a pin and pressedLevel argument. This allows dealing with push-buttons on pins other than BOARD_BUTTON_PIN. Signed-off-by: Marti Bolivar --- wirish/include/wirish/io.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'wirish/include') diff --git a/wirish/include/wirish/io.h b/wirish/include/wirish/io.h index b5fe3a8..08bbc06 100644 --- a/wirish/include/wirish/io.h +++ b/wirish/include/wirish/io.h @@ -181,7 +181,8 @@ static inline void toggleLED() { * * @see pinMode() */ -uint8 isButtonPressed(); +uint8 isButtonPressed(uint8 pin=BOARD_BUTTON_PIN, + uint32 pressedLevel=BOARD_BUTTON_PRESSED_LEVEL); /** * Wait until the button is pressed and released, timing out if no -- cgit v1.2.3