projects
/
pub
/
lufa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
efb6c35
)
Fix XPLAIN Dataflash and LED drivers.
author
Dean Camera
<dean@fourwalledcubicle.com>
Thu, 7 Jan 2010 12:38:32 +0000
(12:38 +0000)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Thu, 7 Jan 2010 12:38:32 +0000
(12:38 +0000)
LUFA/Drivers/Board/XPLAIN/Dataflash.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/XPLAIN/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/HighLevel/USBMode.h
patch
|
blob
|
blame
|
history
LUFA/ManPages/ChangeLog.txt
patch
|
blob
|
blame
|
history
diff --git
a/LUFA/Drivers/Board/XPLAIN/Dataflash.h
b/LUFA/Drivers/Board/XPLAIN/Dataflash.h
index
d793d30
..
de71f29
100644
(file)
--- a/
LUFA/Drivers/Board/XPLAIN/Dataflash.h
+++ b/
LUFA/Drivers/Board/XPLAIN/Dataflash.h
@@
-72,7
+72,7
@@
/** Mask for the first dataflash chip selected. */
\r
#define DATAFLASH_CHIP1 (1 << 5)
\r
\r
/** Mask for the first dataflash chip selected. */
\r
#define DATAFLASH_CHIP1 (1 << 5)
\r
\r
- #if
BOAD == XPLAIN_REV1
\r
+ #if
(BOARD == BOARD_XPLAIN_REV1)
\r
#define DATAFLASH_PAGE_SIZE 256
\r
\r
#define DATAFLASH_PAGES 2048
\r
#define DATAFLASH_PAGE_SIZE 256
\r
\r
#define DATAFLASH_PAGES 2048
\r
@@
-111,9
+111,7
@@
* \param[in] BufferByte Address within the dataflash's buffer
\r
*/
\r
static inline void Dataflash_SendAddressBytes(uint16_t PageAddress, const uint16_t BufferByte)
\r
* \param[in] BufferByte Address within the dataflash's buffer
\r
*/
\r
static inline void Dataflash_SendAddressBytes(uint16_t PageAddress, const uint16_t BufferByte)
\r
- {
\r
- PageAddress >>= 1;
\r
-
\r
+ {
\r
Dataflash_SendByte(PageAddress >> 5);
\r
Dataflash_SendByte((PageAddress << 3) | (BufferByte >> 8));
\r
Dataflash_SendByte(BufferByte);
\r
Dataflash_SendByte(PageAddress >> 5);
\r
Dataflash_SendByte((PageAddress << 3) | (BufferByte >> 8));
\r
Dataflash_SendByte(BufferByte);
\r
diff --git
a/LUFA/Drivers/Board/XPLAIN/LEDs.h
b/LUFA/Drivers/Board/XPLAIN/LEDs.h
index
6951ce7
..
600be9f
100644
(file)
--- a/
LUFA/Drivers/Board/XPLAIN/LEDs.h
+++ b/
LUFA/Drivers/Board/XPLAIN/LEDs.h
@@
-75,28
+75,28
@@
#if !defined(__DOXYGEN__)
\r
static inline void LEDs_Init(void)
\r
{
\r
#if !defined(__DOXYGEN__)
\r
static inline void LEDs_Init(void)
\r
{
\r
- DDRB |=
LEDS_ALL_LEDS;
\r
- PORTB
&= ~
LEDS_ALL_LEDS;
\r
+ DDRB |= LEDS_ALL_LEDS;
\r
+ PORTB
|=
LEDS_ALL_LEDS;
\r
}
\r
\r
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
\r
{
\r
}
\r
\r
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
\r
{
\r
- PORTB
|=
LEDMask;
\r
+ PORTB
&= ~
LEDMask;
\r
}
\r
\r
static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
\r
{
\r
}
\r
\r
static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
\r
{
\r
- PORTB
&= ~
LEDMask;
\r
+ PORTB
|=
LEDMask;
\r
}
\r
\r
static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
\r
{
\r
}
\r
\r
static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
\r
{
\r
- PORTB = ((PORTB
& ~LEDS_ALL_LEDS) |
LEDMask);
\r
+ PORTB = ((PORTB
| LEDS_ALL_LEDS) & ~
LEDMask);
\r
}
\r
\r
static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask)
\r
{
\r
}
\r
\r
static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask)
\r
{
\r
- PORTB = ((PORTB
& ~(LEDMask & LEDS_ALL_LEDS)) | (
ActiveMask & LEDS_ALL_LEDS));
\r
+ PORTB = ((PORTB
| (LEDMask & LEDS_ALL_LEDS)) & (~
ActiveMask & LEDS_ALL_LEDS));
\r
}
\r
\r
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
\r
}
\r
\r
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
\r
@@
-107,7
+107,7
@@
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
\r
static inline uint8_t LEDs_GetLEDs(void)
\r
{
\r
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
\r
static inline uint8_t LEDs_GetLEDs(void)
\r
{
\r
- return (PORTB & LEDS_ALL_LEDS);
\r
+ return (
~
PORTB & LEDS_ALL_LEDS);
\r
}
\r
#endif
\r
\r
}
\r
#endif
\r
\r
diff --git
a/LUFA/Drivers/USB/HighLevel/USBMode.h
b/LUFA/Drivers/USB/HighLevel/USBMode.h
index
9e2b1ff
..
0f2ecab
100644
(file)
--- a/
LUFA/Drivers/USB/HighLevel/USBMode.h
+++ b/
LUFA/Drivers/USB/HighLevel/USBMode.h
@@
-84,7
+84,7
@@
#if (defined(__AVR_AT90USB162__) || defined(__AVR_AT90USB82__) || \
\r
defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega8U2__))
\r
#define USB_SERIES_2_AVR
\r
#if (defined(__AVR_AT90USB162__) || defined(__AVR_AT90USB82__) || \
\r
defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega8U2__))
\r
#define USB_SERIES_2_AVR
\r
- #elif (defined(__AVR_ATmega
16U4__) || defined(__AVR_ATmega32
U4__))
\r
+ #elif (defined(__AVR_ATmega
32U4__) || defined(__AVR_ATmega16
U4__))
\r
#define USB_SERIES_4_AVR
\r
#elif (defined(__AVR_ATmega32U6__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__))
\r
#define USB_SERIES_6_AVR
\r
#define USB_SERIES_4_AVR
\r
#elif (defined(__AVR_ATmega32U6__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__))
\r
#define USB_SERIES_6_AVR
\r
diff --git
a/LUFA/ManPages/ChangeLog.txt
b/LUFA/ManPages/ChangeLog.txt
index
79fa824
..
351c33f
100644
(file)
--- a/
LUFA/ManPages/ChangeLog.txt
+++ b/
LUFA/ManPages/ChangeLog.txt
@@
-32,6
+32,8
@@
* - Fixed AVRISP PDI race condition where the guard time between direction changes could be interpreted as a start bit
\r
* - Fixed ADC_IsReadingComplete() returning an inverted result
\r
* - Fixed blocking CDC streams not aborting when the host is disconnected
\r
* - Fixed AVRISP PDI race condition where the guard time between direction changes could be interpreted as a start bit
\r
* - Fixed ADC_IsReadingComplete() returning an inverted result
\r
* - Fixed blocking CDC streams not aborting when the host is disconnected
\r
+ * - Fixed XPLAIN board Dataflash driver broken due to incorrect preprocessor commands
\r
+ * - Fixed inverted XPLAIN LED driver output (LED turned on when it was supposed to be turned off, and vice-versa)
\r
*
\r
* \section Sec_ChangeLog091223 Version 091223
\r
*
\r
*
\r
* \section Sec_ChangeLog091223 Version 091223
\r
*
\r