projects
/
pub
/
USBasp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e4cfd52
)
Fix inverted bit-banged USART logic in the AVRISP project for PDI programming. Add...
author
Dean Camera
<dean@fourwalledcubicle.com>
Wed, 9 Dec 2009 12:01:01 +0000
(12:01 +0000)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Wed, 9 Dec 2009 12:01:01 +0000
(12:01 +0000)
LUFA/Drivers/USB/LowLevel/Endpoint.h
patch
|
blob
|
blame
|
history
LUFA/ManPages/ChangeLog.txt
patch
|
blob
|
blame
|
history
Projects/AVRISP/Lib/PDIProtocol.c
patch
|
blob
|
blame
|
history
Projects/AVRISP/Lib/PDITarget.c
patch
|
blob
|
blame
|
history
Projects/AVRISP/Lib/PDITarget.h
patch
|
blob
|
blame
|
history
Projects/AVRISP/makefile
patch
|
blob
|
blame
|
history
diff --git
a/LUFA/Drivers/USB/LowLevel/Endpoint.h
b/LUFA/Drivers/USB/LowLevel/Endpoint.h
index
8ff9306
..
ef23253
100644
(file)
--- a/
LUFA/Drivers/USB/LowLevel/Endpoint.h
+++ b/
LUFA/Drivers/USB/LowLevel/Endpoint.h
@@
-338,7
+338,7
@@
*/
\r
static inline void Endpoint_SetEndpointDirection(uint8_t DirectionMask);
\r
#else
\r
*/
\r
static inline void Endpoint_SetEndpointDirection(uint8_t DirectionMask);
\r
#else
\r
- #if defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)
|| defined(__DOXYGEN__)
\r
+ #if defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)
\r
#define Endpoint_BytesInEndpoint() UEBCX
\r
#elif defined(USB_SERIES_4_AVR)
\r
#define Endpoint_BytesInEndpoint() (((uint16_t)UEBCHX << 8) | UEBCLX)
\r
#define Endpoint_BytesInEndpoint() UEBCX
\r
#elif defined(USB_SERIES_4_AVR)
\r
#define Endpoint_BytesInEndpoint() (((uint16_t)UEBCHX << 8) | UEBCLX)
\r
diff --git
a/LUFA/ManPages/ChangeLog.txt
b/LUFA/ManPages/ChangeLog.txt
index
f7af9a1
..
143b5a1
100644
(file)
--- a/
LUFA/ManPages/ChangeLog.txt
+++ b/
LUFA/ManPages/ChangeLog.txt
@@
-56,6
+56,7
@@
* - Fixed TeensyHID bootloader not properly shutting down the USB interface to trigger a disconnection on the host before resetting
\r
* - Fixed MassStorageHost Class driver demo not having USB_STREAM_TIMEOUT_MS compile time option set properly to prevent slow
\r
* devices from timing out the data pipes
\r
* - Fixed TeensyHID bootloader not properly shutting down the USB interface to trigger a disconnection on the host before resetting
\r
* - Fixed MassStorageHost Class driver demo not having USB_STREAM_TIMEOUT_MS compile time option set properly to prevent slow
\r
* devices from timing out the data pipes
\r
+ * - Fixed the definition of the Endpoint_BytesInEndpoint() macro for the U4 parts
\r
*
\r
* \section Sec_ChangeLog091122 Version 091122
\r
*
\r
*
\r
* \section Sec_ChangeLog091122 Version 091122
\r
*
\r
diff --git
a/Projects/AVRISP/Lib/PDIProtocol.c
b/Projects/AVRISP/Lib/PDIProtocol.c
index
d98c51c
..
864d4e9
100644
(file)
--- a/
Projects/AVRISP/Lib/PDIProtocol.c
+++ b/
Projects/AVRISP/Lib/PDIProtocol.c
@@
-110,9
+110,7
@@
static void PDIProtocol_EnterXPROGMode(void)
/* Must hold DATA line high for at least 90nS to enable PDI interface */
\r
PDIDATA_LINE_PORT |= PDIDATA_LINE_MASK;
\r
asm volatile ("NOP"::);
\r
/* Must hold DATA line high for at least 90nS to enable PDI interface */
\r
PDIDATA_LINE_PORT |= PDIDATA_LINE_MASK;
\r
asm volatile ("NOP"::);
\r
- #if (F_CPU > 8000000)
\r
asm volatile ("NOP"::);
\r
asm volatile ("NOP"::);
\r
- #endif
\r
\r
/* Toggle CLOCK line 16 times within 100uS of the original 90nS timeout to keep PDI interface enabled */
\r
for (uint8_t i = 0; i < 16; i++)
\r
\r
/* Toggle CLOCK line 16 times within 100uS of the original 90nS timeout to keep PDI interface enabled */
\r
for (uint8_t i = 0; i < 16; i++)
\r
@@
-120,7
+118,7
@@
static void PDIProtocol_EnterXPROGMode(void)
\r
/* Enable access to the XPROG NVM bus by sending the documented NVM access key to the device */
\r
PDITarget_SendByte(PDI_CMD_KEY);
\r
\r
/* Enable access to the XPROG NVM bus by sending the documented NVM access key to the device */
\r
PDITarget_SendByte(PDI_CMD_KEY);
\r
- for (uint8_t i = 0; i <
8
; i++)
\r
+ for (uint8_t i = 0; i <
sizeof(PDI_NVMENABLE_KEY)
; i++)
\r
PDITarget_SendByte(PDI_NVMENABLE_KEY[i]);
\r
\r
/* Read out the STATUS register to check that NVM access was successfully enabled */
\r
PDITarget_SendByte(PDI_NVMENABLE_KEY[i]);
\r
\r
/* Read out the STATUS register to check that NVM access was successfully enabled */
\r
diff --git
a/Projects/AVRISP/Lib/PDITarget.c
b/Projects/AVRISP/Lib/PDITarget.c
index
98d4bde
..
03dd779
100644
(file)
--- a/
Projects/AVRISP/Lib/PDITarget.c
+++ b/
Projects/AVRISP/Lib/PDITarget.c
@@
-52,9
+52,9
@@
void PDITarget_SendByte(uint8_t Byte)
for (uint8_t i = 0; i < 8; i++)
\r
{
\r
if (Byte & 0x01)
\r
for (uint8_t i = 0; i < 8; i++)
\r
{
\r
if (Byte & 0x01)
\r
- PDIDATA_LINE_PORT |= PDIDATA_LINE_MASK;
\r
- else
\r
PDIDATA_LINE_PORT &= ~PDIDATA_LINE_MASK;
\r
PDIDATA_LINE_PORT &= ~PDIDATA_LINE_MASK;
\r
+ else
\r
+ PDIDATA_LINE_PORT |= PDIDATA_LINE_MASK;
\r
\r
Byte >>= 1;
\r
\r
\r
Byte >>= 1;
\r
\r
diff --git
a/Projects/AVRISP/Lib/PDITarget.h
b/Projects/AVRISP/Lib/PDITarget.h
index
294d1a9
..
00ce68b
100644
(file)
--- a/
Projects/AVRISP/Lib/PDITarget.h
+++ b/
Projects/AVRISP/Lib/PDITarget.h
@@
-65,7
+65,7
@@
#define PDIDATA_LINE_PORT PORTB
\r
#define PDIDATA_LINE_DDR DDRB
\r
#define PDIDATA_LINE_PIN PINB
\r
#define PDIDATA_LINE_PORT PORTB
\r
#define PDIDATA_LINE_DDR DDRB
\r
#define PDIDATA_LINE_PIN PINB
\r
- #define PDIDATA_LINE_MASK (1 <<
2
)
\r
+ #define PDIDATA_LINE_MASK (1 <<
3
)
\r
\r
#define PDICLOCK_LINE_PORT RESET_LINE_PORT
\r
#define PDICLOCK_LINE_DDR RESET_LINE_DDR
\r
\r
#define PDICLOCK_LINE_PORT RESET_LINE_PORT
\r
#define PDICLOCK_LINE_DDR RESET_LINE_DDR
\r
@@
-91,7
+91,9
@@
#define PDI_NVMENABLE_KEY (uint8_t[]){0x12, 0x89, 0xAB, 0x45, 0xCD, 0xD8, 0x88, 0xFF}
\r
\r
#define TOGGLE_PDI_CLOCK MACROS{ PDICLOCK_LINE_PORT ^= PDICLOCK_LINE_MASK; \
\r
#define PDI_NVMENABLE_KEY (uint8_t[]){0x12, 0x89, 0xAB, 0x45, 0xCD, 0xD8, 0x88, 0xFF}
\r
\r
#define TOGGLE_PDI_CLOCK MACROS{ PDICLOCK_LINE_PORT ^= PDICLOCK_LINE_MASK; \
\r
- PDICLOCK_LINE_PORT ^= PDICLOCK_LINE_MASK; }MACROE
\r
+ asm volatile ("NOP" ::); \
\r
+ PDICLOCK_LINE_PORT ^= PDICLOCK_LINE_MASK; \
\r
+ asm volatile ("NOP" ::); }MACROE
\r
\r
/* Function Prototypes: */
\r
void PDITarget_SendByte(uint8_t Byte);
\r
\r
/* Function Prototypes: */
\r
void PDITarget_SendByte(uint8_t Byte);
\r
diff --git
a/Projects/AVRISP/makefile
b/Projects/AVRISP/makefile
index
6eebb2b
..
b215a22
100644
(file)
--- a/
Projects/AVRISP/makefile
+++ b/
Projects/AVRISP/makefile
@@
-60,7
+60,7
@@
\r
\r
# MCU name
\r
\r
\r
# MCU name
\r
-MCU = at90usb1
287
\r
+MCU = at90usb1
62
\r
\r
\r
# Target board (see library "Board Types" documentation, USER or blank for projects not requiring
\r
\r
\r
# Target board (see library "Board Types" documentation, USER or blank for projects not requiring
\r