projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added new XCK_RESCUE_CLOCK_ENABLE compile time option to the AVRISP-MKII clone progra...
[pub/USBasp.git]
/
Projects
/
AVRISP-MKII
/
Lib
/
XPROG
/
XPROGTarget.c
diff --git
a/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
b/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
index
28cb6ab
..
f6fff1c
100644
(file)
--- a/
Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
+++ b/
Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
@@
-3,7
+3,7
@@
Copyright (C) Dean Camera, 2010.
dean [at] fourwalledcubicle [dot] com
Copyright (C) Dean Camera, 2010.
dean [at] fourwalledcubicle [dot] com
- www.fourwalledcubicle.com
+ www.lufa-lib.org
*/
/*
*/
/*
@@
-55,7
+55,7
@@
void XPROGTarget_EnableTargetPDI(void)
_delay_us(1);
/* Set up the synchronous USART for XMEGA communications - 8 data bits, even parity, 2 stop bits */
_delay_us(1);
/* Set up the synchronous USART for XMEGA communications - 8 data bits, even parity, 2 stop bits */
- UBRR1 = (
F_CPU / XPROG_HARDWARE_SPEED
);
+ UBRR1 = (
(F_CPU / 2 / XPROG_HARDWARE_SPEED) - 1
);
UCSR1B = (1 << TXEN1);
UCSR1C = (1 << UMSEL10) | (1 << UPM11) | (1 << USBS1) | (1 << UCSZ11) | (1 << UCSZ10) | (1 << UCPOL1);
UCSR1B = (1 << TXEN1);
UCSR1C = (1 << UMSEL10) | (1 << UPM11) | (1 << USBS1) | (1 << UCSZ11) | (1 << UCSZ10) | (1 << UCPOL1);
@@
-79,7
+79,7
@@
void XPROGTarget_EnableTargetTPI(void)
DDRD &= ~(1 << 2);
/* Set up the synchronous USART for TINY communications - 8 data bits, even parity, 2 stop bits */
DDRD &= ~(1 << 2);
/* Set up the synchronous USART for TINY communications - 8 data bits, even parity, 2 stop bits */
- UBRR1 = (
F_CPU / XPROG_HARDWARE_SPEED
);
+ UBRR1 = (
(F_CPU / 2 / XPROG_HARDWARE_SPEED) - 1
);
UCSR1B = (1 << TXEN1);
UCSR1C = (1 << UMSEL10) | (1 << UPM11) | (1 << USBS1) | (1 << UCSZ11) | (1 << UCSZ10) | (1 << UCPOL1);
UCSR1B = (1 << TXEN1);
UCSR1C = (1 << UMSEL10) | (1 << UPM11) | (1 << USBS1) | (1 << UCSZ11) | (1 << UCSZ10) | (1 << UCPOL1);
@@
-118,7
+118,7
@@
void XPROGTarget_DisableTargetTPI(void)
/* Set all USART lines as input, tristate */
DDRD &= ~((1 << 5) | (1 << 3));
PORTD &= ~((1 << 5) | (1 << 3) | (1 << 2));
/* Set all USART lines as input, tristate */
DDRD &= ~((1 << 5) | (1 << 3));
PORTD &= ~((1 << 5) | (1 << 3) | (1 << 2));
-
+
/* Tristate target /RESET line */
AUX_LINE_DDR &= ~AUX_LINE_MASK;
AUX_LINE_PORT &= ~AUX_LINE_MASK;
/* Tristate target /RESET line */
AUX_LINE_DDR &= ~AUX_LINE_MASK;
AUX_LINE_PORT &= ~AUX_LINE_MASK;