diff options
Diffstat (limited to 'LUFA/Drivers/Board/EVK527')
-rw-r--r-- | LUFA/Drivers/Board/EVK527/AT45DB321C.h | 27 | ||||
-rw-r--r-- | LUFA/Drivers/Board/EVK527/Buttons.h | 19 | ||||
-rw-r--r-- | LUFA/Drivers/Board/EVK527/Dataflash.h | 29 | ||||
-rw-r--r-- | LUFA/Drivers/Board/EVK527/Joystick.h | 21 | ||||
-rw-r--r-- | LUFA/Drivers/Board/EVK527/LEDs.h | 23 |
5 files changed, 62 insertions, 57 deletions
diff --git a/LUFA/Drivers/Board/EVK527/AT45DB321C.h b/LUFA/Drivers/Board/EVK527/AT45DB321C.h index 6b056b53c..ee4f1f690 100644 --- a/LUFA/Drivers/Board/EVK527/AT45DB321C.h +++ b/LUFA/Drivers/Board/EVK527/AT45DB321C.h @@ -1,7 +1,7 @@ /* LUFA Library Copyright (C) Dean Camera, 2010. - + dean [at] fourwalledcubicle [dot] com www.fourwalledcubicle.com */ @@ -9,13 +9,13 @@ /* 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 - 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 - 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 + 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 @@ -47,7 +47,7 @@ * * @{ */ - + #ifndef __DATAFLASH_CMDS_H__ #define __DATAFLASH_CMDS_H__ @@ -56,9 +56,9 @@ #define DF_STATUS_READY (1 << 7) #define DF_STATUS_COMPMISMATCH (1 << 6) #define DF_STATUS_SECTORPROTECTION_ON (1 << 1) - + #define DF_MANUFACTURER_ATMEL 0x1F - + #define DF_CMD_GETSTATUS 0xD7 #define DF_CMD_MAINMEMTOBUFF1 0x53 @@ -67,12 +67,12 @@ #define DF_CMD_MAINMEMTOBUFF2COMP 0x61 #define DF_CMD_AUTOREWRITEBUFF1 0x58 #define DF_CMD_AUTOREWRITEBUFF2 0x59 - + #define DF_CMD_MAINMEMPAGEREAD 0xD2 #define DF_CMD_CONTARRAYREAD_LF 0xE8 #define DF_CMD_BUFF1READ_LF 0xD4 #define DF_CMD_BUFF2READ_LF 0xD6 - + #define DF_CMD_BUFF1WRITE 0x84 #define DF_CMD_BUFF2WRITE 0x87 #define DF_CMD_BUFF1TOMAINMEMWITHERASE 0x83 @@ -81,7 +81,7 @@ #define DF_CMD_BUFF2TOMAINMEM 0x89 #define DF_CMD_MAINMEMPAGETHROUGHBUFF1 0x82 #define DF_CMD_MAINMEMPAGETHROUGHBUFF2 0x85 - + #define DF_CMD_PAGEERASE 0x81 #define DF_CMD_BLOCKERASE 0x50 @@ -90,9 +90,10 @@ #define DF_CMD_SECTORPROTECTIONOFF_BYTE2 0x2A #define DF_CMD_SECTORPROTECTIONOFF_BYTE3 0x7F #define DF_CMD_SECTORPROTECTIONOFF_BYTE4 0xCF - + #define DF_CMD_READMANUFACTURERDEVICEINFO 0x9F #endif /** @} */ + diff --git a/LUFA/Drivers/Board/EVK527/Buttons.h b/LUFA/Drivers/Board/EVK527/Buttons.h index 624e1c20c..f15550e3e 100644 --- a/LUFA/Drivers/Board/EVK527/Buttons.h +++ b/LUFA/Drivers/Board/EVK527/Buttons.h @@ -1,7 +1,7 @@ /* LUFA Library Copyright (C) Dean Camera, 2010. - + dean [at] fourwalledcubicle [dot] com www.fourwalledcubicle.com */ @@ -9,13 +9,13 @@ /* 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 - 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 - 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 + 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 @@ -72,12 +72,12 @@ #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) @@ -97,7 +97,8 @@ #if defined(__cplusplus) } #endif - + #endif /** @} */ + diff --git a/LUFA/Drivers/Board/EVK527/Dataflash.h b/LUFA/Drivers/Board/EVK527/Dataflash.h index 3bf492438..50de932ba 100644 --- a/LUFA/Drivers/Board/EVK527/Dataflash.h +++ b/LUFA/Drivers/Board/EVK527/Dataflash.h @@ -1,7 +1,7 @@ /* LUFA Library Copyright (C) Dean Camera, 2010. - + dean [at] fourwalledcubicle [dot] com www.fourwalledcubicle.com */ @@ -9,13 +9,13 @@ /* 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 - 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 - 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 + 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 @@ -52,7 +52,7 @@ #define __DATAFLASH_EVK527_H__ /* Includes: */ - #include "AT45DB321C.h" + #include "AT45DB321C.h" /* Preprocessor Checks: */ #if !defined(__INCLUDE_FROM_DATAFLASH_H) @@ -77,7 +77,7 @@ /** Mask for the first dataflash chip selected. */ #define DATAFLASH_CHIP1 0 - + /** Internal main memory page size for the board's dataflash IC. */ #define DATAFLASH_PAGE_SIZE 512 @@ -93,7 +93,7 @@ DATAFLASH_CHIPCS_DDR |= DATAFLASH_CHIPCS_MASK; DATAFLASH_CHIPCS_PORT |= DATAFLASH_CHIPCS_MASK; } - + /** Determines the currently selected dataflash chip. * * \return Mask of the currently selected Dataflash chip, either \ref DATAFLASH_NO_CHIP if no chip is selected @@ -135,7 +135,7 @@ static inline void Dataflash_SelectChipFromPage(const uint16_t PageAddress) { Dataflash_DeselectChip(); - + if (PageAddress >= DATAFLASH_PAGES) return; @@ -148,7 +148,7 @@ static inline void Dataflash_ToggleSelectedChipCS(void) { uint8_t SelectedChipMask = Dataflash_GetSelectedChip(); - + Dataflash_DeselectChip(); Dataflash_SelectChip(SelectedChipMask); } @@ -161,7 +161,7 @@ Dataflash_ToggleSelectedChipCS(); Dataflash_SendByte(DF_CMD_GETSTATUS); while (!(Dataflash_ReceiveByte() & DF_STATUS_READY)); - Dataflash_ToggleSelectedChipCS(); + Dataflash_ToggleSelectedChipCS(); } /** Sends a set of page and buffer address bytes to the currently selected dataflash IC, for use with @@ -172,12 +172,13 @@ */ 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/LUFA/Drivers/Board/EVK527/Joystick.h b/LUFA/Drivers/Board/EVK527/Joystick.h index af3b54fdc..02af59adf 100644 --- a/LUFA/Drivers/Board/EVK527/Joystick.h +++ b/LUFA/Drivers/Board/EVK527/Joystick.h @@ -1,7 +1,7 @@ /* LUFA Library Copyright (C) Dean Camera, 2010. - + dean [at] fourwalledcubicle [dot] com www.fourwalledcubicle.com */ @@ -9,13 +9,13 @@ /* 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 - 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 - 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 + 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 @@ -72,7 +72,7 @@ #define JOY_FMASK ((1 << 4) | (1 << 5) | (1 << 6) | (1 << 7)) #define JOY_CMASK (1 << 6)) #endif - + /* Public Interface - May be used in end-application: */ /* Macros: */ /** Mask for the joystick being pushed in the left direction. */ @@ -89,7 +89,7 @@ /** Mask for the joystick being pushed inward. */ #define JOY_PRESS (1 << 6) - + /* Inline Functions: */ #if !defined(__DOXYGEN__) static inline void Joystick_Init(void) @@ -98,9 +98,9 @@ DDRC &= ~(JOY_CMASK); PORTF |= JOY_FMASK; - PORTC |= JOY_CMASK; + PORTC |= JOY_CMASK; } - + static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT; static inline uint8_t Joystick_GetStatus(void) { @@ -116,3 +116,4 @@ #endif /** @} */ + diff --git a/LUFA/Drivers/Board/EVK527/LEDs.h b/LUFA/Drivers/Board/EVK527/LEDs.h index b24f6eb76..a74d39d5b 100644 --- a/LUFA/Drivers/Board/EVK527/LEDs.h +++ b/LUFA/Drivers/Board/EVK527/LEDs.h @@ -1,7 +1,7 @@ /* LUFA Library Copyright (C) Dean Camera, 2010. - + dean [at] fourwalledcubicle [dot] com www.fourwalledcubicle.com */ @@ -9,13 +9,13 @@ /* 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 - 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 - 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 + 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 @@ -90,7 +90,7 @@ DDRD |= LEDS_ALL_LEDS; PORTD &= ~LEDS_ALL_LEDS; } - + static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) { PORTD |= LEDMask; @@ -105,18 +105,18 @@ { PORTD = ((PORTD & ~LEDS_ALL_LEDS) | LEDMask); } - + static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask) { PORTD = ((PORTD & ~LEDMask) | ActiveMask); } - + static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) { PORTD ^= LEDMask; } - + static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; static inline uint8_t LEDs_GetLEDs(void) { @@ -128,7 +128,8 @@ #if defined(__cplusplus) } #endif - + #endif /** @} */ + |