projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CI: Build on Arch (bleeding-ege) and Ubuntu (stable) AVR-GCC toolchains.
[pub/USBasp.git]
/
Projects
/
AVRISP-MKII
/
Lib
/
ISP
/
ISPTarget.h
diff --git
a/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h
b/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h
index
3108b16
..
c23bf25
100644
(file)
--- a/
Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h
+++ b/
Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h
@@
-1,13
+1,13
@@
/*
LUFA Library
/*
LUFA Library
- Copyright (C) Dean Camera, 201
2
.
+ 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
2
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
@@
-47,7
+47,7
@@
#include "../V2Protocol.h"
#include "ISPProtocol.h"
#include "Config/AppConfig.h"
#include "../V2Protocol.h"
#include "ISPProtocol.h"
#include "Config/AppConfig.h"
-
+
/* Preprocessor Checks: */
#if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))
#undef ENABLE_ISP_PROTOCOL
/* Preprocessor Checks: */
#if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))
#undef ENABLE_ISP_PROTOCOL
@@
-106,16
+106,17
@@
*/
static inline uint8_t ISPTarget_ReceiveByte(void)
{
*/
static inline uint8_t ISPTarget_ReceiveByte(void)
{
- #if !defined(INVERTED_ISP_MISO)
+ uint8_t ReceivedByte;
+
if (HardwareSPIMode)
if (HardwareSPIMode)
-
return
SPI_ReceiveByte();
+
ReceivedByte =
SPI_ReceiveByte();
else
else
- return ISPTarget_TransferSoftSPIByte(0x00);
+ ReceivedByte = ISPTarget_TransferSoftSPIByte(0x00);
+
+ #if defined(INVERTED_ISP_MISO)
+ return ~ReceivedByte;
#else
#else
- if (HardwareSPIMode)
- return ~SPI_ReceiveByte();
- else
- return ~ISPTarget_TransferSoftSPIByte(0x00);
+ return ReceivedByte;
#endif
}
#endif
}
@@
-128,16
+129,17
@@
*/
static inline uint8_t ISPTarget_TransferByte(const uint8_t Byte)
{
*/
static inline uint8_t ISPTarget_TransferByte(const uint8_t Byte)
{
- #if !defined(INVERTED_ISP_MISO)
+ uint8_t ReceivedByte;
+
if (HardwareSPIMode)
if (HardwareSPIMode)
-
return
SPI_TransferByte(Byte);
+
ReceivedByte =
SPI_TransferByte(Byte);
else
else
- return ISPTarget_TransferSoftSPIByte(Byte);
+ ReceivedByte = ISPTarget_TransferSoftSPIByte(Byte);
+
+ #if defined(INVERTED_ISP_MISO)
+ return ~ReceivedByte;
#else
#else
- if (HardwareSPIMode)
- return ~SPI_TransferByte(Byte);
- else
- return ~ISPTarget_TransferSoftSPIByte(Byte);
+ return ReceivedByte;
#endif
}
#endif
}