Code style fixes to the AVRISP-MKII Clone programmer project.
This commit is contained in:
parent
7eaf3d18d2
commit
f51c87b916
7 changed files with 58 additions and 37 deletions
|
|
@ -134,7 +134,7 @@ ISR(TIMER1_COMPA_vect, ISR_BLOCK)
|
|||
TCCR1B = 0;
|
||||
TIFR1 = (1 << OCF1A);
|
||||
}
|
||||
|
||||
|
||||
if (PINB & (1 << 3))
|
||||
SoftSPI_Data |= (1 << 0);
|
||||
}
|
||||
|
|
@ -309,7 +309,7 @@ void ISPTarget_LoadExtendedAddress(void)
|
|||
{
|
||||
ISPTarget_SendByte(LOAD_EXTENDED_ADDRESS_CMD);
|
||||
ISPTarget_SendByte(0x00);
|
||||
ISPTarget_SendByte((CurrentAddress & 0x00FF0000) >> 16);
|
||||
ISPTarget_SendByte(CurrentAddress >> 16);
|
||||
ISPTarget_SendByte(0x00);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
#include "../V2Protocol.h"
|
||||
#include "ISPProtocol.h"
|
||||
#include "Config/AppConfig.h"
|
||||
|
||||
|
||||
/* 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)
|
||||
{
|
||||
#if !defined(INVERTED_ISP_MISO)
|
||||
uint8_t ReceivedByte;
|
||||
|
||||
if (HardwareSPIMode)
|
||||
return SPI_ReceiveByte();
|
||||
ReceivedByte = SPI_ReceiveByte();
|
||||
else
|
||||
return ISPTarget_TransferSoftSPIByte(0x00);
|
||||
ReceivedByte = ISPTarget_TransferSoftSPIByte(0x00);
|
||||
|
||||
#if defined(INVERTED_ISP_MISO)
|
||||
return ~ReceivedByte;
|
||||
#else
|
||||
if (HardwareSPIMode)
|
||||
return ~SPI_ReceiveByte();
|
||||
else
|
||||
return ~ISPTarget_TransferSoftSPIByte(0x00);
|
||||
return ReceivedByte;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -128,16 +129,17 @@
|
|||
*/
|
||||
static inline uint8_t ISPTarget_TransferByte(const uint8_t Byte)
|
||||
{
|
||||
#if !defined(INVERTED_ISP_MISO)
|
||||
uint8_t ReceivedByte;
|
||||
|
||||
if (HardwareSPIMode)
|
||||
return SPI_TransferByte(Byte);
|
||||
ReceivedByte = SPI_TransferByte(Byte);
|
||||
else
|
||||
return ISPTarget_TransferSoftSPIByte(Byte);
|
||||
ReceivedByte = ISPTarget_TransferSoftSPIByte(Byte);
|
||||
|
||||
#if defined(INVERTED_ISP_MISO)
|
||||
return ~ReceivedByte;
|
||||
#else
|
||||
if (HardwareSPIMode)
|
||||
return ~SPI_TransferByte(Byte);
|
||||
else
|
||||
return ~ISPTarget_TransferSoftSPIByte(Byte);
|
||||
return ReceivedByte;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue