From cf4575b94a3c65e6535a159fc71fc885aebc2620 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 2 Aug 2019 14:02:40 -0700 Subject: Fix the LUFA lib to use a submodule instead of just files (#6245) * Remove LUFA files * Update descriptions for newer version of LUFA * Create PR6245.md * Fix CDC(Serial) type errors * Fix missed merge conflict for AUDIO_DTYPE_CSInterface --- .../LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/Board.h | 86 -------- .../Drivers/Board/XMEGA/A3BU_XPLAINED/Buttons.h | 119 ----------- .../Drivers/Board/XMEGA/A3BU_XPLAINED/Dataflash.h | 228 -------------------- .../LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/LEDs.h | 181 ---------------- .../LUFA/Drivers/Board/XMEGA/B1_XPLAINED/Board.h | 86 -------- .../LUFA/Drivers/Board/XMEGA/B1_XPLAINED/Buttons.h | 119 ----------- .../Drivers/Board/XMEGA/B1_XPLAINED/Dataflash.h | 229 --------------------- .../LUFA/Drivers/Board/XMEGA/B1_XPLAINED/LEDs.h | 183 ---------------- .../LUFA/Drivers/Board/XMEGA/C3_XPLAINED/Board.h | 83 -------- .../LUFA/Drivers/Board/XMEGA/C3_XPLAINED/Buttons.h | 109 ---------- .../LUFA/Drivers/Board/XMEGA/C3_XPLAINED/LEDs.h | 181 ---------------- 11 files changed, 1604 deletions(-) delete mode 100644 lib/lufa/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/Board.h delete mode 100644 lib/lufa/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/Buttons.h delete mode 100644 lib/lufa/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/Dataflash.h delete mode 100644 lib/lufa/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/LEDs.h delete mode 100644 lib/lufa/LUFA/Drivers/Board/XMEGA/B1_XPLAINED/Board.h delete mode 100644 lib/lufa/LUFA/Drivers/Board/XMEGA/B1_XPLAINED/Buttons.h delete mode 100644 lib/lufa/LUFA/Drivers/Board/XMEGA/B1_XPLAINED/Dataflash.h delete mode 100644 lib/lufa/LUFA/Drivers/Board/XMEGA/B1_XPLAINED/LEDs.h delete mode 100644 lib/lufa/LUFA/Drivers/Board/XMEGA/C3_XPLAINED/Board.h delete mode 100644 lib/lufa/LUFA/Drivers/Board/XMEGA/C3_XPLAINED/Buttons.h delete mode 100644 lib/lufa/LUFA/Drivers/Board/XMEGA/C3_XPLAINED/LEDs.h (limited to 'lib/lufa/LUFA/Drivers/Board/XMEGA') diff --git a/lib/lufa/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/Board.h b/lib/lufa/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/Board.h deleted file mode 100644 index 2bc2377c2d..0000000000 --- a/lib/lufa/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/Board.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - LUFA Library - Copyright (C) Dean Camera, 2017. - - dean [at] fourwalledcubicle [dot] com - www.lufa-lib.org -*/ - -/* - Copyright 2017 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 disclaims 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 information header for the Atmel XMEGA A3BU Xplained. - * \copydetails Group_BoardInfo_A3BU_XPLAINED - * - * \note This file should not be included directly. It is automatically included as needed by the Board driver - * dispatch header located in LUFA/Drivers/Board/Board.h. - */ - -/** \ingroup Group_BoardInfo - * \defgroup Group_BoardInfo_A3BU_XPLAINED A3BU_XPLAINED - * \brief Board specific information header for the Atmel XMEGA A3BU Xplained. - * - * Board specific information header for the Atmel XMEGA A3BU Xplained. - * - * @{ - */ - -#ifndef __BOARD_A3BU_XPLAINED_H__ -#define __BOARD_A3BU_XPLAINED_H__ - - /* Includes: */ - #include "../../../../Common/Common.h" - #include "../../Buttons.h" - #include "../../Dataflash.h" - #include "../../LEDs.h" - - /* Enable C linkage for C++ Compilers: */ - #if defined(__cplusplus) - extern "C" { - #endif - - /* Preprocessor Checks: */ - #if !defined(__INCLUDE_FROM_BOARD_H) - #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. - #endif - - /* Public Interface - May be used in end-application: */ - /* Macros: */ - /** Indicates the board has hardware Buttons mounted. */ - #define BOARD_HAS_BUTTONS - - /** Indicates the board has a hardware Dataflash mounted. */ - #define BOARD_HAS_DATAFLASH - - /** Indicates the board has hardware LEDs mounted. */ - #define BOARD_HAS_LEDS - - /* Disable C linkage for C++ Compilers: */ - #if defined(__cplusplus) - } - #endif - -#endif - -/** @} */ - diff --git a/lib/lufa/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/Buttons.h b/lib/lufa/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/Buttons.h deleted file mode 100644 index 901869d35e..0000000000 --- a/lib/lufa/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/Buttons.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - LUFA Library - Copyright (C) Dean Camera, 2017. - - dean [at] fourwalledcubicle [dot] com - www.lufa-lib.org -*/ - -/* - Copyright 2017 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 disclaims 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 Buttons driver header for the Atmel XMEGA A3BU Xplained. - * \copydetails Group_Buttons_A3BU_XPLAINED - * - * \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. - */ - -/** \ingroup Group_Buttons - * \defgroup Group_Buttons_A3BU_XPLAINED A3BU_XPLAINED - * \brief Board specific Buttons driver header for the Atmel XMEGA A3BU Xplained. - * - * Board specific Buttons driver header for the Atmel XMEGA A3BU Xplained. - * - * - * - * - * - * - *
NameInfoActive LevelPort Pin
BUTTONS_BUTTON1SW0 ButtonLowPORTE.5
BUTTONS_BUTTON2SW1 ButtonLowPORTF.1
BUTTONS_BUTTON3SW2 ButtonLowPORTF.2
- * - * @{ - */ - -#ifndef __BUTTONS_A3BU_XPLAINED_H__ -#define __BUTTONS_A3BU_XPLAINED_H__ - - /* Includes: */ - #include - - /* 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 << 5) - - /** Button mask for the second button on the board. */ - #define BUTTONS_BUTTON2 (1 << 1) - - /** Button mask for the third button on the board. */ - #define BUTTONS_BUTTON3 (1 << 2) - - /* Inline Functions: */ - #if !defined(__DOXYGEN__) - static inline void Buttons_Init(void) - { - PORTE.OUTCLR = BUTTONS_BUTTON1; - PORTE.PIN5CTRL = (PORT_OPC_PULLUP_gc | PORT_INVEN_bm); - - PORTF.OUTCLR = (BUTTONS_BUTTON2 | BUTTONS_BUTTON3); - PORTF.PIN1CTRL = (PORT_OPC_PULLUP_gc | PORT_INVEN_bm); - PORTF.PIN2CTRL = (PORT_OPC_PULLUP_gc | PORT_INVEN_bm); - } - - static inline void Buttons_Disable(void) - { - PORTE.OUTCLR = BUTTONS_BUTTON1; - PORTE.PIN5CTRL = 0; - - PORTF.OUTCLR = (BUTTONS_BUTTON2 | BUTTONS_BUTTON3); - PORTF.PIN1CTRL = 0; - PORTF.PIN2CTRL = 0; - } - - static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t Buttons_GetStatus(void) - { - return ((PORTE_IN & BUTTONS_BUTTON1) | (PORTF_IN & (BUTTONS_BUTTON2 | BUTTONS_BUTTON3))); - } - #endif - - /* Disable C linkage for C++ Compilers: */ - #if defined(__cplusplus) - } - #endif - -#endif - -/** @} */ - diff --git a/lib/lufa/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/Dataflash.h b/lib/lufa/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/Dataflash.h deleted file mode 100644 index b48473890b..0000000000 --- a/lib/lufa/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/Dataflash.h +++ /dev/null @@ -1,228 +0,0 @@ -/* - LUFA Library - Copyright (C) Dean Camera, 2017. - - dean [at] fourwalledcubicle [dot] com - www.lufa-lib.org -*/ - -/* - Copyright 2017 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 disclaims 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 Dataflash driver header for the Atmel XMEGA A3BU Xplained. - * \copydetails Group_Dataflash_A3BU_XPLAINED - * - * \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. - */ - -/** \ingroup Group_Dataflash - * \defgroup Group_Dataflash_A3BU_XPLAINED A3BU_XPLAINED - * \brief Board specific Dataflash driver header for the Atmel XMEGA A3BU Xplained. - * - * Board specific Dataflash driver header for the Atmel XMEGA A3BU Xplained board. - * - * - * - * - *
NameInfoSelect PinSPI Port
DATAFLASH_CHIP1AT45DB642D (8MB)PORTF.4USARTD0 (In SPI Mode)
- * - * @{ - */ - -#ifndef __DATAFLASH_A3BU_XPLAINED_H__ -#define __DATAFLASH_A3BU_XPLAINED_H__ - - /* Includes: */ - #include "../../../../Common/Common.h" - #include "../../../Misc/AT45DB642D.h" - #include "../../../Peripheral/SerialSPI.h" - - /* Preprocessor Checks: */ - #if !defined(__INCLUDE_FROM_DATAFLASH_H) - #error Do not include this file directly. Include LUFA/Drivers/Board/Dataflash.h instead. - #endif - - /* Private Interface - For use in library only: */ - #if !defined(__DOXYGEN__) - /* Macros: */ - #define DATAFLASH_CHIPCS_MASK DATAFLASH_CHIP1 - #define DATAFLASH_CHIPCS_PORT PORTF - #endif - - /* Public Interface - May be used in end-application: */ - /* Macros: */ - /** Constant indicating the total number of dataflash ICs mounted on the selected board. */ - #define DATAFLASH_TOTALCHIPS 1 - - /** Mask for no dataflash chip selected. */ - #define DATAFLASH_NO_CHIP 0 - - /** Mask for the first dataflash chip selected. */ - #define DATAFLASH_CHIP1 (1 << 4) - - /** Internal main memory page size for the board's dataflash ICs. */ - #define DATAFLASH_PAGE_SIZE 1024 - - /** Total number of pages inside each of the board's dataflash ICs. */ - #define DATAFLASH_PAGES 8192 - - /* Inline Functions: */ - /** Initializes the dataflash driver so that commands and data may be sent to an attached dataflash IC. - * The appropriate SPI interface will be automatically configured. - */ - static inline void Dataflash_Init(void) - { - DATAFLASH_CHIPCS_PORT.DIRSET = DATAFLASH_CHIPCS_MASK; - - PORTCFG.MPCMASK = DATAFLASH_CHIPCS_MASK; - DATAFLASH_CHIPCS_PORT.PIN0CTRL = PORT_INVEN_bm; - - SerialSPI_Init(&USARTD0, (USART_SPI_SCK_LEAD_RISING | USART_SPI_SAMPLE_LEADING | USART_SPI_ORDER_MSB_FIRST), (F_CPU / 2)); - - PORTD.DIRSET = PIN3_bm | PIN1_bm; - PORTD.DIRCLR = PIN2_bm; - PORTC.PIN2CTRL = PORT_OPC_PULLUP_gc; - } - - /** Sends a byte to the currently selected dataflash IC, and returns a byte from the dataflash. - * - * \param[in] Byte Byte of data to send to the dataflash - * - * \return Last response byte from the dataflash - */ - static inline uint8_t Dataflash_TransferByte(const uint8_t Byte) ATTR_ALWAYS_INLINE; - static inline uint8_t Dataflash_TransferByte(const uint8_t Byte) - { - return SerialSPI_TransferByte(&USARTD0, Byte); - } - - /** Sends a byte to the currently selected dataflash IC, and ignores the next byte from the dataflash. - * - * \param[in] Byte Byte of data to send to the dataflash - */ - static inline void Dataflash_SendByte(const uint8_t Byte) ATTR_ALWAYS_INLINE; - static inline void Dataflash_SendByte(const uint8_t Byte) - { - SerialSPI_SendByte(&USARTD0, Byte); - } - - /** Sends a dummy byte to the currently selected dataflash IC, and returns the next byte from the dataflash. - * - * \return Last response byte from the dataflash - */ - static inline uint8_t Dataflash_ReceiveByte(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT; - static inline uint8_t Dataflash_ReceiveByte(void) - { - return SerialSPI_ReceiveByte(&USARTD0); - } - - /** Determines the currently selected dataflash chip. - * - * \return Mask of the currently selected Dataflash chip, either \ref DATAFLASH_NO_CHIP if no chip is selected - * or a DATAFLASH_CHIPn mask (where n is the chip number). - */ - static inline uint8_t Dataflash_GetSelectedChip(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT; - static inline uint8_t Dataflash_GetSelectedChip(void) - { - return (DATAFLASH_CHIPCS_PORT.OUT & DATAFLASH_CHIPCS_MASK); - } - - /** Selects the given dataflash chip. - * - * \param[in] ChipMask Mask of the Dataflash IC to select, in the form of a \c DATAFLASH_CHIPn mask (where n is - * the chip number). - */ - static inline void Dataflash_SelectChip(const uint8_t ChipMask) ATTR_ALWAYS_INLINE; - static inline void Dataflash_SelectChip(const uint8_t ChipMask) - { - DATAFLASH_CHIPCS_PORT.OUTCLR = DATAFLASH_CHIPCS_MASK; - DATAFLASH_CHIPCS_PORT.OUTSET = ChipMask; - } - - /** Deselects the current dataflash chip, so that no dataflash is selected. */ - static inline void Dataflash_DeselectChip(void) ATTR_ALWAYS_INLINE; - static inline void Dataflash_DeselectChip(void) - { - Dataflash_SelectChip(DATAFLASH_NO_CHIP); - } - - /** Selects a dataflash IC from the given page number, which should range from 0 to - * ((DATAFLASH_PAGES * DATAFLASH_TOTALCHIPS) - 1). For boards containing only one - * dataflash IC, this will select DATAFLASH_CHIP1. If the given page number is outside - * the total number of pages contained in the boards dataflash ICs, all dataflash ICs - * are deselected. - * - * \param[in] PageAddress Address of the page to manipulate, ranging from - * 0 to ((DATAFLASH_PAGES * DATAFLASH_TOTALCHIPS) - 1). - */ - static inline void Dataflash_SelectChipFromPage(const uint16_t PageAddress) - { - Dataflash_DeselectChip(); - - if (PageAddress >= (DATAFLASH_PAGES * DATAFLASH_TOTALCHIPS)) - return; - - Dataflash_SelectChip(DATAFLASH_CHIP1); - } - - /** Toggles the select line of the currently selected dataflash IC, so that it is ready to receive - * a new command. - */ - static inline void Dataflash_ToggleSelectedChipCS(void) - { - uint8_t SelectedChipMask = Dataflash_GetSelectedChip(); - - Dataflash_DeselectChip(); - Dataflash_SelectChip(SelectedChipMask); - } - - /** Spin-loops while the currently selected dataflash is busy executing a command, such as a main - * memory page program or main memory to buffer transfer. - */ - static inline void Dataflash_WaitWhileBusy(void) - { - Dataflash_ToggleSelectedChipCS(); - Dataflash_SendByte(DF_CMD_GETSTATUS); - while (!(Dataflash_ReceiveByte() & DF_STATUS_READY)); - Dataflash_ToggleSelectedChipCS(); - } - - /** Sends a set of page and buffer address bytes to the currently selected dataflash IC, for use with - * dataflash commands which require a complete 24-bit address. - * - * \param[in] PageAddress Page address within the selected dataflash IC - * \param[in] BufferByte Address within the dataflash's buffer - */ - static inline void Dataflash_SendAddressBytes(uint16_t PageAddress, - const uint16_t BufferByte) - { - Dataflash_SendByte(PageAddress >> 5); - Dataflash_SendByte((PageAddress << 3) | (BufferByte >> 8)); - Dataflash_SendByte(BufferByte); - } - -#endif - -/** @} */ - diff --git a/lib/lufa/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/LEDs.h b/lib/lufa/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/LEDs.h deleted file mode 100644 index a0c5b3af4b..0000000000 --- a/lib/lufa/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/LEDs.h +++ /dev/null @@ -1,181 +0,0 @@ -/* - LUFA Library - Copyright (C) Dean Camera, 2017. - - dean [at] fourwalledcubicle [dot] com - www.lufa-lib.org -*/ - -/* - Copyright 2017 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 disclaims 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 Atmel XMEGA A3BU Xplained. - * \copydetails Group_LEDs_A3BU_XPLAINED - * - * \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_A3BU_XPLAINED A3BU_XPLAINED - * \brief Board specific LED driver header for the Atmel XMEGA A3BU Xplained. - * - * Board specific LED driver header for the Atmel XMEGA A3BU Xplained. - * - * - * - * - * - * - * - *
NameColorInfoActive LevelPort Pin
LEDS_LED1YellowLED0 LEDLowPORTR.0
LEDS_LED2YellowLED1 LEDLowPORTR.1
LEDS_LED3RedStatus Bicolour Red LEDLowPORTD.4
LEDS_LED4GreenStatus Bicolour Green LEDHighPORTD.5
- * - * @{ - */ - -#ifndef __LEDS_A3BU_XPLAINED_H__ -#define __LEDS_A3BU_XPLAINED_H__ - - /* Includes: */ - #include - - /* 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 - - /* Private Interface - For use in library only: */ - #if !defined(__DOXYGEN__) - /* Macros: */ - #define LEDS_PORTR_LEDS (LEDS_LED1 | LEDS_LED2) - #define LEDS_PORTD_LEDS (LEDS_LED3 | LEDS_LED4) - #endif - - /* Public Interface - May be used in end-application: */ - /* Macros: */ - /** LED mask for the first LED on the board. */ - #define LEDS_LED1 (1 << 0) - - /** LED mask for the second LED on the board. */ - #define LEDS_LED2 (1 << 1) - - /** LED mask for the third LED on the board. */ - #define LEDS_LED3 (1 << 4) - - /** LED mask for the fourth LED on the board. */ - #define LEDS_LED4 (1 << 5) - - /** LED mask for all the LEDs on the board. */ - #define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3 | LEDS_LED4) - - /** LED mask for none of the board LEDs. */ - #define LEDS_NO_LEDS 0 - - /* Inline Functions: */ - #if !defined(__DOXYGEN__) - static inline void LEDs_Init(void) - { - PORTR.DIRSET = LEDS_PORTR_LEDS; - PORTR.OUTCLR = LEDS_PORTR_LEDS; - - PORTCFG.MPCMASK = LEDS_PORTR_LEDS; - PORTR.PIN0CTRL = PORT_INVEN_bm; - - PORTD.DIRSET = LEDS_PORTD_LEDS; - PORTD.OUTCLR = LEDS_PORTD_LEDS; - - PORTD.PIN4CTRL = PORT_INVEN_bm; - } - - static inline void LEDs_Disable(void) - { - PORTR.DIRCLR = LEDS_PORTR_LEDS; - PORTR.OUTCLR = LEDS_PORTR_LEDS; - - PORTCFG.MPCMASK = 0; - PORTR.PIN0CTRL = LEDS_PORTR_LEDS; - - PORTD.DIRCLR = LEDS_PORTD_LEDS; - PORTD.OUTCLR = LEDS_PORTD_LEDS; - - PORTD.PIN4CTRL = 0; - } - - static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) - { - PORTR_OUTSET = LEDMask & LEDS_PORTR_LEDS; - PORTD_OUTSET = LEDMask & LEDS_PORTD_LEDS; - } - - static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask) - { - PORTR_OUTCLR = LEDMask & LEDS_PORTR_LEDS; - PORTD_OUTCLR = LEDMask & LEDS_PORTD_LEDS; - } - - static inline void LEDs_SetAllLEDs(const uint8_t LEDMask) - { - PORTR_OUTCLR = LEDS_PORTR_LEDS; - PORTD_OUTCLR = LEDS_PORTD_LEDS; - - PORTR_OUTSET = (LEDMask & LEDS_PORTR_LEDS); - PORTD_OUTSET = (LEDMask & LEDS_PORTD_LEDS); - } - - static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, - const uint8_t ActiveMask) - { - PORTR_OUTCLR = (LEDMask & LEDS_PORTR_LEDS); - PORTD_OUTCLR = (LEDMask & LEDS_PORTD_LEDS); - - PORTR_OUTSET = (ActiveMask & LEDS_PORTR_LEDS); - PORTD_OUTSET = (ActiveMask & LEDS_PORTD_LEDS); - } - - static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) - { - PORTR_OUTTGL = (LEDMask & LEDS_PORTR_LEDS); - PORTD_OUTTGL = (LEDMask & LEDS_PORTD_LEDS); - } - - static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t LEDs_GetLEDs(void) - { - return ((PORTR_OUT & LEDS_PORTR_LEDS) | (PORTD_OUT & LEDS_PORTD_LEDS)); - } - #endif - - /* Disable C linkage for C++ Compilers: */ - #if defined(__cplusplus) - } - #endif - -#endif - -/** @} */ - diff --git a/lib/lufa/LUFA/Drivers/Board/XMEGA/B1_XPLAINED/Board.h b/lib/lufa/LUFA/Drivers/Board/XMEGA/B1_XPLAINED/Board.h deleted file mode 100644 index b133b9ae3a..0000000000 --- a/lib/lufa/LUFA/Drivers/Board/XMEGA/B1_XPLAINED/Board.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - LUFA Library - Copyright (C) Dean Camera, 2017. - - dean [at] fourwalledcubicle [dot] com - www.lufa-lib.org -*/ - -/* - Copyright 2017 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 disclaims 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 information header for the Atmel XMEGA B1 Xplained. - * \copydetails Group_BoardInfo_B1_XPLAINED - * - * \note This file should not be included directly. It is automatically included as needed by the Board driver - * dispatch header located in LUFA/Drivers/Board/Board.h. - */ - -/** \ingroup Group_BoardInfo - * \defgroup Group_BoardInfo_B1_XPLAINED B1_XPLAINED - * \brief Board specific information header for the Atmel XMEGA B1 Xplained. - * - * Board specific information header for the Atmel XMEGA B1 Xplained. - * - * @{ - */ - -#ifndef __BOARD_B1_XPLAINED_H__ -#define __BOARD_B1_XPLAINED_H__ - - /* Includes: */ - #include "../../../../Common/Common.h" - #include "../../Buttons.h" - #include "../../Dataflash.h" - #include "../../LEDs.h" - - /* Enable C linkage for C++ Compilers: */ - #if defined(__cplusplus) - extern "C" { - #endif - - /* Preprocessor Checks: */ - #if !defined(__INCLUDE_FROM_BOARD_H) - #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. - #endif - - /* Public Interface - May be used in end-application: */ - /* Macros: */ - /** Indicates the board has hardware Buttons mounted. */ - #define BOARD_HAS_BUTTONS - - /** Indicates the board has a hardware Dataflash mounted. */ - #define BOARD_HAS_DATAFLASH - - /** Indicates the board has hardware LEDs mounted. */ - #define BOARD_HAS_LEDS - - /* Disable C linkage for C++ Compilers: */ - #if defined(__cplusplus) - } - #endif - -#endif - -/** @} */ - diff --git a/lib/lufa/LUFA/Drivers/Board/XMEGA/B1_XPLAINED/Buttons.h b/lib/lufa/LUFA/Drivers/Board/XMEGA/B1_XPLAINED/Buttons.h deleted file mode 100644 index 01c7c084a6..0000000000 --- a/lib/lufa/LUFA/Drivers/Board/XMEGA/B1_XPLAINED/Buttons.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - LUFA Library - Copyright (C) Dean Camera, 2017. - - dean [at] fourwalledcubicle [dot] com - www.lufa-lib.org -*/ - -/* - Copyright 2017 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 disclaims 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 Buttons driver header for the Atmel XMEGA B1 Xplained. - * \copydetails Group_Buttons_B1_XPLAINED - * - * \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. - */ - -/** \ingroup Group_Buttons - * \defgroup Group_Buttons_B1_XPLAINED B1_XPLAINED - * \brief Board specific Buttons driver header for the Atmel XMEGA B1 Xplained. - * - * Board specific Buttons driver header for the Atmel XMEGA B1 Xplained. - * - * - * - * - * - * - * - *
NameInfoActive LevelPort Pin
BUTTONS_BUTTON1Touch CS0 ButtonLowPORTE.0
BUTTONS_BUTTON2Touch CS1 ButtonLowPORTE.1
BUTTONS_BUTTON3Touch CS2 ButtonLowPORTE.2
BUTTONS_BUTTON4Touch CS3 ButtonLowPORTE.3
- * - * @{ - */ - -#ifndef __BUTTONS_B1_XPLAINED_H__ -#define __BUTTONS_B1_XPLAINED_H__ - - /* Includes: */ - #include - - /* 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 << 0) - - /** Button mask for the second button on the board. */ - #define BUTTONS_BUTTON2 (1 << 1) - - /** Button mask for the third button on the board. */ - #define BUTTONS_BUTTON3 (1 << 2) - - /** Button mask for the fourth button on the board. */ - #define BUTTONS_BUTTON4 (1 << 3) - - /* Inline Functions: */ - #if !defined(__DOXYGEN__) - static inline void Buttons_Init(void) - { - PORTE.OUTSET = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2 | BUTTONS_BUTTON3 | BUTTONS_BUTTON4); - - PORTCFG.MPCMASK = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2 | BUTTONS_BUTTON3 | BUTTONS_BUTTON4); - PORTE.PIN0CTRL = (PORT_INVEN_bm | PORT_OPC_PULLUP_gc); - } - - static inline void Buttons_Disable(void) - { - PORTE.OUTCLR = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2 | BUTTONS_BUTTON3 | BUTTONS_BUTTON4); - - PORTCFG.MPCMASK = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2 | BUTTONS_BUTTON3 | BUTTONS_BUTTON4); - PORTE.PIN0CTRL = 0; - } - - static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t Buttons_GetStatus(void) - { - return (PORTE_IN & (BUTTONS_BUTTON1 | BUTTONS_BUTTON2 | BUTTONS_BUTTON3 | BUTTONS_BUTTON4)); - } - #endif - - /* Disable C linkage for C++ Compilers: */ - #if defined(__cplusplus) - } - #endif - -#endif - -/** @} */ - diff --git a/lib/lufa/LUFA/Drivers/Board/XMEGA/B1_XPLAINED/Dataflash.h b/lib/lufa/LUFA/Drivers/Board/XMEGA/B1_XPLAINED/Dataflash.h deleted file mode 100644 index 71402661cd..0000000000 --- a/lib/lufa/LUFA/Drivers/Board/XMEGA/B1_XPLAINED/Dataflash.h +++ /dev/null @@ -1,229 +0,0 @@ -/* - LUFA Library - Copyright (C) Dean Camera, 2017. - - dean [at] fourwalledcubicle [dot] com - www.lufa-lib.org -*/ - -/* - Copyright 2017 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 disclaims 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 Dataflash driver header for the Atmel XMEGA B1 Xplained. - * \copydetails Group_Dataflash_B1_XPLAINED - * - * \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. - */ - -/** \ingroup Group_Dataflash - * \defgroup Group_Dataflash_B1_XPLAINED B1_XPLAINED - * \brief Board specific Dataflash driver header for the Atmel XMEGA B1 Xplained. - * - * Board specific Dataflash driver header for the Atmel XMEGA B1 Xplained board. - * - * - * - * - *
NameInfoSelect PinSPI Port
DATAFLASH_CHIP1AT45DB642D (8MB)PORTD.2USARTC0 (In SPI Mode, Remapped)
- * - * @{ - */ - -#ifndef __DATAFLASH_B1_XPLAINED_H__ -#define __DATAFLASH_B1_XPLAINED_H__ - - /* Includes: */ - #include "../../../../Common/Common.h" - #include "../../../Misc/AT45DB642D.h" - #include "../../../Peripheral/SerialSPI.h" - - /* Preprocessor Checks: */ - #if !defined(__INCLUDE_FROM_DATAFLASH_H) - #error Do not include this file directly. Include LUFA/Drivers/Board/Dataflash.h instead. - #endif - - /* Private Interface - For use in library only: */ - #if !defined(__DOXYGEN__) - /* Macros: */ - #define DATAFLASH_CHIPCS_MASK DATAFLASH_CHIP1 - #define DATAFLASH_CHIPCS_PORT PORTD - #endif - - /* Public Interface - May be used in end-application: */ - /* Macros: */ - /** Constant indicating the total number of dataflash ICs mounted on the selected board. */ - #define DATAFLASH_TOTALCHIPS 1 - - /** Mask for no dataflash chip selected. */ - #define DATAFLASH_NO_CHIP 0 - - /** Mask for the first dataflash chip selected. */ - #define DATAFLASH_CHIP1 (1 << 2) - - /** Internal main memory page size for the board's dataflash ICs. */ - #define DATAFLASH_PAGE_SIZE 1024 - - /** Total number of pages inside each of the board's dataflash ICs. */ - #define DATAFLASH_PAGES 8192 - - /* Inline Functions: */ - /** Initializes the dataflash driver so that commands and data may be sent to an attached dataflash IC. - * The appropriate SPI interface will be automatically configured. - */ - static inline void Dataflash_Init(void) - { - DATAFLASH_CHIPCS_PORT.DIRSET = DATAFLASH_CHIPCS_MASK; - - PORTCFG.MPCMASK = DATAFLASH_CHIPCS_MASK; - DATAFLASH_CHIPCS_PORT.PIN0CTRL = PORT_INVEN_bm; - - SerialSPI_Init(&USARTC0, (USART_SPI_SCK_LEAD_RISING | USART_SPI_SAMPLE_LEADING | USART_SPI_ORDER_MSB_FIRST), (F_CPU / 2)); - - PORTC.REMAP |= PORT_USART0_bm; - PORTC.DIRSET = PIN7_bm | PIN5_bm; - PORTC.DIRCLR = PIN6_bm; - PORTC.PIN6CTRL = PORT_OPC_PULLUP_gc; - } - - /** Sends a byte to the currently selected dataflash IC, and returns a byte from the dataflash. - * - * \param[in] Byte Byte of data to send to the dataflash - * - * \return Last response byte from the dataflash - */ - static inline uint8_t Dataflash_TransferByte(const uint8_t Byte) ATTR_ALWAYS_INLINE; - static inline uint8_t Dataflash_TransferByte(const uint8_t Byte) - { - return SerialSPI_TransferByte(&USARTC0, Byte); - } - - /** Sends a byte to the currently selected dataflash IC, and ignores the next byte from the dataflash. - * - * \param[in] Byte Byte of data to send to the dataflash - */ - static inline void Dataflash_SendByte(const uint8_t Byte) ATTR_ALWAYS_INLINE; - static inline void Dataflash_SendByte(const uint8_t Byte) - { - SerialSPI_SendByte(&USARTC0, Byte); - } - - /** Sends a dummy byte to the currently selected dataflash IC, and returns the next byte from the dataflash. - * - * \return Last response byte from the dataflash - */ - static inline uint8_t Dataflash_ReceiveByte(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT; - static inline uint8_t Dataflash_ReceiveByte(void) - { - return SerialSPI_ReceiveByte(&USARTC0); - } - - /** Determines the currently selected dataflash chip. - * - * \return Mask of the currently selected Dataflash chip, either \ref DATAFLASH_NO_CHIP if no chip is selected - * or a DATAFLASH_CHIPn mask (where n is the chip number). - */ - static inline uint8_t Dataflash_GetSelectedChip(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT; - static inline uint8_t Dataflash_GetSelectedChip(void) - { - return (DATAFLASH_CHIPCS_PORT.OUT & DATAFLASH_CHIPCS_MASK); - } - - /** Selects the given dataflash chip. - * - * \param[in] ChipMask Mask of the Dataflash IC to select, in the form of a \c DATAFLASH_CHIPn mask (where n is - * the chip number). - */ - static inline void Dataflash_SelectChip(const uint8_t ChipMask) ATTR_ALWAYS_INLINE; - static inline void Dataflash_SelectChip(const uint8_t ChipMask) - { - DATAFLASH_CHIPCS_PORT.OUTCLR = DATAFLASH_CHIPCS_MASK; - DATAFLASH_CHIPCS_PORT.OUTSET = (ChipMask & DATAFLASH_CHIPCS_MASK); - } - - /** Deselects the current dataflash chip, so that no dataflash is selected. */ - static inline void Dataflash_DeselectChip(void) ATTR_ALWAYS_INLINE; - static inline void Dataflash_DeselectChip(void) - { - Dataflash_SelectChip(DATAFLASH_NO_CHIP); - } - - /** Selects a dataflash IC from the given page number, which should range from 0 to - * ((DATAFLASH_PAGES * DATAFLASH_TOTALCHIPS) - 1). For boards containing only one - * dataflash IC, this will select DATAFLASH_CHIP1. If the given page number is outside - * the total number of pages contained in the boards dataflash ICs, all dataflash ICs - * are deselected. - * - * \param[in] PageAddress Address of the page to manipulate, ranging from - * 0 to ((DATAFLASH_PAGES * DATAFLASH_TOTALCHIPS) - 1). - */ - static inline void Dataflash_SelectChipFromPage(const uint16_t PageAddress) - { - Dataflash_DeselectChip(); - - if (PageAddress >= (DATAFLASH_PAGES * DATAFLASH_TOTALCHIPS)) - return; - - Dataflash_SelectChip(DATAFLASH_CHIP1); - } - - /** Toggles the select line of the currently selected dataflash IC, so that it is ready to receive - * a new command. - */ - static inline void Dataflash_ToggleSelectedChipCS(void) - { - uint8_t SelectedChipMask = Dataflash_GetSelectedChip(); - - Dataflash_DeselectChip(); - Dataflash_SelectChip(SelectedChipMask); - } - - /** Spin-loops while the currently selected dataflash is busy executing a command, such as a main - * memory page program or main memory to buffer transfer. - */ - static inline void Dataflash_WaitWhileBusy(void) - { - Dataflash_ToggleSelectedChipCS(); - Dataflash_SendByte(DF_CMD_GETSTATUS); - while (!(Dataflash_ReceiveByte() & DF_STATUS_READY)); - Dataflash_ToggleSelectedChipCS(); - } - - /** Sends a set of page and buffer address bytes to the currently selected dataflash IC, for use with - * dataflash commands which require a complete 24-bit address. - * - * \param[in] PageAddress Page address within the selected dataflash IC - * \param[in] BufferByte Address within the dataflash's buffer - */ - static inline void Dataflash_SendAddressBytes(uint16_t PageAddress, - const uint16_t BufferByte) - { - Dataflash_SendByte(PageAddress >> 5); - Dataflash_SendByte((PageAddress << 3) | (BufferByte >> 8)); - Dataflash_SendByte(BufferByte); - } - -#endif - -/** @} */ - diff --git a/lib/lufa/LUFA/Drivers/Board/XMEGA/B1_XPLAINED/LEDs.h b/lib/lufa/LUFA/Drivers/Board/XMEGA/B1_XPLAINED/LEDs.h deleted file mode 100644 index 078532ac4f..0000000000 --- a/lib/lufa/LUFA/Drivers/Board/XMEGA/B1_XPLAINED/LEDs.h +++ /dev/null @@ -1,183 +0,0 @@ -/* - LUFA Library - Copyright (C) Dean Camera, 2017. - - dean [at] fourwalledcubicle [dot] com - www.lufa-lib.org -*/ - -/* - Copyright 2017 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 disclaims 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 Atmel XMEGA B1 Xplained. - * \copydetails Group_LEDs_B1_XPLAINED - * - * \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_B1_XPLAINED B1_XPLAINED - * \brief Board specific LED driver header for the Atmel XMEGA B1 Xplained. - * - * Board specific LED driver header for the Atmel XMEGA B1 Xplained. - * - * - * - * - * - * - * - * - *
NameColorInfoActive LevelPort Pin
LEDS_LED1YellowLED0 LEDHighPORTB.4
LEDS_LED2YellowLED1 LEDHighPORTB.5
LEDS_LED3YellowLED2 LEDHighPORTB.6
LEDS_LED4YellowLED3 LEDHighPORTB.7
LEDS_LED5GreenUSB LEDLowPORTE.4
- * - * @{ - */ - -#ifndef __LEDS_B1_XPLAINED_H__ -#define __LEDS_B1_XPLAINED_H__ - - /* Includes: */ - #include - - /* 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 - - /* Private Interface - For use in library only: */ - #if !defined(__DOXYGEN__) - /* Macros: */ - #define LEDS_PORTB_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3 | LEDS_LED4) - #define LEDS_PORTE_LEDS LEDS_LED5 - - #define LEDS_PORTE_MASK_SHIFT 1 - #endif - - /* Public Interface - May be used in end-application: */ - /* Macros: */ - /** LED mask for the first LED on the board. */ - #define LEDS_LED1 (1 << 4) - - /** LED mask for the second LED on the board. */ - #define LEDS_LED2 (1 << 5) - - /** LED mask for the third LED on the board. */ - #define LEDS_LED3 (1 << 6) - - /** LED mask for the fourth LED on the board. */ - #define LEDS_LED4 (1 << 7) - - /** LED mask for the fifth LED on the board. */ - #define LEDS_LED5 ((1 << 4) >> LEDS_PORTE_MASK_SHIFT) - - /** LED mask for all the LEDs on the board. */ - #define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3 | LEDS_LED4 | LEDS_LED5) - - /** LED mask for none of the board LEDs. */ - #define LEDS_NO_LEDS 0 - - /* Inline Functions: */ - #if !defined(__DOXYGEN__) - static inline void LEDs_Init(void) - { - PORTB.DIRSET = LEDS_PORTB_LEDS; - PORTB.OUTCLR = LEDS_PORTB_LEDS; - - PORTCFG.MPCMASK = LEDS_PORTB_LEDS; - PORTB.PIN0CTRL = PORT_INVEN_bm; - - PORTE.DIRSET = (LEDS_PORTE_LEDS << LEDS_PORTE_MASK_SHIFT); - PORTE.OUTCLR = (LEDS_PORTE_LEDS << LEDS_PORTE_MASK_SHIFT); - } - - static inline void LEDs_Disable(void) - { - PORTB.DIRCLR = LEDS_PORTB_LEDS; - PORTB.OUTCLR = LEDS_PORTB_LEDS; - - PORTCFG.MPCMASK = 0; - PORTB.PIN0CTRL = LEDS_PORTB_LEDS; - - PORTE.DIRCLR = (LEDS_PORTE_LEDS << LEDS_PORTE_MASK_SHIFT); - PORTE.OUTCLR = (LEDS_PORTE_LEDS << LEDS_PORTE_MASK_SHIFT); - } - - static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) - { - PORTB_OUTSET = (LEDMask & LEDS_PORTB_LEDS); - PORTE_OUTSET = ((LEDMask & LEDS_PORTE_LEDS) << LEDS_PORTE_MASK_SHIFT); - } - - static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask) - { - PORTB_OUTCLR = (LEDMask & LEDS_PORTB_LEDS); - PORTE_OUTCLR = ((LEDMask & LEDS_PORTE_LEDS) << LEDS_PORTE_MASK_SHIFT); - } - - static inline void LEDs_SetAllLEDs(const uint8_t LEDMask) - { - PORTB_OUTCLR = LEDS_PORTB_LEDS; - PORTE_OUTCLR = (LEDS_PORTE_LEDS << LEDS_PORTE_MASK_SHIFT); - - PORTB_OUTSET = (LEDMask & LEDS_PORTB_LEDS); - PORTE_OUTSET = ((LEDMask & LEDS_PORTE_LEDS) << LEDS_PORTE_MASK_SHIFT); - } - - static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, - const uint8_t ActiveMask) - { - PORTB_OUTCLR = (LEDMask & LEDS_PORTB_LEDS); - PORTE_OUTCLR = ((LEDMask & LEDS_PORTE_LEDS) << LEDS_PORTE_MASK_SHIFT); - - PORTB_OUTSET = (ActiveMask & LEDS_PORTB_LEDS); - PORTE_OUTSET = ((ActiveMask & LEDS_PORTE_LEDS) << LEDS_PORTE_MASK_SHIFT); - } - - static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) - { - PORTB_OUTTGL = (LEDMask & LEDS_PORTB_LEDS); - PORTE_OUTTGL = ((LEDMask & LEDS_PORTE_LEDS) << LEDS_PORTE_MASK_SHIFT); - } - - static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t LEDs_GetLEDs(void) - { - return ((PORTB_OUT & LEDS_PORTB_LEDS) | (PORTE_OUT & (LEDS_PORTE_LEDS << LEDS_PORTE_MASK_SHIFT))); - } - #endif - - /* Disable C linkage for C++ Compilers: */ - #if defined(__cplusplus) - } - #endif - -#endif - -/** @} */ - diff --git a/lib/lufa/LUFA/Drivers/Board/XMEGA/C3_XPLAINED/Board.h b/lib/lufa/LUFA/Drivers/Board/XMEGA/C3_XPLAINED/Board.h deleted file mode 100644 index e48bd5836f..0000000000 --- a/lib/lufa/LUFA/Drivers/Board/XMEGA/C3_XPLAINED/Board.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - LUFA Library - Copyright (C) Dean Camera, 2017. - - dean [at] fourwalledcubicle [dot] com - www.lufa-lib.org -*/ - -/* - Copyright 2017 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 disclaims 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 information header for the Atmel XMEGA C3 Xplained. - * \copydetails Group_BoardInfo_C3_XPLAINED - * - * \note This file should not be included directly. It is automatically included as needed by the Board driver - * dispatch header located in LUFA/Drivers/Board/Board.h. - */ - -/** \ingroup Group_BoardInfo - * \defgroup Group_BoardInfo_C3_XPLAINED C3_XPLAINED - * \brief Board specific information header for the Atmel XMEGA C3 Xplained. - * - * Board specific information header for the Atmel XMEGA C3 Xplained. - * - * @{ - */ - -#ifndef __BOARD_C3_XPLAINED_H__ -#define __BOARD_C3_XPLAINED_H__ - - /* Includes: */ - #include "../../../../Common/Common.h" - #include "../../Buttons.h" - #include "../../Dataflash.h" - #include "../../LEDs.h" - - /* Enable C linkage for C++ Compilers: */ - #if defined(__cplusplus) - extern "C" { - #endif - - /* Preprocessor Checks: */ - #if !defined(__INCLUDE_FROM_BOARD_H) - #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. - #endif - - /* Public Interface - May be used in end-application: */ - /* Macros: */ - /** Indicates the board has hardware Buttons mounted. */ - #define BOARD_HAS_BUTTONS - - /** Indicates the board has hardware LEDs mounted. */ - #define BOARD_HAS_LEDS - - /* Disable C linkage for C++ Compilers: */ - #if defined(__cplusplus) - } - #endif - -#endif - -/** @} */ - diff --git a/lib/lufa/LUFA/Drivers/Board/XMEGA/C3_XPLAINED/Buttons.h b/lib/lufa/LUFA/Drivers/Board/XMEGA/C3_XPLAINED/Buttons.h deleted file mode 100644 index 1a8c1fc7e9..0000000000 --- a/lib/lufa/LUFA/Drivers/Board/XMEGA/C3_XPLAINED/Buttons.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - LUFA Library - Copyright (C) Dean Camera, 2017. - - dean [at] fourwalledcubicle [dot] com - www.lufa-lib.org -*/ - -/* - Copyright 2017 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 disclaims 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 Buttons driver header for the Atmel XMEGA C3 Xplained. - * \copydetails Group_Buttons_C3_XPLAINED - * - * \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. - */ - -/** \ingroup Group_Buttons - * \defgroup Group_Buttons_C3_XPLAINED C3_XPLAINED - * \brief Board specific Buttons driver header for the Atmel XMEGA C3 Xplained. - * - * Board specific Buttons driver header for the Atmel XMEGA C3 Xplained. - * - * - * - * - * - *
NameInfoActive LevelPort Pin
BUTTONS_BUTTON1SW0 ButtonLowPORTF.1
BUTTONS_BUTTON2SW1 ButtonLowPORTF.2
- * - * @{ - */ - -#ifndef __BUTTONS_C3_XPLAINED_H__ -#define __BUTTONS_C3_XPLAINED_H__ - - /* Includes: */ - #include - - /* 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 << 1) - - /** Button mask for the second button on the board. */ - #define BUTTONS_BUTTON2 (1 << 2) - - /* Inline Functions: */ - #if !defined(__DOXYGEN__) - static inline void Buttons_Init(void) - { - PORTF.OUTCLR = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2); - PORTF.PIN1CTRL = (PORT_OPC_PULLUP_gc | PORT_INVEN_bm); - PORTF.PIN2CTRL = (PORT_OPC_PULLUP_gc | PORT_INVEN_bm); - } - - static inline void Buttons_Disable(void) - { - PORTF.OUTCLR = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2); - PORTF.PIN1CTRL = 0; - PORTF.PIN2CTRL = 0; - } - - static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t Buttons_GetStatus(void) - { - return (PORTF_IN & (BUTTONS_BUTTON1 | BUTTONS_BUTTON2)); - } - #endif - - /* Disable C linkage for C++ Compilers: */ - #if defined(__cplusplus) - } - #endif - -#endif - -/** @} */ - diff --git a/lib/lufa/LUFA/Drivers/Board/XMEGA/C3_XPLAINED/LEDs.h b/lib/lufa/LUFA/Drivers/Board/XMEGA/C3_XPLAINED/LEDs.h deleted file mode 100644 index f701c883e1..0000000000 --- a/lib/lufa/LUFA/Drivers/Board/XMEGA/C3_XPLAINED/LEDs.h +++ /dev/null @@ -1,181 +0,0 @@ -/* - LUFA Library - Copyright (C) Dean Camera, 2017. - - dean [at] fourwalledcubicle [dot] com - www.lufa-lib.org -*/ - -/* - Copyright 2017 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 disclaims 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 Atmel XMEGA C3 Xplained. - * \copydetails Group_LEDs_C3_XPLAINED - * - * \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_C3_XPLAINED C3_XPLAINED - * \brief Board specific LED driver header for the Atmel XMEGA C3 Xplained. - * - * Board specific LED driver header for the Atmel XMEGA C3 Xplained. - * - * - * - * - * - * - * - *
NameColorInfoActive LevelPort Pin
LEDS_LED1YellowLED0 LEDLowPORTR.0
LEDS_LED2YellowLED1 LEDLowPORTR.1
LEDS_LED3RedStatus Bicolour Red LEDLowPORTD.4
LEDS_LED4GreenStatus Bicolour Green LEDHighPORTD.5
- * - * @{ - */ - -#ifndef __LEDS_C3_XPLAINED_H__ -#define __LEDS_C3_XPLAINED_H__ - - /* Includes: */ - #include - - /* 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 - - /* Private Interface - For use in library only: */ - #if !defined(__DOXYGEN__) - /* Macros: */ - #define LEDS_PORTR_LEDS (LEDS_LED1 | LEDS_LED2) - #define LEDS_PORTD_LEDS (LEDS_LED3 | LEDS_LED4) - #endif - - /* Public Interface - May be used in end-application: */ - /* Macros: */ - /** LED mask for the first LED on the board. */ - #define LEDS_LED1 (1 << 0) - - /** LED mask for the second LED on the board. */ - #define LEDS_LED2 (1 << 1) - - /** LED mask for the third LED on the board. */ - #define LEDS_LED3 (1 << 4) - - /** LED mask for the fourth LED on the board. */ - #define LEDS_LED4 (1 << 5) - - /** LED mask for all the LEDs on the board. */ - #define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3 | LEDS_LED4) - - /** LED mask for none of the board LEDs. */ - #define LEDS_NO_LEDS 0 - - /* Inline Functions: */ - #if !defined(__DOXYGEN__) - static inline void LEDs_Init(void) - { - PORTR.DIRSET = LEDS_PORTR_LEDS; - PORTR.OUTCLR = LEDS_PORTR_LEDS; - - PORTCFG.MPCMASK = LEDS_PORTR_LEDS; - PORTR.PIN0CTRL = PORT_INVEN_bm; - - PORTD.DIRSET = LEDS_PORTD_LEDS; - PORTD.OUTCLR = LEDS_PORTD_LEDS; - - PORTD.PIN4CTRL = PORT_INVEN_bm; - } - - static inline void LEDs_Disable(void) - { - PORTR.DIRCLR = LEDS_PORTR_LEDS; - PORTR.OUTCLR = LEDS_PORTR_LEDS; - - PORTCFG.MPCMASK = 0; - PORTR.PIN0CTRL = LEDS_PORTR_LEDS; - - PORTD.DIRCLR = LEDS_PORTD_LEDS; - PORTD.OUTCLR = LEDS_PORTD_LEDS; - - PORTD.PIN4CTRL = 0; - } - - static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) - { - PORTR_OUTSET = LEDMask & LEDS_PORTR_LEDS; - PORTD_OUTSET = LEDMask & LEDS_PORTD_LEDS; - } - - static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask) - { - PORTR_OUTCLR = LEDMask & LEDS_PORTR_LEDS; - PORTD_OUTCLR = LEDMask & LEDS_PORTD_LEDS; - } - - static inline void LEDs_SetAllLEDs(const uint8_t LEDMask) - { - PORTR_OUTCLR = LEDS_PORTR_LEDS; - PORTD_OUTCLR = LEDS_PORTD_LEDS; - - PORTR_OUTSET = (LEDMask & LEDS_PORTR_LEDS); - PORTD_OUTSET = (LEDMask & LEDS_PORTD_LEDS); - } - - static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, - const uint8_t ActiveMask) - { - PORTR_OUTCLR = (LEDMask & LEDS_PORTR_LEDS); - PORTD_OUTCLR = (LEDMask & LEDS_PORTD_LEDS); - - PORTR_OUTSET = (ActiveMask & LEDS_PORTR_LEDS); - PORTD_OUTSET = (ActiveMask & LEDS_PORTD_LEDS); - } - - static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) - { - PORTR_OUTTGL = (LEDMask & LEDS_PORTR_LEDS); - PORTD_OUTTGL = (LEDMask & LEDS_PORTD_LEDS); - } - - static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; - static inline uint8_t LEDs_GetLEDs(void) - { - return ((PORTR_OUT & LEDS_PORTR_LEDS) | (PORTD_OUT & LEDS_PORTD_LEDS)); - } - #endif - - /* Disable C linkage for C++ Compilers: */ - #if defined(__cplusplus) - } - #endif - -#endif - -/** @} */ - -- cgit v1.2.3