Use immediate variable expansion in the second-deepest level makefile scripts to...
[pub/USBasp.git] / LUFA / Drivers / Board / AVR8 / BUMBLEB / Joystick.h
index 9866574..6b0df05 100644 (file)
@@ -1,13 +1,13 @@
 /*
              LUFA Library
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2011.
+     Copyright (C) Dean Camera, 2012.
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
 
   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
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
  *  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.
  *
  *  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.
  *
+ *  <table>
+ *    <tr><th>Left Port Pin</th><th>Up Port Pin</th><th>Right Port Pin</th><th>Down Port Pin</th><th>Press Port Pin</th></tr>
+ *    <tr><td>PORTD.2</td><td>PORTD.3</td><td>PORTD.0</td><td>PORTD.1</td><td>PORTD.4</td></tr>
+ *  </table>
+ *
  *  @{
  */
 
  *  @{
  */
 
                        static inline void Joystick_Init(void)
                        {
                                DDRD  &= ~JOY_MASK;
                        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;
                        }
 
                        static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;