projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CI: Don't use multiple jobs when building under CI, so that output is consistent.
[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
75b43f0
..
2a75e4b
100644
(file)
--- a/
Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
+++ b/
Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
@@
-1,13
+1,13
@@
/*
LUFA Library
/*
LUFA Library
- Copyright (C) Dean Camera, 201
4
.
+ Copyright (C) Dean Camera, 201
8
.
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
- Copyright 201
4
Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 201
8
Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
@@
-39,7
+39,7
@@
#if defined(ENABLE_XPROG_PROTOCOL) || defined(__DOXYGEN__)
/** Flag to indicate if the USART is currently in Tx or Rx mode. */
#if defined(ENABLE_XPROG_PROTOCOL) || defined(__DOXYGEN__)
/** Flag to indicate if the USART is currently in Tx or Rx mode. */
-bool IsSending;
+
static
bool IsSending;
/** Enables the target's PDI interface, holding the target in reset until PDI mode is exited. */
void XPROGTarget_EnableTargetPDI(void)
/** Enables the target's PDI interface, holding the target in reset until PDI mode is exited. */
void XPROGTarget_EnableTargetPDI(void)
@@
-50,10
+50,15
@@
void XPROGTarget_EnableTargetPDI(void)
DDRD |= (1 << 5) | (1 << 3);
DDRD &= ~(1 << 2);
DDRD |= (1 << 5) | (1 << 3);
DDRD &= ~(1 << 2);
- /* Set DATA line high for at least 90ns to disable /RESET functionality */
- PORTD |= (1 << 3);
+ /* Set Tx (PDI CLOCK) high, DATA line low for at least 90ns to disable /RESET functionality */
+ PORTD |= (1 << 5);
+ PORTD &= ~(1 << 3);
_delay_us(100);
_delay_us(100);
+ /* Set DATA line high (enables PDI interface after 16 PDI CLK cycles) */
+ PORTD |= (1 << 3);
+ _delay_us(20);
+
/* Set up the synchronous USART for XMEGA communications - 8 data bits, even parity, 2 stop bits */
UBRR1 = ((F_CPU / 2 / XPROG_HARDWARE_SPEED) - 1);
UCSR1B = (1 << TXEN1);
/* Set up the synchronous USART for XMEGA communications - 8 data bits, even parity, 2 stop bits */
UBRR1 = ((F_CPU / 2 / XPROG_HARDWARE_SPEED) - 1);
UCSR1B = (1 << TXEN1);