From 67b25bcac85363b9447c9f4e24151eb76db4e680 Mon Sep 17 00:00:00 2001 From: pichenettes Date: Wed, 10 Oct 2012 18:17:42 +0200 Subject: [PATCH] Fixed parallel port Read; fixed pulled_up name --- devices/switch.h | 8 ++++---- parallel_io.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/devices/switch.h b/devices/switch.h index 5ffa22e..ceb2f97 100755 --- a/devices/switch.h +++ b/devices/switch.h @@ -29,14 +29,14 @@ namespace avrlib { -template +template class DebouncedSwitch { public: DebouncedSwitch() { } static inline void Init() { Input::set_mode(DIGITAL_INPUT); - if (pulled_up) { + if (enable_pull_up) { Input::High(); } state_ = 0xff; @@ -62,8 +62,8 @@ class DebouncedSwitch { }; /* static */ -template -uint8_t DebouncedSwitch::state_; +template +uint8_t DebouncedSwitch::state_; template diff --git a/parallel_io.h b/parallel_io.h index f3e4165..02da5dd 100755 --- a/parallel_io.h +++ b/parallel_io.h @@ -97,7 +97,7 @@ struct ParallelPort { Write(Masks::mask); } - static inline void Read(uint8_t value) { + static inline uint8_t Read() { return (*Port::Input::ptr() & Masks::mask) >> Masks::shift; } };