Added INVERTED_ISP_MISO compile time option to the AVRISP-MKII clone project (thanks to Chuck Rohs).
This commit is contained in:
parent
1e0c3bc69a
commit
eb5b8a32e4
4 changed files with 22 additions and 0 deletions
|
|
@ -104,10 +104,17 @@
|
|||
*/
|
||||
static inline uint8_t ISPTarget_ReceiveByte(void)
|
||||
{
|
||||
#if !defined(INVERTED_ISP_MISO)
|
||||
if (HardwareSPIMode)
|
||||
return SPI_ReceiveByte();
|
||||
else
|
||||
return ISPTarget_TransferSoftSPIByte(0x00);
|
||||
#else
|
||||
if (HardwareSPIMode)
|
||||
return ~SPI_ReceiveByte();
|
||||
else
|
||||
return ~ISPTarget_TransferSoftSPIByte(0x00);
|
||||
#endif
|
||||
}
|
||||
|
||||
/** Sends and receives a byte of ISP data to and from the attached target, using the
|
||||
|
|
@ -119,10 +126,17 @@
|
|||
*/
|
||||
static inline uint8_t ISPTarget_TransferByte(const uint8_t Byte)
|
||||
{
|
||||
#if !defined(INVERTED_ISP_MISO)
|
||||
if (HardwareSPIMode)
|
||||
return SPI_TransferByte(Byte);
|
||||
else
|
||||
return ISPTarget_TransferSoftSPIByte(Byte);
|
||||
#else
|
||||
if (HardwareSPIMode)
|
||||
return ~SPI_TransferByte(Byte);
|
||||
else
|
||||
return ~ISPTarget_TransferSoftSPIByte(Byte);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue