aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/Board/STK525
diff options
context:
space:
mode:
Diffstat (limited to 'LUFA/Drivers/Board/STK525')
-rw-r--r--LUFA/Drivers/Board/STK525/AT45DB321C.h27
-rw-r--r--LUFA/Drivers/Board/STK525/Buttons.h19
-rw-r--r--LUFA/Drivers/Board/STK525/Dataflash.h29
-rw-r--r--LUFA/Drivers/Board/STK525/Joystick.h27
-rw-r--r--LUFA/Drivers/Board/STK525/LEDs.h25
5 files changed, 66 insertions, 61 deletions
diff --git a/LUFA/Drivers/Board/STK525/AT45DB321C.h b/LUFA/Drivers/Board/STK525/AT45DB321C.h
index 7b95a62d9..ac6985508 100644
--- a/LUFA/Drivers/Board/STK525/AT45DB321C.h
+++ b/LUFA/Drivers/Board/STK525/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/STK525/Buttons.h b/LUFA/Drivers/Board/STK525/Buttons.h
index 0dfac0fd4..91b856d49 100644
--- a/LUFA/Drivers/Board/STK525/Buttons.h
+++ b/LUFA/Drivers/Board/STK525/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/STK525/Dataflash.h b/LUFA/Drivers/Board/STK525/Dataflash.h
index 67b896ecb..d416221eb 100644
--- a/LUFA/Drivers/Board/STK525/Dataflash.h
+++ b/LUFA/Drivers/Board/STK525/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_STK525_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
@@ -135,20 +135,20 @@
static inline void Dataflash_SelectChipFromPage(const uint16_t PageAddress)
{
Dataflash_DeselectChip();
-
+
if (PageAddress >= DATAFLASH_PAGES)
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);
}
@@ -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 >> 6);
Dataflash_SendByte((PageAddress << 2) | (BufferByte >> 8));
Dataflash_SendByte(BufferByte);
}
-
+
#endif
/** @} */
+
diff --git a/LUFA/Drivers/Board/STK525/Joystick.h b/LUFA/Drivers/Board/STK525/Joystick.h
index 5f5e58490..93122237c 100644
--- a/LUFA/Drivers/Board/STK525/Joystick.h
+++ b/LUFA/Drivers/Board/STK525/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
@@ -36,7 +36,7 @@
* \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.
*/
-
+
/** \ingroup Group_Joystick
* @defgroup Group_Joystick_STK525 STK525
*
@@ -47,7 +47,7 @@
*
* @{
*/
-
+
#ifndef __JOYSTICK_STK525_H__
#define __JOYSTICK_STK525_H__
@@ -72,7 +72,7 @@
#define JOY_BMASK ((1 << 5) | (1 << 6) | (1 << 7))
#define JOY_EMASK ((1 << 4) | (1 << 5))
#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 << 5)
-
+
/* Inline Functions: */
#if !defined(__DOXYGEN__)
static inline void Joystick_Init(void)
@@ -98,9 +98,9 @@
DDRE &= ~(JOY_EMASK);
PORTB |= JOY_BMASK;
- PORTE |= JOY_EMASK;
+ PORTE |= JOY_EMASK;
}
-
+
static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Joystick_GetStatus(void)
{
@@ -112,7 +112,8 @@
#if defined(__cplusplus)
}
#endif
-
+
#endif
/** @} */
+
diff --git a/LUFA/Drivers/Board/STK525/LEDs.h b/LUFA/Drivers/Board/STK525/LEDs.h
index 7f3e2934a..99c89d675 100644
--- a/LUFA/Drivers/Board/STK525/LEDs.h
+++ b/LUFA/Drivers/Board/STK525/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
@@ -47,7 +47,7 @@
*
* @{
*/
-
+
#ifndef __LEDS_STK525_H__
#define __LEDS_STK525_H__
@@ -60,7 +60,7 @@
#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.
@@ -93,7 +93,7 @@
DDRD |= LEDS_ALL_LEDS;
PORTD &= ~LEDS_ALL_LEDS;
}
-
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD |= LEDMask;
@@ -108,13 +108,13 @@
{
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;
@@ -131,7 +131,8 @@
#if defined(__cplusplus)
}
#endif
-
+
#endif
/** @} */
+