Commit 84696c72 authored by Dean Camera's avatar Dean Camera
Browse files

Added board hardware driver support for the BUI development board.

parent 92059fcb
This diff is collapsed.
......@@ -74,7 +74,7 @@
/** LED mask for all the LEDs on the board. */
#define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3 | LEDS_LED4)
/** LED mask for the none of the board LEDs. */
/** LED mask for none of the board LEDs. */
#define LEDS_NO_LEDS 0
/* Inline Functions: */
......
......@@ -112,6 +112,9 @@
/** Selects the UDIP specific board drivers, including the Button and LEDs drivers. */
#define BOARD_UDIP 16
/** Selects the BUI specific board drivers, including the driver for the board LEDs. */
#define BOARD_UDIP 17
#if !defined(__DOXYGEN__)
#define BOARD_ BOARD_NONE
......
......@@ -29,9 +29,9 @@
*/
/** \file
* \brief Board specific Buttons driver header for the ATAVRUSBRF01.
* \brief Board specific Buttons driver header for the Atmel ATAVRUSBRF01.
*
* Board specific Buttons driver header for the ATAVRUSBRF01.
* Board specific Buttons driver header for the Atmel ATAVRUSBRF01.
*
* \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.
......@@ -40,7 +40,7 @@
/** \ingroup Group_Buttons
* @defgroup Group_Buttons_ATAVRUSBRF01 ATAVRUSBRF01
*
* Board specific Buttons driver header for the ATAVRUSBRF01.
* Board specific Buttons driver header for the Atmel ATAVRUSBRF01.
*
* \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.
......
......@@ -29,9 +29,9 @@
*/
/** \file
* \brief Board specific LED driver header for the ATAVRUSBRF01.
* \brief Board specific LED driver header for the Atmel ATAVRUSBRF01.
*
* Board specific LED driver header for the ATAVRUSBRF01.
* Board specific LED driver header for the Atmel ATAVRUSBRF01.
*
* \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.
......@@ -40,7 +40,7 @@
/** \ingroup Group_LEDs
* @defgroup Group_LEDs_ATAVRUSBRF01 ATAVRUSBRF01
*
* Board specific LED driver header for the ATAVRUSBRF01.
* Board specific LED driver header for the Atmel ATAVRUSBRF01.
*
* \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.
......@@ -78,16 +78,16 @@
/* Public Interface - May be used in end-application: */
/* Macros: */
/** LED mask for the first LED on the board. */
#define LEDS_LED1 (1 << 0)
#define LEDS_LED1 (1 << 0)
/** LED mask for the second LED on the board. */
#define LEDS_LED2 (1 << 1)
#define LEDS_LED2 (1 << 1)
/** 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 the none of the board LEDs. */
#define LEDS_NO_LEDS 0
/** LED mask for none of the board LEDs. */
#define LEDS_NO_LEDS 0
/* Inline Functions: */
#if !defined(__DOXYGEN__)
......
......@@ -29,9 +29,9 @@
*/
/** \file
* \brief Board specific Buttons driver header for the Benito.
* \brief Board specific Buttons driver header for the Tempusdictum Benito.
*
* Board specific Buttons driver header for the Benito (http://dorkbotpdx.org/wiki/benito).
* Board specific Buttons driver header for the Tempusdictum Benito (http://dorkbotpdx.org/wiki/benito).
*
* \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.
......@@ -40,7 +40,7 @@
/** \ingroup Group_Buttons
* @defgroup Group_Buttons_BENITO BENITO
*
* Board specific Buttons driver header for the Benito (http://dorkbotpdx.org/wiki/benito).
* Board specific Buttons driver header for the Tempusdictum Benito (http://dorkbotpdx.org/wiki/benito).
*
* \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.
......
......@@ -29,9 +29,9 @@
*/
/** \file
* \brief Board specific LED driver header for the Benito.
* \brief Board specific LED driver header for the Tempusdictum Benito.
*
* Board specific LED driver header for the Benito (http://dorkbotpdx.org/wiki/benito).
* Board specific LED driver header for the Tempusdictum Benito (http://dorkbotpdx.org/wiki/benito).
*
* \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.
......@@ -40,7 +40,7 @@
/** \ingroup Group_LEDs
* @defgroup Group_LEDs_BENITO BENITO
*
* Board specific LED driver header for the Benito (http://dorkbotpdx.org/wiki/benito).
* Board specific LED driver header for the Tempusdictum Benito (http://dorkbotpdx.org/wiki/benito).
*
* \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.
......@@ -75,7 +75,7 @@
/** LED mask for all the LEDs on the board. */
#define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2)
/** LED mask for the none of the board LEDs. */
/** LED mask for none of the board LEDs. */
#define LEDS_NO_LEDS 0
/* Inline Functions: */
......
/*
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.
*/
/*
LED Driver for the RGB LED on the Busware BUI board.
*/
#ifndef __LEDS_USER_H__
#define __LEDS_USER_H__
/* Includes: */
#include <avr/io.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 blue LED on the board. */
#define LEDS_LED1 (1 << 2)
/** LED mask for the green LED on the board. */
#define LEDS_LED2 (1 << 3)
/** LED mask for the red LED on the board. */
#define LEDS_LED3 (1 << 4)
/** LED mask for all the LEDs on the board. */
#define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3)
/** 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)
{
DDRC |= LEDS_ALL_LEDS;
}
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTC |= LEDMask;
}
static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
{
PORTC &= ~LEDMask;
}
static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
{
PORTC = (PORTC & ~LEDS_ALL_LEDS) | LEDMask;
}
static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
const uint8_t ActiveMask)
{
PORTC = (PORTC & ~LEDMask) | ActiveMask;
}
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
PORTC ^= LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t LEDs_GetLEDs(void)
{
return (PORTC & LEDS_ALL_LEDS);
}
#endif
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
}
#endif
#endif
/*
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 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
* dispatch header located in LUFA/Drivers/Board/LEDs.h.
*/
/** \ingroup Group_LEDs
* @defgroup Group_LEDs_BUI 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
* dispatch header located in LUFA/Drivers/Board/LEDs.h.
*
* @{
*/
#ifndef __LEDS_BUI_H__
#define __LEDS_BUI_H__
/* Includes: */
#include <avr/io.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 << 2)
/** LED mask for the second LED on the board. */
#define LEDS_LED2 (1 << 3)
/** LED mask for the third LED on the board. */
#define LEDS_LED3 (1 << 4)
/** LED mask for all the LEDs on the board. */
#define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3)
/** LED mask for none of the board LEDs. */
#define LEDS_NO_LEDS 0
/* Inline Functions: */
#if !defined(__DOXYGEN__)
static inline void LEDs_Init(void)
{
DDRC |= LEDS_ALL_LEDS;
}
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTC |= LEDMask;
}
static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
{
PORTC &= ~LEDMask;
}
static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
{
PORTC = (PORTC & ~LEDS_ALL_LEDS) | LEDMask;
}
static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
const uint8_t ActiveMask)
{
PORTC = (PORTC & ~LEDMask) | ActiveMask;
}
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
PORTC ^= LEDMask;
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t LEDs_GetLEDs(void)
{
return (PORTC & LEDS_ALL_LEDS);
}
#endif
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
}
#endif
#endif
/** @} */
......@@ -29,9 +29,9 @@
*/
/** \file
* \brief Board specific Buttons driver header for the BUMBLEB.
* \brief Board specific Buttons driver header for the Fletchtronics BUMBLEB.
*
* Board specific Buttons driver header for the BUMBLEB (http://fletchtronics.net/bumble-b).
* Board specific Buttons driver header for the Fletchtronics BUMBLEB (http://fletchtronics.net/bumble-b).
*
* The BUMBLEB third-party board does not include any on-board peripherals, but does have an officially recommended
* external peripheral layout for buttons, LEDs and a Joystick.
......@@ -43,9 +43,9 @@
/** \ingroup Group_Buttons
* @defgroup Group_Buttons_BUMBLEB BUMBLEB
*
* Board specific buttons driver header for the BUMBLEB (http://fletchtronics.net/bumble-b). The BUMBLEB third-party
* board does not include any on-board peripherals, but does have an officially recommended external peripheral layout
* for buttons, LEDs and a Joystick.
* Board specific buttons driver header for the Fletchtronics BUMBLEB (http://fletchtronics.net/bumble-b). The BUMBLEB
* third-party board does not include any on-board peripherals, but does have an officially recommended external peripheral
* layout for buttons, LEDs and a Joystick.
*
* \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.
......
......@@ -29,9 +29,9 @@
*/
/** \file
* \brief Board specific joystick driver header for the BUMLEB.
* \brief Board specific joystick driver header for the Fletchtronics BUMLEB.
*
* Board specific joystick driver header for the BUMBLEB (http://fletchtronics.net/bumble-b).
* Board specific joystick driver header for the Fletchtronics BUMBLEB (http://fletchtronics.net/bumble-b).
*
* The BUMBLEB third-party board does not include any on-board peripherals, but does have an officially recommended
* external peripheral layout for buttons, LEDs and a Joystick.
......@@ -43,9 +43,9 @@
/** \ingroup Group_Joystick
* @defgroup Group_Joystick_BUMBLEB BUMBLEB
*
* Board specific joystick driver header for the BUMBLEB (http://fletchtronics.net/bumble-b). The BUMBLEB third-party
* board does not include any on-board peripherals, but does have an officially recommended external peripheral layout
* for buttons, LEDs and a Joystick.
* Board specific joystick driver header for the Fletchtronics BUMBLEB (http://fletchtronics.net/bumble-b). The BUMBLEB
* third-party board does not include any on-board peripherals, but does have an officially recommended external peripheral
* layout for buttons, LEDs and a Joystick.
*
* \note This file should not be included directly. It is automatically included as needed by the joystick driver
* dispatch header located in LUFA/Drivers/Board/Joystick.h.
......
......@@ -29,9 +29,9 @@
*/
/** \file
* \brief Board specific LED driver header for the BUMBLEB.
* \brief Board specific LED driver header for the Fletchtronics BUMBLEB.
*
* Board specific LED driver header for the BUMBLEB (http://fletchtronics.net/bumble-b).
* Board specific LED driver header for the Fletchtronics BUMBLEB (http://fletchtronics.net/bumble-b).
*
* The BUMBLEB third-party board does not include any on-board peripherals, but does have an officially recommended
* external peripheral layout for buttons, LEDs and a Joystick.
......@@ -43,9 +43,9 @@
/** \ingroup Group_LEDs
* @defgroup Group_LEDs_BUMBLEB BUMBLEB
*
* Board specific LED driver header for the BUMBLEB (http://fletchtronics.net/bumble-b). The BUMBLEB third-party board
* does not include any on-board peripherals, but does have an officially recommended external peripheral layout for
* buttons, LEDs and a Joystick.
* Board specific LED driver header for the Fletchtronics BUMBLEB (http://fletchtronics.net/bumble-b). The BUMBLEB
* third-party board does not include any on-board peripherals, but does have an officially recommended external
* peripheral layout for buttons, LEDs and a Joystick.
*
* \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.
......@@ -88,7 +88,7 @@
/** LED mask for all the LEDs on the board. */
#define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3 | LEDS_LED4)
/** LED mask for the none of the board LEDs. */
/** LED mask for none of the board LEDs. */
#define LEDS_NO_LEDS 0
/* Inline Functions: */
......
......@@ -29,9 +29,9 @@
*/
/** \file
* \brief Board specific Dataflash commands header for the AT45DB321C as mounted on the EVK527.
* \brief Board specific Dataflash commands header for the AT45DB321C as mounted on the Atmel EVK527.
*
* Board specific Dataflash commands header for the AT45DB321C as mounted on the EVK527.
* Board specific Dataflash commands header for the AT45DB321C as mounted on the Atmel EVK527.
*
* \note This file should not be included directly. It is automatically included as needed by the dataflash driver
* dispatch header located in LUFA/Drivers/Board/Dataflash.h.
......@@ -40,7 +40,7 @@
/** \ingroup Group_Dataflash_EVK527
* @defgroup Group_Dataflash_EVK527_AT45DB321C AT45DB321C
*
* Board specific Dataflash commands header for the AT45DB321C as mounted on the EVK527.
* Board specific Dataflash commands header for the AT45DB321C as mounted on the Atmel EVK527.
*
* \note This file should not be included directly. It is automatically included as needed by the dataflash driver
* dispatch header located in LUFA/Drivers/Board/Dataflash.h.
......
......@@ -29,9 +29,9 @@
*/
/** \file
* \brief Board specific Buttons driver header for the EVK527.
* \brief Board specific Buttons driver header for the Atmel EVK527.
*
* Board specific Buttons driver header for the EVK527.
* Board specific Buttons driver header for the Atmel EVK527.
*
* \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.
......@@ -40,7 +40,7 @@
/** \ingroup Group_Buttons
* @defgroup Group_Buttons_EVK527 EVK527
*
* Board specific Buttons driver header for the EVK527.
* Board specific Buttons driver header for the Atmel EVK527.
*
* \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.
......
......@@ -29,9 +29,9 @@
*/
/** \file
* \brief Board specific Dataflash driver header for the EVK527.
* \brief Board specific Dataflash driver header for the Atmel EVK527.
*
* Board specific Dataflash driver header for the EVK527.
* Board specific Dataflash driver header for the Atmel EVK527.
*
* \note This file should not be included directly. It is automatically included as needed by the dataflash driver
* dispatch header located in LUFA/Drivers/Board/Dataflash.h.
......@@ -40,7 +40,7 @@
/** \ingroup Group_Dataflash
* @defgroup Group_Dataflash_EVK527 EVK527
*
* Board specific Dataflash driver header for the EVK527.
* Board specific Dataflash driver header for the Atmel EVK527.
*
* \note This file should not be included directly. It is automatically included as needed by the dataflash driver
* dispatch header located in LUFA/Drivers/Board/Dataflash.h.
......
......@@ -29,9 +29,9 @@
*/
/** \file
* \brief Board specific joystick driver header for the EVK527.
* \brief Board specific joystick driver header for the Atmel EVK527.
*
* Board specific joystick driver header for the EVK527.
* Board specific joystick driver header for the Atmel EVK527.
*
* \note This file should not be included directly. It is automatically included as needed by the joystick driver
* dispatch header located in LUFA/Drivers/Board/Joystick.h.
......@@ -40,7 +40,7 @@
/** \ingroup Group_Joystick
* @defgroup Group_Joystick_EVK527 EVK527
*
* Board specific joystick driver header for the EVK527.
* Board specific joystick driver header for the Atmel EVK527.
*
* \note This file should not be included directly. It is automatically included as needed by the joystick driver
* dispatch header located in LUFA/Drivers/Board/Joystick.h.
......
......@@ -29,9 +29,9 @@
*/
/** \file
* \brief Board specific LED driver header for the EVK527.
* \brief Board specific LED driver header for the Atmel EVK527.
*
* Board specific LED driver header for the EVK527.
* Board specific LED driver header for the Atmel EVK527.
*
* \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.
......@@ -40,7 +40,7 @@
/** \ingroup Group_LEDs
* @defgroup Group_LEDs_EVK527 EVK527
*
* Board specific LED driver header for the EVK527.
* Board specific LED driver header for the Atmel EVK527.
*
* \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.
......@@ -80,7 +80,7 @@
/** LED mask for all the LEDs on the board. */
#define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3)
/** LED mask for the none of the board LEDs. */
/** LED mask for none of the board LEDs. */
#define LEDS_NO_LEDS 0
/* Inline Functions: */
......
......@@ -29,9 +29,9 @@
*/
/** \file
* \brief Board specific Buttons driver header for the JM-DB-U2.
* \brief Board specific Buttons driver header for the Mattairtech JM-DB-U2.
*
* Board specific Buttons driver header for the JM-DB-U2 (http://u2.mattair.net/index.html).
* Board specific Buttons driver header for the Mattairtech JM-DB-U2 (http://u2.mattair.net/index.html).
*
* \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.
......@@ -40,7 +40,7 @@
/** \ingroup Group_Buttons
* @defgroup Group_Buttons_JMDBU2 JMDBU2
*
* Board specific Buttons driver header for the JM-DB-U2 (http://u2.mattair.net/index.html).
* Board specific Buttons driver header for the Mattairtech JM-DB-U2 (http://u2.mattair.net/index.html).
*
* \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.
......
......@@ -29,9 +29,9 @@
*/
/** \file
* \brief Board specific LED driver header for the JM-DB-U2.
* \brief Board specific LED driver header for the Mattairtech JM-DB-U2.
*
* Board specific LED driver header for the JM-DB-U2 (http://u2.mattair.net/index.html).
* Board specific LED driver header for the Mattairtech JM-DB-U2 (http://u2.mattair.net/index.html).
*
* \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.
......@@ -40,7 +40,7 @@
/** \ingroup Group_LEDs
* @defgroup Group_LEDs_JMDBU2 JMDBU2
*
* Board specific LED driver header for the JM-DB-U2 (http://u2.mattair.net/index.html).
* Board specific LED driver header for the Mattairtech JM-DB-U2 (http://u2.mattair.net/index.html).
*
* \note This file should not be included directly. It is automatically included as needed by the LEDs driver