X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/910bca557cbdc34dbc8db9df91d00103ffd73c88..0da99447d3e88e83f9977501bee56af5c7aa56c0:/LUFA/Drivers/Board/AVR8/BUMBLEB/Joystick.h diff --git a/LUFA/Drivers/Board/AVR8/BUMBLEB/Joystick.h b/LUFA/Drivers/Board/AVR8/BUMBLEB/Joystick.h index e9ff2f888..6b0df050b 100644 --- a/LUFA/Drivers/Board/AVR8/BUMBLEB/Joystick.h +++ b/LUFA/Drivers/Board/AVR8/BUMBLEB/Joystick.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2011. + Copyright (C) Dean Camera, 2012. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -29,7 +29,7 @@ */ /** \file - * \brief Board specific joystick driver header for the Fletchtronics BUMLEB. + * \brief Board specific joystick driver header for the Fletchtronics BUMBLEB. * \copydetails Group_Joystick_BUMBLEB * * \note This file should not be included directly. It is automatically included as needed by the joystick driver @@ -38,12 +38,17 @@ /** \ingroup Group_Joystick * \defgroup Group_Joystick_BUMBLEB BUMBLEB - * \brief Board specific joystick driver header for the Fletchtronics BUMLEB. + * \brief Board specific joystick driver header for the Fletchtronics BUMBLEB. * * Board specific joystick driver header for the Fletchtronics BUMBLEB (http://fletchtronics.net/bumble-b). The BUMBLEB * third-party board does not include any on-board peripherals, but does have an officially recommended external peripheral * layout for buttons, LEDs and a Joystick. * + * + * + * + *
Left Port PinUp Port PinRight Port PinDown Port PinPress Port Pin
PORTD.2PORTD.3PORTD.0PORTD.1PORTD.4
+ * * @{ */ @@ -91,7 +96,13 @@ static inline void Joystick_Init(void) { DDRD &= ~JOY_MASK; - PORTD |= JOY_MASK; + PORTD |= JOY_MASK; + } + + static inline void Joystick_Disable(void) + { + DDRD &= ~JOY_MASK; + PORTD &= ~JOY_MASK; } static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;