From 5563da6a626a7301e5064a8df8b3a9b03421f8aa Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 29 Jan 2012 14:33:36 +0000 Subject: Added new LEDs_Disable(), Buttons_Disable() and Joystick_Disable() functions to the board hardware drivers. --- LUFA/Drivers/Board/AVR8/TUL/Buttons.h | 6 ++++++ LUFA/Drivers/Board/AVR8/TUL/LEDs.h | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'LUFA/Drivers/Board/AVR8/TUL') diff --git a/LUFA/Drivers/Board/AVR8/TUL/Buttons.h b/LUFA/Drivers/Board/AVR8/TUL/Buttons.h index 191caa9d2..ae5f8c8a2 100644 --- a/LUFA/Drivers/Board/AVR8/TUL/Buttons.h +++ b/LUFA/Drivers/Board/AVR8/TUL/Buttons.h @@ -74,6 +74,12 @@ PORTE |= BUTTONS_BUTTON1; } + static inline void Buttons_Disable(void) + { + DDRE &= ~BUTTONS_BUTTON1; + PORTE &= ~BUTTONS_BUTTON1; + } + static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT; static inline uint8_t Buttons_GetStatus(void) { diff --git a/LUFA/Drivers/Board/AVR8/TUL/LEDs.h b/LUFA/Drivers/Board/AVR8/TUL/LEDs.h index 4968a1888..def25fd16 100644 --- a/LUFA/Drivers/Board/AVR8/TUL/LEDs.h +++ b/LUFA/Drivers/Board/AVR8/TUL/LEDs.h @@ -80,6 +80,12 @@ PORTF &= ~LEDS_ALL_LEDS; } + static inline void LEDs_Disable(void) + { + DDRF &= ~LEDS_ALL_LEDS; + PORTF &= ~LEDS_ALL_LEDS; + } + static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) { PORTF |= LEDMask; -- cgit v1.2.3