Skip to content

Commit

Permalink
Fixed parallel port Read; fixed pulled_up name
Browse files Browse the repository at this point in the history
  • Loading branch information
pichenettes committed Oct 10, 2012
1 parent 4b64093 commit 67b25bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions devices/switch.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@

namespace avrlib {

template<typename Input, bool pulled_up = true>
template<typename Input, bool enable_pull_up = true>
class DebouncedSwitch {
public:
DebouncedSwitch() { }

static inline void Init() {
Input::set_mode(DIGITAL_INPUT);
if (pulled_up) {
if (enable_pull_up) {
Input::High();
}
state_ = 0xff;
Expand All @@ -62,8 +62,8 @@ class DebouncedSwitch {
};

/* static */
template<typename Input, bool pulled_up>
uint8_t DebouncedSwitch<Input, pulled_up>::state_;
template<typename Input, bool enable_pull_up>
uint8_t DebouncedSwitch<Input, enable_pull_up>::state_;


template<typename Load, typename Clock, typename Data, uint8_t num_inputs>
Expand Down
2 changes: 1 addition & 1 deletion parallel_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
};
Expand Down

0 comments on commit 67b25bc

Please sign in to comment.