Added SVN eol-style property to the library driver files that are missing it.pull/1469/head
							parent
							
								
									accadba2dd
								
							
						
					
					
						commit
						ccc82ce745
					
				@ -1,131 +1,131 @@
 | 
				
			|||||||
/*
 | 
					/*
 | 
				
			||||||
             LUFA Library
 | 
					             LUFA Library
 | 
				
			||||||
     Copyright (C) Dean Camera, 2010.
 | 
					     Copyright (C) Dean Camera, 2010.
 | 
				
			||||||
              
 | 
					              
 | 
				
			||||||
  dean [at] fourwalledcubicle [dot] com
 | 
					  dean [at] fourwalledcubicle [dot] com
 | 
				
			||||||
      www.fourwalledcubicle.com
 | 
					      www.fourwalledcubicle.com
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 | 
					  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Permission to use, copy, modify, distribute, and sell this 
 | 
					  Permission to use, copy, modify, distribute, and sell this 
 | 
				
			||||||
  software and its documentation for any purpose is hereby granted
 | 
					  software and its documentation for any purpose is hereby granted
 | 
				
			||||||
  without fee, provided that the above copyright notice appear in 
 | 
					  without fee, provided that the above copyright notice appear in 
 | 
				
			||||||
  all copies and that both that the copyright notice and this
 | 
					  all copies and that both that the copyright notice and this
 | 
				
			||||||
  permission notice and warranty disclaimer appear in supporting 
 | 
					  permission notice and warranty disclaimer appear in supporting 
 | 
				
			||||||
  documentation, and that the name of the author not be used in 
 | 
					  documentation, and that the name of the author not be used in 
 | 
				
			||||||
  advertising or publicity pertaining to distribution of the 
 | 
					  advertising or publicity pertaining to distribution of the 
 | 
				
			||||||
  software without specific, written prior permission.
 | 
					  software without specific, written prior permission.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  The author disclaim all warranties with regard to this
 | 
					  The author disclaim all warranties with regard to this
 | 
				
			||||||
  software, including all implied warranties of merchantability
 | 
					  software, including all implied warranties of merchantability
 | 
				
			||||||
  and fitness.  In no event shall the author be liable for any
 | 
					  and fitness.  In no event shall the author be liable for any
 | 
				
			||||||
  special, indirect or consequential damages or any damages
 | 
					  special, indirect or consequential damages or any damages
 | 
				
			||||||
  whatsoever resulting from loss of use, data or profits, whether
 | 
					  whatsoever resulting from loss of use, data or profits, whether
 | 
				
			||||||
  in an action of contract, negligence or other tortious action,
 | 
					  in an action of contract, negligence or other tortious action,
 | 
				
			||||||
  arising out of or in connection with the use or performance of
 | 
					  arising out of or in connection with the use or performance of
 | 
				
			||||||
  this software.
 | 
					  this software.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \file
 | 
					/** \file
 | 
				
			||||||
 *  \brief Board specific LED driver header for the Busware BUI.
 | 
					 *  \brief Board specific LED driver header for the Busware BUI.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Board specific LED driver header for the Busware BUI (http://www.busware.de/tiki-index.php?page=BUI).
 | 
					 *  Board specific LED driver header for the Busware BUI (http://www.busware.de/tiki-index.php?page=BUI).
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
 | 
					 *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
 | 
				
			||||||
 *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
 | 
					 *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \ingroup Group_LEDs
 | 
					/** \ingroup Group_LEDs
 | 
				
			||||||
 *  @defgroup Group_LEDs_BUI BUI
 | 
					 *  @defgroup Group_LEDs_BUI BUI
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Board specific LED driver header for the Busware BUI (http://www.busware.de/tiki-index.php?page=BUI).
 | 
					 *  Board specific LED driver header for the Busware BUI (http://www.busware.de/tiki-index.php?page=BUI).
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
 | 
					 *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
 | 
				
			||||||
 *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
 | 
					 *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  @{
 | 
					 *  @{
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __LEDS_BUI_H__
 | 
					#ifndef __LEDS_BUI_H__
 | 
				
			||||||
#define __LEDS_BUI_H__
 | 
					#define __LEDS_BUI_H__
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Includes: */
 | 
						/* Includes: */
 | 
				
			||||||
		#include <avr/io.h>
 | 
							#include <avr/io.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Enable C linkage for C++ Compilers: */
 | 
					/* Enable C linkage for C++ Compilers: */
 | 
				
			||||||
		#if defined(__cplusplus)
 | 
							#if defined(__cplusplus)
 | 
				
			||||||
			extern "C" {
 | 
								extern "C" {
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Preprocessor Checks: */
 | 
						/* Preprocessor Checks: */
 | 
				
			||||||
		#if !defined(INCLUDE_FROM_LEDS_H)
 | 
							#if !defined(INCLUDE_FROM_LEDS_H)
 | 
				
			||||||
			#error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
 | 
								#error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Public Interface - May be used in end-application: */
 | 
						/* Public Interface - May be used in end-application: */
 | 
				
			||||||
		/* Macros: */
 | 
							/* Macros: */
 | 
				
			||||||
			/** LED mask for the first LED on the board. */
 | 
								/** LED mask for the first LED on the board. */
 | 
				
			||||||
			#define LEDS_LED1        (1 << 2)
 | 
								#define LEDS_LED1        (1 << 2)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			/** LED mask for the second LED on the board. */
 | 
								/** LED mask for the second LED on the board. */
 | 
				
			||||||
			#define LEDS_LED2        (1 << 3)
 | 
								#define LEDS_LED2        (1 << 3)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			/** LED mask for the third LED on the board. */
 | 
								/** LED mask for the third LED on the board. */
 | 
				
			||||||
			#define LEDS_LED3        (1 << 4)
 | 
								#define LEDS_LED3        (1 << 4)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			/** LED mask for all the LEDs on the board. */
 | 
								/** LED mask for all the LEDs on the board. */
 | 
				
			||||||
			#define LEDS_ALL_LEDS    (LEDS_LED1 | LEDS_LED2 | LEDS_LED3)
 | 
								#define LEDS_ALL_LEDS    (LEDS_LED1 | LEDS_LED2 | LEDS_LED3)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			/** LED mask for none of the board LEDs. */
 | 
								/** LED mask for none of the board LEDs. */
 | 
				
			||||||
			#define LEDS_NO_LEDS     0
 | 
								#define LEDS_NO_LEDS     0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		/* Inline Functions: */
 | 
							/* Inline Functions: */
 | 
				
			||||||
		#if !defined(__DOXYGEN__)
 | 
							#if !defined(__DOXYGEN__)
 | 
				
			||||||
			static inline void LEDs_Init(void)
 | 
								static inline void LEDs_Init(void)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				DDRC |= LEDS_ALL_LEDS;
 | 
									DDRC |= LEDS_ALL_LEDS;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
			static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
 | 
								static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTC |= LEDMask;
 | 
									PORTC |= LEDMask;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
 | 
								static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTC &= ~LEDMask;
 | 
									PORTC &= ~LEDMask;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
 | 
								static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTC = (PORTC & ~LEDS_ALL_LEDS) | LEDMask;
 | 
									PORTC = (PORTC & ~LEDS_ALL_LEDS) | LEDMask;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
			static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
 | 
								static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
 | 
				
			||||||
			                                   const uint8_t ActiveMask)
 | 
								                                   const uint8_t ActiveMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTC = (PORTC & ~LEDMask) | ActiveMask;
 | 
									PORTC = (PORTC & ~LEDMask) | ActiveMask;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
 | 
								static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTC ^= LEDMask;
 | 
									PORTC ^= LEDMask;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
			static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
 | 
								static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
 | 
				
			||||||
			static inline uint8_t LEDs_GetLEDs(void)
 | 
								static inline uint8_t LEDs_GetLEDs(void)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				return (PORTC & LEDS_ALL_LEDS);
 | 
									return (PORTC & LEDS_ALL_LEDS);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Disable C linkage for C++ Compilers: */
 | 
						/* Disable C linkage for C++ Compilers: */
 | 
				
			||||||
		#if defined(__cplusplus)
 | 
							#if defined(__cplusplus)
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** @} */
 | 
					/** @} */
 | 
				
			||||||
 | 
				
			|||||||
@ -0,0 +1,97 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					             LUFA Library
 | 
				
			||||||
 | 
					     Copyright (C) Dean Camera, 2010.
 | 
				
			||||||
 | 
					              
 | 
				
			||||||
 | 
					  dean [at] fourwalledcubicle [dot] com
 | 
				
			||||||
 | 
					      www.fourwalledcubicle.com
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					  Copyright 2010  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
 | 
				
			||||||
 | 
					  without fee, provided that the above copyright notice appear in 
 | 
				
			||||||
 | 
					  all copies and that both that the copyright notice and this
 | 
				
			||||||
 | 
					  permission notice and warranty disclaimer appear in supporting 
 | 
				
			||||||
 | 
					  documentation, and that the name of the author not be used in 
 | 
				
			||||||
 | 
					  advertising or publicity pertaining to distribution of the 
 | 
				
			||||||
 | 
					  software without specific, written prior permission.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  The author disclaim all warranties with regard to this
 | 
				
			||||||
 | 
					  software, including all implied warranties of merchantability
 | 
				
			||||||
 | 
					  and fitness.  In no event shall the author be liable for any
 | 
				
			||||||
 | 
					  special, indirect or consequential damages or any damages
 | 
				
			||||||
 | 
					  whatsoever resulting from loss of use, data or profits, whether
 | 
				
			||||||
 | 
					  in an action of contract, negligence or other tortious action,
 | 
				
			||||||
 | 
					  arising out of or in connection with the use or performance of
 | 
				
			||||||
 | 
					  this software.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** \file
 | 
				
			||||||
 | 
					 *  \brief Board specific LED driver header for the Busware CUL V3.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 *  Board specific LED driver header for the Busware CUL V3 (http://busware.de/tiki-index.php?page=CUL).
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
 | 
				
			||||||
 | 
					 *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** \ingroup Group_LEDs
 | 
				
			||||||
 | 
					 *  @defgroup Group_LEDs_CULV3 CUL V3
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 *  Board specific LED driver header for the Busware CUL V3 (http://busware.de/tiki-index.php?page=CUL).
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
 | 
				
			||||||
 | 
					 *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 *  @{
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef __BUTTONS_CULV3_H__
 | 
				
			||||||
 | 
					#define __BUTTONS_CULV3_H__
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Includes: */
 | 
				
			||||||
 | 
							#include <avr/io.h>
 | 
				
			||||||
 | 
							#include <stdbool.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							#include "../../../Common/Common.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Enable C linkage for C++ Compilers: */
 | 
				
			||||||
 | 
							#if defined(__cplusplus)
 | 
				
			||||||
 | 
								extern "C" {
 | 
				
			||||||
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Preprocessor Checks: */
 | 
				
			||||||
 | 
							#if !defined(__INCLUDE_FROM_BUTTONS_H)
 | 
				
			||||||
 | 
								#error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
 | 
				
			||||||
 | 
							#endif
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
						/* Public Interface - May be used in end-application: */
 | 
				
			||||||
 | 
							/* Macros: */
 | 
				
			||||||
 | 
								/** Button mask for the first button on the board. */
 | 
				
			||||||
 | 
								#define BUTTONS_BUTTON1      (1 << 2)
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
							/* Inline Functions: */
 | 
				
			||||||
 | 
							#if !defined(__DOXYGEN__)
 | 
				
			||||||
 | 
								static inline void Buttons_Init(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)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									return ((PINE & BUTTONS_BUTTON1) ^ BUTTONS_BUTTON1);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Disable C linkage for C++ Compilers: */
 | 
				
			||||||
 | 
							#if defined(__cplusplus)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							#endif
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** @} */
 | 
				
			||||||
@ -0,0 +1,128 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					             LUFA Library
 | 
				
			||||||
 | 
					     Copyright (C) Dean Camera, 2010.
 | 
				
			||||||
 | 
					              
 | 
				
			||||||
 | 
					  dean [at] fourwalledcubicle [dot] com
 | 
				
			||||||
 | 
					      www.fourwalledcubicle.com
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					  Copyright 2010  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
 | 
				
			||||||
 | 
					  without fee, provided that the above copyright notice appear in 
 | 
				
			||||||
 | 
					  all copies and that both that the copyright notice and this
 | 
				
			||||||
 | 
					  permission notice and warranty disclaimer appear in supporting 
 | 
				
			||||||
 | 
					  documentation, and that the name of the author not be used in 
 | 
				
			||||||
 | 
					  advertising or publicity pertaining to distribution of the 
 | 
				
			||||||
 | 
					  software without specific, written prior permission.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  The author disclaim all warranties with regard to this
 | 
				
			||||||
 | 
					  software, including all implied warranties of merchantability
 | 
				
			||||||
 | 
					  and fitness.  In no event shall the author be liable for any
 | 
				
			||||||
 | 
					  special, indirect or consequential damages or any damages
 | 
				
			||||||
 | 
					  whatsoever resulting from loss of use, data or profits, whether
 | 
				
			||||||
 | 
					  in an action of contract, negligence or other tortious action,
 | 
				
			||||||
 | 
					  arising out of or in connection with the use or performance of
 | 
				
			||||||
 | 
					  this software.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** \file
 | 
				
			||||||
 | 
					 *  \brief Board specific LED driver header for the Busware CUL V3.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 *  Board specific LED driver header for the Busware CUL V3 (http://busware.de/tiki-index.php?page=CUL).
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
 | 
				
			||||||
 | 
					 *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** \ingroup Group_LEDs
 | 
				
			||||||
 | 
					 *  @defgroup Group_LEDs_CULV3 CUL V3
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 *  Board specific LED driver header for the Busware CUL V3 (http://busware.de/tiki-index.php?page=CUL).
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
 | 
				
			||||||
 | 
					 *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 *  @{
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef __LEDS_CULV3_H__
 | 
				
			||||||
 | 
					#define __LEDS_CULV3_H__
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Includes: */
 | 
				
			||||||
 | 
							#include <avr/io.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							#include "../../../Common/Common.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Enable C linkage for C++ Compilers: */
 | 
				
			||||||
 | 
							#if defined(__cplusplus)
 | 
				
			||||||
 | 
								extern "C" {
 | 
				
			||||||
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Preprocessor Checks: */
 | 
				
			||||||
 | 
							#if !defined(__INCLUDE_FROM_LEDS_H)
 | 
				
			||||||
 | 
								#error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
 | 
				
			||||||
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Public Interface - May be used in end-application: */
 | 
				
			||||||
 | 
							/* Macros: */
 | 
				
			||||||
 | 
								/** LED mask for the first LED on the board. */
 | 
				
			||||||
 | 
								#define LEDS_LED1        (1 << 6)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								/** LED mask for all the LEDs on the board. */
 | 
				
			||||||
 | 
								#define LEDS_ALL_LEDS    LEDS_LED1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								/** LED mask for the none of the board LEDs. */
 | 
				
			||||||
 | 
								#define LEDS_NO_LEDS     0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							/* Inline Functions: */
 | 
				
			||||||
 | 
							#if !defined(__DOXYGEN__)
 | 
				
			||||||
 | 
								static inline void LEDs_Init(void)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									DDRE  |=  LEDS_ALL_LEDS;
 | 
				
			||||||
 | 
									PORTE &= ~LEDS_ALL_LEDS;
 | 
				
			||||||
 | 
					         	}
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
								static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									PORTE |= LEDMask;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									PORTE &= ~LEDMask;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									PORTE = ((PORTE & ~LEDS_ALL_LEDS) | LEDMask);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
								static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
 | 
				
			||||||
 | 
								                                   const uint8_t ActiveMask)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									PORTE = ((PORTE & ~LEDMask) | ActiveMask);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
								static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									PORTE = (PORTE ^ (LEDMask & LEDS_ALL_LEDS));
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
								static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
 | 
				
			||||||
 | 
								static inline uint8_t LEDs_GetLEDs(void)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									return (PORTE & LEDS_ALL_LEDS);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Disable C linkage for C++ Compilers: */
 | 
				
			||||||
 | 
							#if defined(__cplusplus)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							#endif
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** @} */
 | 
				
			||||||
@ -1,97 +1,97 @@
 | 
				
			|||||||
/*
 | 
					/*
 | 
				
			||||||
             LUFA Library
 | 
					             LUFA Library
 | 
				
			||||||
     Copyright (C) Dean Camera, 2010.
 | 
					     Copyright (C) Dean Camera, 2010.
 | 
				
			||||||
              
 | 
					              
 | 
				
			||||||
  dean [at] fourwalledcubicle [dot] com
 | 
					  dean [at] fourwalledcubicle [dot] com
 | 
				
			||||||
      www.fourwalledcubicle.com
 | 
					      www.fourwalledcubicle.com
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 | 
					  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Permission to use, copy, modify, distribute, and sell this 
 | 
					  Permission to use, copy, modify, distribute, and sell this 
 | 
				
			||||||
  software and its documentation for any purpose is hereby granted
 | 
					  software and its documentation for any purpose is hereby granted
 | 
				
			||||||
  without fee, provided that the above copyright notice appear in 
 | 
					  without fee, provided that the above copyright notice appear in 
 | 
				
			||||||
  all copies and that both that the copyright notice and this
 | 
					  all copies and that both that the copyright notice and this
 | 
				
			||||||
  permission notice and warranty disclaimer appear in supporting 
 | 
					  permission notice and warranty disclaimer appear in supporting 
 | 
				
			||||||
  documentation, and that the name of the author not be used in 
 | 
					  documentation, and that the name of the author not be used in 
 | 
				
			||||||
  advertising or publicity pertaining to distribution of the 
 | 
					  advertising or publicity pertaining to distribution of the 
 | 
				
			||||||
  software without specific, written prior permission.
 | 
					  software without specific, written prior permission.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  The author disclaim all warranties with regard to this
 | 
					  The author disclaim all warranties with regard to this
 | 
				
			||||||
  software, including all implied warranties of merchantability
 | 
					  software, including all implied warranties of merchantability
 | 
				
			||||||
  and fitness.  In no event shall the author be liable for any
 | 
					  and fitness.  In no event shall the author be liable for any
 | 
				
			||||||
  special, indirect or consequential damages or any damages
 | 
					  special, indirect or consequential damages or any damages
 | 
				
			||||||
  whatsoever resulting from loss of use, data or profits, whether
 | 
					  whatsoever resulting from loss of use, data or profits, whether
 | 
				
			||||||
  in an action of contract, negligence or other tortious action,
 | 
					  in an action of contract, negligence or other tortious action,
 | 
				
			||||||
  arising out of or in connection with the use or performance of
 | 
					  arising out of or in connection with the use or performance of
 | 
				
			||||||
  this software.
 | 
					  this software.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \file
 | 
					/** \file
 | 
				
			||||||
 *  \brief Board specific Buttons driver header for the Olimex AVR-USB-162 Development Board.
 | 
					 *  \brief Board specific Buttons driver header for the Olimex AVR-USB-162 Development Board.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Board specific Buttons driver header for the Olimex AVR-USB-162 Development Board (http://www.olimex.com/dev/avr-usb-162.html).
 | 
					 *  Board specific Buttons driver header for the Olimex AVR-USB-162 Development Board (http://www.olimex.com/dev/avr-usb-162.html).
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  \note This file should not be included directly. It is automatically included as needed by the Buttons driver
 | 
					 *  \note This file should not be included directly. It is automatically included as needed by the Buttons driver
 | 
				
			||||||
 *        dispatch header located in LUFA/Drivers/Board/Buttons.h.
 | 
					 *        dispatch header located in LUFA/Drivers/Board/Buttons.h.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
/** \ingroup Group_Buttons
 | 
					/** \ingroup Group_Buttons
 | 
				
			||||||
 *  @defgroup Group_Buttons_OLIMEX162 OLIMEX162
 | 
					 *  @defgroup Group_Buttons_OLIMEX162 OLIMEX162
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Board specific Buttons driver header for the Olimex AVR-USB-162 Development Board (http://www.olimex.com/dev/avr-usb-162.html).
 | 
					 *  Board specific Buttons driver header for the Olimex AVR-USB-162 Development Board (http://www.olimex.com/dev/avr-usb-162.html).
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  \note This file should not be included directly. It is automatically included as needed by the Buttons driver
 | 
					 *  \note This file should not be included directly. It is automatically included as needed by the Buttons driver
 | 
				
			||||||
 *        dispatch header located in LUFA/Drivers/Board/Buttons.h.
 | 
					 *        dispatch header located in LUFA/Drivers/Board/Buttons.h.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  @{
 | 
					 *  @{
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __BUTTONS_OLIMEX162_H__
 | 
					#ifndef __BUTTONS_OLIMEX162_H__
 | 
				
			||||||
#define __BUTTONS_OLIMEX162_H__
 | 
					#define __BUTTONS_OLIMEX162_H__
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Includes: */
 | 
						/* Includes: */
 | 
				
			||||||
		#include <avr/io.h>
 | 
							#include <avr/io.h>
 | 
				
			||||||
		#include <stdbool.h>
 | 
							#include <stdbool.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		#include "../../../Common/Common.h"
 | 
							#include "../../../Common/Common.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Enable C linkage for C++ Compilers: */
 | 
						/* Enable C linkage for C++ Compilers: */
 | 
				
			||||||
		#if defined(__cplusplus)
 | 
							#if defined(__cplusplus)
 | 
				
			||||||
			extern "C" {
 | 
								extern "C" {
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Preprocessor Checks: */
 | 
						/* Preprocessor Checks: */
 | 
				
			||||||
		#if !defined(__INCLUDE_FROM_BUTTONS_H)
 | 
							#if !defined(__INCLUDE_FROM_BUTTONS_H)
 | 
				
			||||||
			#error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
 | 
								#error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
	/* Public Interface - May be used in end-application: */
 | 
						/* Public Interface - May be used in end-application: */
 | 
				
			||||||
		/* Macros: */
 | 
							/* Macros: */
 | 
				
			||||||
			/** Button mask for the first button on the board. */
 | 
								/** Button mask for the first button on the board. */
 | 
				
			||||||
			#define BUTTONS_BUTTON1      (1 << 7)
 | 
								#define BUTTONS_BUTTON1      (1 << 7)
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
		/* Inline Functions: */
 | 
							/* Inline Functions: */
 | 
				
			||||||
		#if !defined(__DOXYGEN__)
 | 
							#if !defined(__DOXYGEN__)
 | 
				
			||||||
			static inline void Buttons_Init(void)
 | 
								static inline void Buttons_Init(void)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				DDRD  &= ~BUTTONS_BUTTON1;
 | 
									DDRD  &= ~BUTTONS_BUTTON1;
 | 
				
			||||||
				PORTD |=  BUTTONS_BUTTON1;
 | 
									PORTD |=  BUTTONS_BUTTON1;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
 | 
								static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
 | 
				
			||||||
			static inline uint8_t Buttons_GetStatus(void)
 | 
								static inline uint8_t Buttons_GetStatus(void)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				return ((PIND & BUTTONS_BUTTON1) ^ BUTTONS_BUTTON1);
 | 
									return ((PIND & BUTTONS_BUTTON1) ^ BUTTONS_BUTTON1);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Disable C linkage for C++ Compilers: */
 | 
						/* Disable C linkage for C++ Compilers: */
 | 
				
			||||||
		#if defined(__cplusplus)
 | 
							#if defined(__cplusplus)
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** @} */
 | 
					/** @} */
 | 
				
			||||||
 | 
				
			|||||||
@ -1,128 +1,128 @@
 | 
				
			|||||||
/*
 | 
					/*
 | 
				
			||||||
             LUFA Library
 | 
					             LUFA Library
 | 
				
			||||||
     Copyright (C) Dean Camera, 2010.
 | 
					     Copyright (C) Dean Camera, 2010.
 | 
				
			||||||
              
 | 
					              
 | 
				
			||||||
  dean [at] fourwalledcubicle [dot] com
 | 
					  dean [at] fourwalledcubicle [dot] com
 | 
				
			||||||
      www.fourwalledcubicle.com
 | 
					      www.fourwalledcubicle.com
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 | 
					  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Permission to use, copy, modify, distribute, and sell this 
 | 
					  Permission to use, copy, modify, distribute, and sell this 
 | 
				
			||||||
  software and its documentation for any purpose is hereby granted
 | 
					  software and its documentation for any purpose is hereby granted
 | 
				
			||||||
  without fee, provided that the above copyright notice appear in 
 | 
					  without fee, provided that the above copyright notice appear in 
 | 
				
			||||||
  all copies and that both that the copyright notice and this
 | 
					  all copies and that both that the copyright notice and this
 | 
				
			||||||
  permission notice and warranty disclaimer appear in supporting 
 | 
					  permission notice and warranty disclaimer appear in supporting 
 | 
				
			||||||
  documentation, and that the name of the author not be used in 
 | 
					  documentation, and that the name of the author not be used in 
 | 
				
			||||||
  advertising or publicity pertaining to distribution of the 
 | 
					  advertising or publicity pertaining to distribution of the 
 | 
				
			||||||
  software without specific, written prior permission.
 | 
					  software without specific, written prior permission.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  The author disclaim all warranties with regard to this
 | 
					  The author disclaim all warranties with regard to this
 | 
				
			||||||
  software, including all implied warranties of merchantability
 | 
					  software, including all implied warranties of merchantability
 | 
				
			||||||
  and fitness.  In no event shall the author be liable for any
 | 
					  and fitness.  In no event shall the author be liable for any
 | 
				
			||||||
  special, indirect or consequential damages or any damages
 | 
					  special, indirect or consequential damages or any damages
 | 
				
			||||||
  whatsoever resulting from loss of use, data or profits, whether
 | 
					  whatsoever resulting from loss of use, data or profits, whether
 | 
				
			||||||
  in an action of contract, negligence or other tortious action,
 | 
					  in an action of contract, negligence or other tortious action,
 | 
				
			||||||
  arising out of or in connection with the use or performance of
 | 
					  arising out of or in connection with the use or performance of
 | 
				
			||||||
  this software.
 | 
					  this software.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \file
 | 
					/** \file
 | 
				
			||||||
 *  \brief Board specific LED driver header for the Olimex AVR-USB-162.
 | 
					 *  \brief Board specific LED driver header for the Olimex AVR-USB-162.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Board specific LED driver header for the Olimex AVR-USB-162 (http://www.olimex.com/dev/avr-usb-162.html).
 | 
					 *  Board specific LED driver header for the Olimex AVR-USB-162 (http://www.olimex.com/dev/avr-usb-162.html).
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
 | 
					 *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
 | 
				
			||||||
 *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
 | 
					 *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \ingroup Group_LEDs
 | 
					/** \ingroup Group_LEDs
 | 
				
			||||||
 *  @defgroup Group_LEDs_OLIMEX162 OLIMEX162
 | 
					 *  @defgroup Group_LEDs_OLIMEX162 OLIMEX162
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Board specific LED driver header for the Olimex AVR-USB-162 (http://www.olimex.com/dev/avr-usb-162.html).
 | 
					 *  Board specific LED driver header for the Olimex AVR-USB-162 (http://www.olimex.com/dev/avr-usb-162.html).
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
 | 
					 *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
 | 
				
			||||||
 *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
 | 
					 *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  @{
 | 
					 *  @{
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
#ifndef __LEDS_OLIMEX162_H__
 | 
					#ifndef __LEDS_OLIMEX162_H__
 | 
				
			||||||
#define __LEDS_OLIMEX162_H__
 | 
					#define __LEDS_OLIMEX162_H__
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Includes: */
 | 
						/* Includes: */
 | 
				
			||||||
		#include <avr/io.h>
 | 
							#include <avr/io.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		#include "../../../Common/Common.h"
 | 
							#include "../../../Common/Common.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Enable C linkage for C++ Compilers: */
 | 
						/* Enable C linkage for C++ Compilers: */
 | 
				
			||||||
		#if defined(__cplusplus)
 | 
							#if defined(__cplusplus)
 | 
				
			||||||
			extern "C" {
 | 
								extern "C" {
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Preprocessor Checks: */
 | 
						/* Preprocessor Checks: */
 | 
				
			||||||
		#if !defined(__INCLUDE_FROM_LEDS_H)
 | 
							#if !defined(__INCLUDE_FROM_LEDS_H)
 | 
				
			||||||
			#error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
 | 
								#error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Public Interface - May be used in end-application: */
 | 
						/* Public Interface - May be used in end-application: */
 | 
				
			||||||
		/* Macros: */
 | 
							/* Macros: */
 | 
				
			||||||
			/** LED mask for the first LED on the board. */
 | 
								/** LED mask for the first LED on the board. */
 | 
				
			||||||
			#define LEDS_LED1        (1 << 4)
 | 
								#define LEDS_LED1        (1 << 4)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			/** LED mask for all the LEDs on the board. */
 | 
								/** LED mask for all the LEDs on the board. */
 | 
				
			||||||
			#define LEDS_ALL_LEDS    LEDS_LED1
 | 
								#define LEDS_ALL_LEDS    LEDS_LED1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			/** LED mask for none of the board LEDs. */
 | 
								/** LED mask for none of the board LEDs. */
 | 
				
			||||||
			#define LEDS_NO_LEDS     0
 | 
								#define LEDS_NO_LEDS     0
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
		/* Inline Functions: */
 | 
							/* Inline Functions: */
 | 
				
			||||||
		#if !defined(__DOXYGEN__)
 | 
							#if !defined(__DOXYGEN__)
 | 
				
			||||||
			static inline void LEDs_Init(void)
 | 
								static inline void LEDs_Init(void)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				DDRD  |= LEDS_ALL_LEDS;
 | 
									DDRD  |= LEDS_ALL_LEDS;
 | 
				
			||||||
				PORTD |= LEDS_ALL_LEDS;
 | 
									PORTD |= LEDS_ALL_LEDS;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
			static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
 | 
								static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTD &= ~LEDMask;
 | 
									PORTD &= ~LEDMask;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
 | 
								static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTD |= LEDMask;
 | 
									PORTD |= LEDMask;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
 | 
								static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTD = ((PORTD | LEDS_ALL_LEDS) & ~LEDMask);
 | 
									PORTD = ((PORTD | LEDS_ALL_LEDS) & ~LEDMask);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
			static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
 | 
								static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
 | 
				
			||||||
			                                   const uint8_t ActiveMask)
 | 
								                                   const uint8_t ActiveMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTD = ((PORTD | LEDMask) & ~ActiveMask);
 | 
									PORTD = ((PORTD | LEDMask) & ~ActiveMask);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
			static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
 | 
								static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTD ^= LEDMask;
 | 
									PORTD ^= LEDMask;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
 | 
								static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
 | 
				
			||||||
			static inline uint8_t LEDs_GetLEDs(void)
 | 
								static inline uint8_t LEDs_GetLEDs(void)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				return (~PORTD & LEDS_ALL_LEDS);
 | 
									return (~PORTD & LEDS_ALL_LEDS);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Disable C linkage for C++ Compilers: */
 | 
						/* Disable C linkage for C++ Compilers: */
 | 
				
			||||||
		#if defined(__cplusplus)
 | 
							#if defined(__cplusplus)
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** @} */
 | 
					/** @} */
 | 
				
			||||||
 | 
				
			|||||||
@ -1,97 +1,97 @@
 | 
				
			|||||||
/*
 | 
					/*
 | 
				
			||||||
             LUFA Library
 | 
					             LUFA Library
 | 
				
			||||||
     Copyright (C) Dean Camera, 2010.
 | 
					     Copyright (C) Dean Camera, 2010.
 | 
				
			||||||
              
 | 
					              
 | 
				
			||||||
  dean [at] fourwalledcubicle [dot] com
 | 
					  dean [at] fourwalledcubicle [dot] com
 | 
				
			||||||
      www.fourwalledcubicle.com
 | 
					      www.fourwalledcubicle.com
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 | 
					  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Permission to use, copy, modify, distribute, and sell this 
 | 
					  Permission to use, copy, modify, distribute, and sell this 
 | 
				
			||||||
  software and its documentation for any purpose is hereby granted
 | 
					  software and its documentation for any purpose is hereby granted
 | 
				
			||||||
  without fee, provided that the above copyright notice appear in 
 | 
					  without fee, provided that the above copyright notice appear in 
 | 
				
			||||||
  all copies and that both that the copyright notice and this
 | 
					  all copies and that both that the copyright notice and this
 | 
				
			||||||
  permission notice and warranty disclaimer appear in supporting 
 | 
					  permission notice and warranty disclaimer appear in supporting 
 | 
				
			||||||
  documentation, and that the name of the author not be used in 
 | 
					  documentation, and that the name of the author not be used in 
 | 
				
			||||||
  advertising or publicity pertaining to distribution of the 
 | 
					  advertising or publicity pertaining to distribution of the 
 | 
				
			||||||
  software without specific, written prior permission.
 | 
					  software without specific, written prior permission.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  The author disclaim all warranties with regard to this
 | 
					  The author disclaim all warranties with regard to this
 | 
				
			||||||
  software, including all implied warranties of merchantability
 | 
					  software, including all implied warranties of merchantability
 | 
				
			||||||
  and fitness.  In no event shall the author be liable for any
 | 
					  and fitness.  In no event shall the author be liable for any
 | 
				
			||||||
  special, indirect or consequential damages or any damages
 | 
					  special, indirect or consequential damages or any damages
 | 
				
			||||||
  whatsoever resulting from loss of use, data or profits, whether
 | 
					  whatsoever resulting from loss of use, data or profits, whether
 | 
				
			||||||
  in an action of contract, negligence or other tortious action,
 | 
					  in an action of contract, negligence or other tortious action,
 | 
				
			||||||
  arising out of or in connection with the use or performance of
 | 
					  arising out of or in connection with the use or performance of
 | 
				
			||||||
  this software.
 | 
					  this software.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \file
 | 
					/** \file
 | 
				
			||||||
 *  \brief Board specific Buttons driver header for the UDIP.
 | 
					 *  \brief Board specific Buttons driver header for the UDIP.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Board specific Buttons driver header for the Linnix UDIP (http://linnix.com/udip/).
 | 
					 *  Board specific Buttons driver header for the Linnix UDIP (http://linnix.com/udip/).
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  \note This file should not be included directly. It is automatically included as needed by the Buttons driver
 | 
					 *  \note This file should not be included directly. It is automatically included as needed by the Buttons driver
 | 
				
			||||||
 *        dispatch header located in LUFA/Drivers/Board/Buttons.h.
 | 
					 *        dispatch header located in LUFA/Drivers/Board/Buttons.h.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
/** \ingroup Group_Buttons
 | 
					/** \ingroup Group_Buttons
 | 
				
			||||||
 *  @defgroup Group_Buttons_UDIP UDIP
 | 
					 *  @defgroup Group_Buttons_UDIP UDIP
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Board specific Buttons driver header for the Linnix UDIP (http://linnix.com/udip/).
 | 
					 *  Board specific Buttons driver header for the Linnix UDIP (http://linnix.com/udip/).
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  \note This file should not be included directly. It is automatically included as needed by the Buttons driver
 | 
					 *  \note This file should not be included directly. It is automatically included as needed by the Buttons driver
 | 
				
			||||||
 *        dispatch header located in LUFA/Drivers/Board/Buttons.h.
 | 
					 *        dispatch header located in LUFA/Drivers/Board/Buttons.h.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  @{
 | 
					 *  @{
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __BUTTONS_UDIP_H__
 | 
					#ifndef __BUTTONS_UDIP_H__
 | 
				
			||||||
#define __BUTTONS_UDIP_H__
 | 
					#define __BUTTONS_UDIP_H__
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Includes: */
 | 
						/* Includes: */
 | 
				
			||||||
		#include <avr/io.h>
 | 
							#include <avr/io.h>
 | 
				
			||||||
		#include <stdbool.h>
 | 
							#include <stdbool.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		#include "../../../Common/Common.h"
 | 
							#include "../../../Common/Common.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Enable C linkage for C++ Compilers: */
 | 
						/* Enable C linkage for C++ Compilers: */
 | 
				
			||||||
		#if defined(__cplusplus)
 | 
							#if defined(__cplusplus)
 | 
				
			||||||
			extern "C" {
 | 
								extern "C" {
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Preprocessor Checks: */
 | 
						/* Preprocessor Checks: */
 | 
				
			||||||
		#if !defined(__INCLUDE_FROM_BUTTONS_H)
 | 
							#if !defined(__INCLUDE_FROM_BUTTONS_H)
 | 
				
			||||||
			#error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
 | 
								#error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
	/* Public Interface - May be used in end-application: */
 | 
						/* Public Interface - May be used in end-application: */
 | 
				
			||||||
		/* Macros: */
 | 
							/* Macros: */
 | 
				
			||||||
			/** Button mask for the first button on the board. */
 | 
								/** Button mask for the first button on the board. */
 | 
				
			||||||
			#define BUTTONS_BUTTON1      (1 << 7)
 | 
								#define BUTTONS_BUTTON1      (1 << 7)
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
		/* Inline Functions: */
 | 
							/* Inline Functions: */
 | 
				
			||||||
		#if !defined(__DOXYGEN__)
 | 
							#if !defined(__DOXYGEN__)
 | 
				
			||||||
			static inline void Buttons_Init(void)
 | 
								static inline void Buttons_Init(void)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				DDRD  &= ~BUTTONS_BUTTON1;
 | 
									DDRD  &= ~BUTTONS_BUTTON1;
 | 
				
			||||||
				PORTD |=  BUTTONS_BUTTON1;
 | 
									PORTD |=  BUTTONS_BUTTON1;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
 | 
								static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
 | 
				
			||||||
			static inline uint8_t Buttons_GetStatus(void)
 | 
								static inline uint8_t Buttons_GetStatus(void)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				return ((PIND & BUTTONS_BUTTON1) ^ BUTTONS_BUTTON1);
 | 
									return ((PIND & BUTTONS_BUTTON1) ^ BUTTONS_BUTTON1);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Disable C linkage for C++ Compilers: */
 | 
						/* Disable C linkage for C++ Compilers: */
 | 
				
			||||||
		#if defined(__cplusplus)
 | 
							#if defined(__cplusplus)
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** @} */
 | 
					/** @} */
 | 
				
			||||||
 | 
				
			|||||||
@ -1,153 +1,153 @@
 | 
				
			|||||||
/*
 | 
					/*
 | 
				
			||||||
             LUFA Library
 | 
					             LUFA Library
 | 
				
			||||||
     Copyright (C) Dean Camera, 2010.
 | 
					     Copyright (C) Dean Camera, 2010.
 | 
				
			||||||
              
 | 
					              
 | 
				
			||||||
  dean [at] fourwalledcubicle [dot] com
 | 
					  dean [at] fourwalledcubicle [dot] com
 | 
				
			||||||
      www.fourwalledcubicle.com
 | 
					      www.fourwalledcubicle.com
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 | 
					  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Permission to use, copy, modify, distribute, and sell this 
 | 
					  Permission to use, copy, modify, distribute, and sell this 
 | 
				
			||||||
  software and its documentation for any purpose is hereby granted
 | 
					  software and its documentation for any purpose is hereby granted
 | 
				
			||||||
  without fee, provided that the above copyright notice appear in 
 | 
					  without fee, provided that the above copyright notice appear in 
 | 
				
			||||||
  all copies and that both that the copyright notice and this
 | 
					  all copies and that both that the copyright notice and this
 | 
				
			||||||
  permission notice and warranty disclaimer appear in supporting 
 | 
					  permission notice and warranty disclaimer appear in supporting 
 | 
				
			||||||
  documentation, and that the name of the author not be used in 
 | 
					  documentation, and that the name of the author not be used in 
 | 
				
			||||||
  advertising or publicity pertaining to distribution of the 
 | 
					  advertising or publicity pertaining to distribution of the 
 | 
				
			||||||
  software without specific, written prior permission.
 | 
					  software without specific, written prior permission.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  The author disclaim all warranties with regard to this
 | 
					  The author disclaim all warranties with regard to this
 | 
				
			||||||
  software, including all implied warranties of merchantability
 | 
					  software, including all implied warranties of merchantability
 | 
				
			||||||
  and fitness.  In no event shall the author be liable for any
 | 
					  and fitness.  In no event shall the author be liable for any
 | 
				
			||||||
  special, indirect or consequential damages or any damages
 | 
					  special, indirect or consequential damages or any damages
 | 
				
			||||||
  whatsoever resulting from loss of use, data or profits, whether
 | 
					  whatsoever resulting from loss of use, data or profits, whether
 | 
				
			||||||
  in an action of contract, negligence or other tortious action,
 | 
					  in an action of contract, negligence or other tortious action,
 | 
				
			||||||
  arising out of or in connection with the use or performance of
 | 
					  arising out of or in connection with the use or performance of
 | 
				
			||||||
  this software.
 | 
					  this software.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \file
 | 
					/** \file
 | 
				
			||||||
 *  \brief Board specific LED driver header for the Linnix UDIP.
 | 
					 *  \brief Board specific LED driver header for the Linnix UDIP.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Board specific LED driver header for the Linnix UDIP (http://linnix.com/udip/).
 | 
					 *  Board specific LED driver header for the Linnix UDIP (http://linnix.com/udip/).
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
 | 
					 *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
 | 
				
			||||||
 *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
 | 
					 *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \ingroup Group_LEDs
 | 
					/** \ingroup Group_LEDs
 | 
				
			||||||
 *  @defgroup Group_LEDs_UDIP UDIP
 | 
					 *  @defgroup Group_LEDs_UDIP UDIP
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Board specific LED driver header for the Linnix UDIP (http://linnix.com/udip/).
 | 
					 *  Board specific LED driver header for the Linnix UDIP (http://linnix.com/udip/).
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
 | 
					 *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
 | 
				
			||||||
 *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
 | 
					 *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  @{
 | 
					 *  @{
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __LEDS_UDIP_H__
 | 
					#ifndef __LEDS_UDIP_H__
 | 
				
			||||||
#define __LEDS_UDIP_H__
 | 
					#define __LEDS_UDIP_H__
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Includes: */
 | 
						/* Includes: */
 | 
				
			||||||
		#include <avr/io.h>
 | 
							#include <avr/io.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		#include "../../../Common/Common.h"
 | 
							#include "../../../Common/Common.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Enable C linkage for C++ Compilers: */
 | 
						/* Enable C linkage for C++ Compilers: */
 | 
				
			||||||
		#if defined(__cplusplus)
 | 
							#if defined(__cplusplus)
 | 
				
			||||||
			extern "C" {
 | 
								extern "C" {
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Preprocessor Checks: */
 | 
						/* Preprocessor Checks: */
 | 
				
			||||||
		#if !defined(__INCLUDE_FROM_LEDS_H)
 | 
							#if !defined(__INCLUDE_FROM_LEDS_H)
 | 
				
			||||||
			#error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
 | 
								#error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Private Interface - For use in library only: */
 | 
						/* Private Interface - For use in library only: */
 | 
				
			||||||
	#if !defined(__DOXYGEN__)
 | 
						#if !defined(__DOXYGEN__)
 | 
				
			||||||
		/* Macros: */
 | 
							/* Macros: */
 | 
				
			||||||
			#define LEDS_PORTB_LEDS       (LEDS_LED1 | LEDS_LED2)
 | 
								#define LEDS_PORTB_LEDS       (LEDS_LED1 | LEDS_LED2)
 | 
				
			||||||
			#define LEDS_PORTD_LEDS       (LEDS_LED3 | LEDS_LED4)
 | 
								#define LEDS_PORTD_LEDS       (LEDS_LED3 | LEDS_LED4)
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
			#define LEDS_PORTD_MASK_SHIFT 1
 | 
								#define LEDS_PORTD_MASK_SHIFT 1
 | 
				
			||||||
	#endif
 | 
						#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Public Interface - May be used in end-application: */
 | 
						/* Public Interface - May be used in end-application: */
 | 
				
			||||||
		/* Macros: */
 | 
							/* Macros: */
 | 
				
			||||||
			/** LED mask for the first LED on the board. */
 | 
								/** LED mask for the first LED on the board. */
 | 
				
			||||||
			#define LEDS_LED1        (1 << 6)
 | 
								#define LEDS_LED1        (1 << 6)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			/** LED mask for the second LED on the board. */
 | 
								/** LED mask for the second LED on the board. */
 | 
				
			||||||
			#define LEDS_LED2        (1 << 5)
 | 
								#define LEDS_LED2        (1 << 5)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			/** LED mask for the third LED on the board. */
 | 
								/** LED mask for the third LED on the board. */
 | 
				
			||||||
			#define LEDS_LED3        ((1 << 5) >> LEDS_PORTD_MASK_SHIFT)
 | 
								#define LEDS_LED3        ((1 << 5) >> LEDS_PORTD_MASK_SHIFT)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			/** LED mask for the fourth LED on the board. */
 | 
								/** LED mask for the fourth LED on the board. */
 | 
				
			||||||
			#define LEDS_LED4        ((1 << 4) >> LEDS_PORTD_MASK_SHIFT)
 | 
								#define LEDS_LED4        ((1 << 4) >> LEDS_PORTD_MASK_SHIFT)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			/** LED mask for all the LEDs on the board. */
 | 
								/** LED mask for all the LEDs on the board. */
 | 
				
			||||||
			#define LEDS_ALL_LEDS    (LEDS_LED1 | LEDS_LED2 | LEDS_LED3 | LEDS_LED4)
 | 
								#define LEDS_ALL_LEDS    (LEDS_LED1 | LEDS_LED2 | LEDS_LED3 | LEDS_LED4)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			/** LED mask for none of the board LEDs. */
 | 
								/** LED mask for none of the board LEDs. */
 | 
				
			||||||
			#define LEDS_NO_LEDS     0
 | 
								#define LEDS_NO_LEDS     0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		/* Inline Functions: */
 | 
							/* Inline Functions: */
 | 
				
			||||||
		#if !defined(__DOXYGEN__)
 | 
							#if !defined(__DOXYGEN__)
 | 
				
			||||||
			static inline void LEDs_Init(void)
 | 
								static inline void LEDs_Init(void)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				DDRB |= LEDS_PORTB_LEDS;
 | 
									DDRB |= LEDS_PORTB_LEDS;
 | 
				
			||||||
				DDRD |= (LEDS_PORTD_LEDS << LEDS_PORTD_MASK_SHIFT);
 | 
									DDRD |= (LEDS_PORTD_LEDS << LEDS_PORTD_MASK_SHIFT);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
			static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
 | 
								static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTB |= (LEDMask & LEDS_PORTB_LEDS);
 | 
									PORTB |= (LEDMask & LEDS_PORTB_LEDS);
 | 
				
			||||||
				PORTD |= ((LEDMask & LEDS_PORTD_LEDS) << LEDS_PORTD_MASK_SHIFT);
 | 
									PORTD |= ((LEDMask & LEDS_PORTD_LEDS) << LEDS_PORTD_MASK_SHIFT);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
 | 
								static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTB &= ~(LEDMask & LEDS_PORTB_LEDS);
 | 
									PORTB &= ~(LEDMask & LEDS_PORTB_LEDS);
 | 
				
			||||||
				PORTD &= ~((LEDMask & LEDS_PORTD_LEDS) << LEDS_PORTD_MASK_SHIFT);
 | 
									PORTD &= ~((LEDMask & LEDS_PORTD_LEDS) << LEDS_PORTD_MASK_SHIFT);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
 | 
								static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTB = (PORTB & ~LEDS_PORTB_LEDS) | (LEDMask & LEDS_PORTB_LEDS);
 | 
									PORTB = (PORTB & ~LEDS_PORTB_LEDS) | (LEDMask & LEDS_PORTB_LEDS);
 | 
				
			||||||
				PORTD = (PORTD & ~(LEDS_PORTD_LEDS << LEDS_PORTD_MASK_SHIFT)) |
 | 
									PORTD = (PORTD & ~(LEDS_PORTD_LEDS << LEDS_PORTD_MASK_SHIFT)) |
 | 
				
			||||||
				        ((LEDMask & LEDS_PORTD_LEDS) << LEDS_PORTD_MASK_SHIFT);
 | 
									        ((LEDMask & LEDS_PORTD_LEDS) << LEDS_PORTD_MASK_SHIFT);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
			static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
 | 
								static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
 | 
				
			||||||
			                                   const uint8_t ActiveMask)
 | 
								                                   const uint8_t ActiveMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTB = (PORTB & ~(LEDMask & LEDS_PORTB_LEDS)) | (ActiveMask & LEDS_PORTB_LEDS);
 | 
									PORTB = (PORTB & ~(LEDMask & LEDS_PORTB_LEDS)) | (ActiveMask & LEDS_PORTB_LEDS);
 | 
				
			||||||
				PORTD = (PORTD & ~((LEDMask & LEDS_PORTD_LEDS) << LEDS_PORTD_MASK_SHIFT)) |
 | 
									PORTD = (PORTD & ~((LEDMask & LEDS_PORTD_LEDS) << LEDS_PORTD_MASK_SHIFT)) |
 | 
				
			||||||
				        ((ActiveMask & LEDS_PORTD_LEDS) << LEDS_PORTD_MASK_SHIFT);
 | 
									        ((ActiveMask & LEDS_PORTD_LEDS) << LEDS_PORTD_MASK_SHIFT);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
			static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
 | 
								static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTB ^= (LEDMask & LEDS_PORTB_LEDS);
 | 
									PORTB ^= (LEDMask & LEDS_PORTB_LEDS);
 | 
				
			||||||
				PORTD ^= ((LEDMask & LEDS_PORTD_LEDS) << LEDS_PORTD_MASK_SHIFT);
 | 
									PORTD ^= ((LEDMask & LEDS_PORTD_LEDS) << LEDS_PORTD_MASK_SHIFT);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
			static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
 | 
								static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
 | 
				
			||||||
			static inline uint8_t LEDs_GetLEDs(void)
 | 
								static inline uint8_t LEDs_GetLEDs(void)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				return ((PORTB & LEDS_PORTB_LEDS) | ((PORTD & LEDS_PORTD_LEDS) >> LEDS_PORTD_MASK_SHIFT));
 | 
									return ((PORTB & LEDS_PORTB_LEDS) | ((PORTD & LEDS_PORTD_LEDS) >> LEDS_PORTD_MASK_SHIFT));
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Disable C linkage for C++ Compilers: */
 | 
						/* Disable C linkage for C++ Compilers: */
 | 
				
			||||||
		#if defined(__cplusplus)
 | 
							#if defined(__cplusplus)
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** @} */
 | 
					/** @} */
 | 
				
			||||||
 | 
				
			|||||||
@ -1,129 +1,129 @@
 | 
				
			|||||||
/*
 | 
					/*
 | 
				
			||||||
             LUFA Library
 | 
					             LUFA Library
 | 
				
			||||||
     Copyright (C) Dean Camera, 2010.
 | 
					     Copyright (C) Dean Camera, 2010.
 | 
				
			||||||
              
 | 
					              
 | 
				
			||||||
  dean [at] fourwalledcubicle [dot] com
 | 
					  dean [at] fourwalledcubicle [dot] com
 | 
				
			||||||
      www.fourwalledcubicle.com
 | 
					      www.fourwalledcubicle.com
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 | 
					  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Permission to use, copy, modify, distribute, and sell this 
 | 
					  Permission to use, copy, modify, distribute, and sell this 
 | 
				
			||||||
  software and its documentation for any purpose is hereby granted
 | 
					  software and its documentation for any purpose is hereby granted
 | 
				
			||||||
  without fee, provided that the above copyright notice appear in 
 | 
					  without fee, provided that the above copyright notice appear in 
 | 
				
			||||||
  all copies and that both that the copyright notice and this
 | 
					  all copies and that both that the copyright notice and this
 | 
				
			||||||
  permission notice and warranty disclaimer appear in supporting 
 | 
					  permission notice and warranty disclaimer appear in supporting 
 | 
				
			||||||
  documentation, and that the name of the author not be used in 
 | 
					  documentation, and that the name of the author not be used in 
 | 
				
			||||||
  advertising or publicity pertaining to distribution of the 
 | 
					  advertising or publicity pertaining to distribution of the 
 | 
				
			||||||
  software without specific, written prior permission.
 | 
					  software without specific, written prior permission.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  The author disclaim all warranties with regard to this
 | 
					  The author disclaim all warranties with regard to this
 | 
				
			||||||
  software, including all implied warranties of merchantability
 | 
					  software, including all implied warranties of merchantability
 | 
				
			||||||
  and fitness.  In no event shall the author be liable for any
 | 
					  and fitness.  In no event shall the author be liable for any
 | 
				
			||||||
  special, indirect or consequential damages or any damages
 | 
					  special, indirect or consequential damages or any damages
 | 
				
			||||||
  whatsoever resulting from loss of use, data or profits, whether
 | 
					  whatsoever resulting from loss of use, data or profits, whether
 | 
				
			||||||
  in an action of contract, negligence or other tortious action,
 | 
					  in an action of contract, negligence or other tortious action,
 | 
				
			||||||
  arising out of or in connection with the use or performance of
 | 
					  arising out of or in connection with the use or performance of
 | 
				
			||||||
  this software.
 | 
					  this software.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \file
 | 
					/** \file
 | 
				
			||||||
 *  \brief Board specific LED driver header for the Arduino Uno.
 | 
					 *  \brief Board specific LED driver header for the Arduino Uno.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Board specific LED driver header for the Arduino Uno (http://arduino.cc/en/Main/ArduinoBoardUno).
 | 
					 *  Board specific LED driver header for the Arduino Uno (http://arduino.cc/en/Main/ArduinoBoardUno).
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
 | 
					 *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
 | 
				
			||||||
 *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
 | 
					 *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \ingroup Group_LEDs
 | 
					/** \ingroup Group_LEDs
 | 
				
			||||||
 *  @defgroup Group_LEDs_UNO UNO
 | 
					 *  @defgroup Group_LEDs_UNO UNO
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Board specific LED driver header for the Arduino Uno (http://arduino.cc/en/Main/ArduinoBoardUno).
 | 
					 *  Board specific LED driver header for the Arduino Uno (http://arduino.cc/en/Main/ArduinoBoardUno).
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
 | 
					 *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
 | 
				
			||||||
 *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
 | 
					 *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  @{
 | 
					 *  @{
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __LEDS_BENITO_H__
 | 
					#ifndef __LEDS_BENITO_H__
 | 
				
			||||||
#define __LEDS_BENITO_H__
 | 
					#define __LEDS_BENITO_H__
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Includes: */
 | 
						/* Includes: */
 | 
				
			||||||
		#include <avr/io.h>
 | 
							#include <avr/io.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Enable C linkage for C++ Compilers: */
 | 
						/* Enable C linkage for C++ Compilers: */
 | 
				
			||||||
		#if defined(__cplusplus)
 | 
							#if defined(__cplusplus)
 | 
				
			||||||
			extern "C" {
 | 
								extern "C" {
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Preprocessor Checks: */
 | 
						/* Preprocessor Checks: */
 | 
				
			||||||
		#if !defined(INCLUDE_FROM_LEDS_H)
 | 
							#if !defined(INCLUDE_FROM_LEDS_H)
 | 
				
			||||||
			#error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
 | 
								#error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Public Interface - May be used in end-application: */
 | 
						/* Public Interface - May be used in end-application: */
 | 
				
			||||||
		/* Macros: */
 | 
							/* Macros: */
 | 
				
			||||||
			/** LED mask for the first LED on the board. */
 | 
								/** LED mask for the first LED on the board. */
 | 
				
			||||||
			#define LEDS_LED1        (1 << 4)
 | 
								#define LEDS_LED1        (1 << 4)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			/** LED mask for the second LED on the board. */
 | 
								/** LED mask for the second LED on the board. */
 | 
				
			||||||
			#define LEDS_LED2        (1 << 5)
 | 
								#define LEDS_LED2        (1 << 5)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			/** LED mask for all the LEDs on the board. */
 | 
								/** LED mask for all the LEDs on the board. */
 | 
				
			||||||
			#define LEDS_ALL_LEDS    (LEDS_LED1 | LEDS_LED2)
 | 
								#define LEDS_ALL_LEDS    (LEDS_LED1 | LEDS_LED2)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			/** LED mask for none of the board LEDs. */
 | 
								/** LED mask for none of the board LEDs. */
 | 
				
			||||||
			#define LEDS_NO_LEDS     0
 | 
								#define LEDS_NO_LEDS     0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		/* Inline Functions: */
 | 
							/* Inline Functions: */
 | 
				
			||||||
		#if !defined(__DOXYGEN__)
 | 
							#if !defined(__DOXYGEN__)
 | 
				
			||||||
			static inline void LEDs_Init(void)
 | 
								static inline void LEDs_Init(void)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				DDRD  |= LEDS_ALL_LEDS;
 | 
									DDRD  |= LEDS_ALL_LEDS;
 | 
				
			||||||
				PORTD |= LEDS_ALL_LEDS;
 | 
									PORTD |= LEDS_ALL_LEDS;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
			static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
 | 
								static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTD &= ~LEDMask;
 | 
									PORTD &= ~LEDMask;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
 | 
								static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTD |= LEDMask;
 | 
									PORTD |= LEDMask;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
 | 
								static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTD = ((PORTD | LEDS_ALL_LEDS) & ~LEDMask);
 | 
									PORTD = ((PORTD | LEDS_ALL_LEDS) & ~LEDMask);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
			static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
 | 
								static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
 | 
				
			||||||
			                                   const uint8_t ActiveMask)
 | 
								                                   const uint8_t ActiveMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTD = ((PORTD | LEDMask) & ~ActiveMask);
 | 
									PORTD = ((PORTD | LEDMask) & ~ActiveMask);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
 | 
								static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTD ^= LEDMask;
 | 
									PORTD ^= LEDMask;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
			static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
 | 
								static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
 | 
				
			||||||
			static inline uint8_t LEDs_GetLEDs(void)
 | 
								static inline uint8_t LEDs_GetLEDs(void)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				return (PORTD & LEDS_ALL_LEDS);
 | 
									return (PORTD & LEDS_ALL_LEDS);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Disable C linkage for C++ Compilers: */
 | 
						/* Disable C linkage for C++ Compilers: */
 | 
				
			||||||
		#if defined(__cplusplus)
 | 
							#if defined(__cplusplus)
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** @} */
 | 
					/** @} */
 | 
				
			||||||
 | 
				
			|||||||
@ -1,97 +1,97 @@
 | 
				
			|||||||
/*
 | 
					/*
 | 
				
			||||||
             LUFA Library
 | 
					             LUFA Library
 | 
				
			||||||
     Copyright (C) Dean Camera, 2010.
 | 
					     Copyright (C) Dean Camera, 2010.
 | 
				
			||||||
              
 | 
					              
 | 
				
			||||||
  dean [at] fourwalledcubicle [dot] com
 | 
					  dean [at] fourwalledcubicle [dot] com
 | 
				
			||||||
      www.fourwalledcubicle.com
 | 
					      www.fourwalledcubicle.com
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 | 
					  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Permission to use, copy, modify, distribute, and sell this 
 | 
					  Permission to use, copy, modify, distribute, and sell this 
 | 
				
			||||||
  software and its documentation for any purpose is hereby granted
 | 
					  software and its documentation for any purpose is hereby granted
 | 
				
			||||||
  without fee, provided that the above copyright notice appear in 
 | 
					  without fee, provided that the above copyright notice appear in 
 | 
				
			||||||
  all copies and that both that the copyright notice and this
 | 
					  all copies and that both that the copyright notice and this
 | 
				
			||||||
  permission notice and warranty disclaimer appear in supporting 
 | 
					  permission notice and warranty disclaimer appear in supporting 
 | 
				
			||||||
  documentation, and that the name of the author not be used in 
 | 
					  documentation, and that the name of the author not be used in 
 | 
				
			||||||
  advertising or publicity pertaining to distribution of the 
 | 
					  advertising or publicity pertaining to distribution of the 
 | 
				
			||||||
  software without specific, written prior permission.
 | 
					  software without specific, written prior permission.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  The author disclaim all warranties with regard to this
 | 
					  The author disclaim all warranties with regard to this
 | 
				
			||||||
  software, including all implied warranties of merchantability
 | 
					  software, including all implied warranties of merchantability
 | 
				
			||||||
  and fitness.  In no event shall the author be liable for any
 | 
					  and fitness.  In no event shall the author be liable for any
 | 
				
			||||||
  special, indirect or consequential damages or any damages
 | 
					  special, indirect or consequential damages or any damages
 | 
				
			||||||
  whatsoever resulting from loss of use, data or profits, whether
 | 
					  whatsoever resulting from loss of use, data or profits, whether
 | 
				
			||||||
  in an action of contract, negligence or other tortious action,
 | 
					  in an action of contract, negligence or other tortious action,
 | 
				
			||||||
  arising out of or in connection with the use or performance of
 | 
					  arising out of or in connection with the use or performance of
 | 
				
			||||||
  this software.
 | 
					  this software.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \file
 | 
					/** \file
 | 
				
			||||||
 *  \brief Board specific Buttons driver header for the Kernel Concepts USBFOO.
 | 
					 *  \brief Board specific Buttons driver header for the Kernel Concepts USBFOO.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Board specific Buttons driver header for the Kernel Concepts USBFOO (http://shop.kernelconcepts.de/product_info.php?products_id=102).
 | 
					 *  Board specific Buttons driver header for the Kernel Concepts USBFOO (http://shop.kernelconcepts.de/product_info.php?products_id=102).
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  \note This file should not be included directly. It is automatically included as needed by the Buttons driver
 | 
					 *  \note This file should not be included directly. It is automatically included as needed by the Buttons driver
 | 
				
			||||||
 *        dispatch header located in LUFA/Drivers/Board/Buttons.h.
 | 
					 *        dispatch header located in LUFA/Drivers/Board/Buttons.h.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
/** \ingroup Group_Buttons
 | 
					/** \ingroup Group_Buttons
 | 
				
			||||||
 *  @defgroup Group_Buttons_USBFOO USBFOO
 | 
					 *  @defgroup Group_Buttons_USBFOO USBFOO
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Board specific Buttons driver header for the Kernel Concepts USBFOO (http://shop.kernelconcepts.de/product_info.php?products_id=102).
 | 
					 *  Board specific Buttons driver header for the Kernel Concepts USBFOO (http://shop.kernelconcepts.de/product_info.php?products_id=102).
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  \note This file should not be included directly. It is automatically included as needed by the Buttons driver
 | 
					 *  \note This file should not be included directly. It is automatically included as needed by the Buttons driver
 | 
				
			||||||
 *        dispatch header located in LUFA/Drivers/Board/Buttons.h.
 | 
					 *        dispatch header located in LUFA/Drivers/Board/Buttons.h.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  @{
 | 
					 *  @{
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __BUTTONS_USBFOO_H__
 | 
					#ifndef __BUTTONS_USBFOO_H__
 | 
				
			||||||
#define __BUTTONS_USBFOO_H__
 | 
					#define __BUTTONS_USBFOO_H__
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Includes: */
 | 
						/* Includes: */
 | 
				
			||||||
		#include <avr/io.h>
 | 
							#include <avr/io.h>
 | 
				
			||||||
		#include <stdbool.h>
 | 
							#include <stdbool.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		#include "../../../Common/Common.h"
 | 
							#include "../../../Common/Common.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Enable C linkage for C++ Compilers: */
 | 
						/* Enable C linkage for C++ Compilers: */
 | 
				
			||||||
		#if defined(__cplusplus)
 | 
							#if defined(__cplusplus)
 | 
				
			||||||
			extern "C" {
 | 
								extern "C" {
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Preprocessor Checks: */
 | 
						/* Preprocessor Checks: */
 | 
				
			||||||
		#if !defined(__INCLUDE_FROM_BUTTONS_H)
 | 
							#if !defined(__INCLUDE_FROM_BUTTONS_H)
 | 
				
			||||||
			#error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
 | 
								#error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
	/* Public Interface - May be used in end-application: */
 | 
						/* Public Interface - May be used in end-application: */
 | 
				
			||||||
		/* Macros: */
 | 
							/* Macros: */
 | 
				
			||||||
			/** Button mask for the first button on the board. */
 | 
								/** Button mask for the first button on the board. */
 | 
				
			||||||
			#define BUTTONS_BUTTON1      (1 << 7)
 | 
								#define BUTTONS_BUTTON1      (1 << 7)
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
		/* Inline Functions: */
 | 
							/* Inline Functions: */
 | 
				
			||||||
		#if !defined(__DOXYGEN__)
 | 
							#if !defined(__DOXYGEN__)
 | 
				
			||||||
			static inline void Buttons_Init(void)
 | 
								static inline void Buttons_Init(void)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				DDRD  &= ~BUTTONS_BUTTON1;
 | 
									DDRD  &= ~BUTTONS_BUTTON1;
 | 
				
			||||||
				PORTD |=  BUTTONS_BUTTON1;
 | 
									PORTD |=  BUTTONS_BUTTON1;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
 | 
								static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
 | 
				
			||||||
			static inline uint8_t Buttons_GetStatus(void)
 | 
								static inline uint8_t Buttons_GetStatus(void)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				return ((PIND & BUTTONS_BUTTON1) ^ BUTTONS_BUTTON1);
 | 
									return ((PIND & BUTTONS_BUTTON1) ^ BUTTONS_BUTTON1);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Disable C linkage for C++ Compilers: */
 | 
						/* Disable C linkage for C++ Compilers: */
 | 
				
			||||||
		#if defined(__cplusplus)
 | 
							#if defined(__cplusplus)
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** @} */
 | 
					/** @} */
 | 
				
			||||||
 | 
				
			|||||||
@ -1,128 +1,128 @@
 | 
				
			|||||||
/*
 | 
					/*
 | 
				
			||||||
             LUFA Library
 | 
					             LUFA Library
 | 
				
			||||||
     Copyright (C) Dean Camera, 2010.
 | 
					     Copyright (C) Dean Camera, 2010.
 | 
				
			||||||
              
 | 
					              
 | 
				
			||||||
  dean [at] fourwalledcubicle [dot] com
 | 
					  dean [at] fourwalledcubicle [dot] com
 | 
				
			||||||
      www.fourwalledcubicle.com
 | 
					      www.fourwalledcubicle.com
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 | 
					  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Permission to use, copy, modify, distribute, and sell this 
 | 
					  Permission to use, copy, modify, distribute, and sell this 
 | 
				
			||||||
  software and its documentation for any purpose is hereby granted
 | 
					  software and its documentation for any purpose is hereby granted
 | 
				
			||||||
  without fee, provided that the above copyright notice appear in 
 | 
					  without fee, provided that the above copyright notice appear in 
 | 
				
			||||||
  all copies and that both that the copyright notice and this
 | 
					  all copies and that both that the copyright notice and this
 | 
				
			||||||
  permission notice and warranty disclaimer appear in supporting 
 | 
					  permission notice and warranty disclaimer appear in supporting 
 | 
				
			||||||
  documentation, and that the name of the author not be used in 
 | 
					  documentation, and that the name of the author not be used in 
 | 
				
			||||||
  advertising or publicity pertaining to distribution of the 
 | 
					  advertising or publicity pertaining to distribution of the 
 | 
				
			||||||
  software without specific, written prior permission.
 | 
					  software without specific, written prior permission.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  The author disclaim all warranties with regard to this
 | 
					  The author disclaim all warranties with regard to this
 | 
				
			||||||
  software, including all implied warranties of merchantability
 | 
					  software, including all implied warranties of merchantability
 | 
				
			||||||
  and fitness.  In no event shall the author be liable for any
 | 
					  and fitness.  In no event shall the author be liable for any
 | 
				
			||||||
  special, indirect or consequential damages or any damages
 | 
					  special, indirect or consequential damages or any damages
 | 
				
			||||||
  whatsoever resulting from loss of use, data or profits, whether
 | 
					  whatsoever resulting from loss of use, data or profits, whether
 | 
				
			||||||
  in an action of contract, negligence or other tortious action,
 | 
					  in an action of contract, negligence or other tortious action,
 | 
				
			||||||
  arising out of or in connection with the use or performance of
 | 
					  arising out of or in connection with the use or performance of
 | 
				
			||||||
  this software.
 | 
					  this software.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \file
 | 
					/** \file
 | 
				
			||||||
 *  \brief Board specific LED driver header for the Kernel Concepts USBFOO.
 | 
					 *  \brief Board specific LED driver header for the Kernel Concepts USBFOO.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Board specific LED driver header for the Kernel Concepts USBFOO (http://shop.kernelconcepts.de/product_info.php?products_id=102).
 | 
					 *  Board specific LED driver header for the Kernel Concepts USBFOO (http://shop.kernelconcepts.de/product_info.php?products_id=102).
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
 | 
					 *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
 | 
				
			||||||
 *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
 | 
					 *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \ingroup Group_LEDs
 | 
					/** \ingroup Group_LEDs
 | 
				
			||||||
 *  @defgroup Group_LEDs_USBFOO USBFOO
 | 
					 *  @defgroup Group_LEDs_USBFOO USBFOO
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Board specific LED driver header for the Kernel Concepts USBFOO (http://shop.kernelconcepts.de/product_info.php?products_id=102).
 | 
					 *  Board specific LED driver header for the Kernel Concepts USBFOO (http://shop.kernelconcepts.de/product_info.php?products_id=102).
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
 | 
					 *  \note This file should not be included directly. It is automatically included as needed by the LEDs driver
 | 
				
			||||||
 *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
 | 
					 *        dispatch header located in LUFA/Drivers/Board/LEDs.h.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  @{
 | 
					 *  @{
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
#ifndef __LEDS_USBFOO_H__
 | 
					#ifndef __LEDS_USBFOO_H__
 | 
				
			||||||
#define __LEDS_USBFOO_H__
 | 
					#define __LEDS_USBFOO_H__
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Includes: */
 | 
						/* Includes: */
 | 
				
			||||||
		#include <avr/io.h>
 | 
							#include <avr/io.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		#include "../../../Common/Common.h"
 | 
							#include "../../../Common/Common.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Enable C linkage for C++ Compilers: */
 | 
						/* Enable C linkage for C++ Compilers: */
 | 
				
			||||||
		#if defined(__cplusplus)
 | 
							#if defined(__cplusplus)
 | 
				
			||||||
			extern "C" {
 | 
								extern "C" {
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Preprocessor Checks: */
 | 
						/* Preprocessor Checks: */
 | 
				
			||||||
		#if !defined(__INCLUDE_FROM_LEDS_H)
 | 
							#if !defined(__INCLUDE_FROM_LEDS_H)
 | 
				
			||||||
			#error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
 | 
								#error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Public Interface - May be used in end-application: */
 | 
						/* Public Interface - May be used in end-application: */
 | 
				
			||||||
		/* Macros: */
 | 
							/* Macros: */
 | 
				
			||||||
			/** LED mask for the first LED on the board. */
 | 
								/** LED mask for the first LED on the board. */
 | 
				
			||||||
			#define LEDS_LED1        (1 << 4)
 | 
								#define LEDS_LED1        (1 << 4)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			/** LED mask for all the LEDs on the board. */
 | 
								/** LED mask for all the LEDs on the board. */
 | 
				
			||||||
			#define LEDS_ALL_LEDS    LEDS_LED1
 | 
								#define LEDS_ALL_LEDS    LEDS_LED1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			/** LED mask for none of the board LEDs. */
 | 
								/** LED mask for none of the board LEDs. */
 | 
				
			||||||
			#define LEDS_NO_LEDS     0
 | 
								#define LEDS_NO_LEDS     0
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
		/* Inline Functions: */
 | 
							/* Inline Functions: */
 | 
				
			||||||
		#if !defined(__DOXYGEN__)
 | 
							#if !defined(__DOXYGEN__)
 | 
				
			||||||
			static inline void LEDs_Init(void)
 | 
								static inline void LEDs_Init(void)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				DDRD  |= LEDS_ALL_LEDS;
 | 
									DDRD  |= LEDS_ALL_LEDS;
 | 
				
			||||||
				PORTD |= LEDS_ALL_LEDS;
 | 
									PORTD |= LEDS_ALL_LEDS;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
			static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
 | 
								static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTD &= ~LEDMask;
 | 
									PORTD &= ~LEDMask;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
 | 
								static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTD |= LEDMask;
 | 
									PORTD |= LEDMask;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
 | 
								static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTD = ((PORTD | LEDS_ALL_LEDS) & ~LEDMask);
 | 
									PORTD = ((PORTD | LEDS_ALL_LEDS) & ~LEDMask);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
			static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
 | 
								static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
 | 
				
			||||||
			                                   const uint8_t ActiveMask)
 | 
								                                   const uint8_t ActiveMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTD = ((PORTD | LEDMask) & ~ActiveMask);
 | 
									PORTD = ((PORTD | LEDMask) & ~ActiveMask);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
			static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
 | 
								static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				PORTD ^= LEDMask;
 | 
									PORTD ^= LEDMask;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
 | 
								static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
 | 
				
			||||||
			static inline uint8_t LEDs_GetLEDs(void)
 | 
								static inline uint8_t LEDs_GetLEDs(void)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				return (~PORTD & LEDS_ALL_LEDS);
 | 
									return (~PORTD & LEDS_ALL_LEDS);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Disable C linkage for C++ Compilers: */
 | 
						/* Disable C linkage for C++ Compilers: */
 | 
				
			||||||
		#if defined(__cplusplus)
 | 
							#if defined(__cplusplus)
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** @} */
 | 
					/** @} */
 | 
				
			||||||
 | 
				
			|||||||
					Loading…
					
					
				
		Reference in new issue