diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2012-01-29 14:33:36 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2012-01-29 14:33:36 +0000 |
| commit | 4478a62f1160b53f57acecf68c182a67ad8a6bd2 (patch) | |
| tree | 0d5ffd18c3d061f7b91443417ce61ff07b02af3e /LUFA/Drivers/Board/AVR8/TUL | |
| parent | 5e04af2c4afa4513fd95817423119e9b4871c02a (diff) | |
Added new LEDs_Disable(), Buttons_Disable() and Joystick_Disable() functions to the board hardware drivers.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@2013 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'LUFA/Drivers/Board/AVR8/TUL')
| -rw-r--r-- | LUFA/Drivers/Board/AVR8/TUL/Buttons.h | 6 | ||||
| -rw-r--r-- | LUFA/Drivers/Board/AVR8/TUL/LEDs.h | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/LUFA/Drivers/Board/AVR8/TUL/Buttons.h b/LUFA/Drivers/Board/AVR8/TUL/Buttons.h index 191caa9d..ae5f8c8a 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 4968a188..def25fd1 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; |
