diff options
Diffstat (limited to 'Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h')
-rw-r--r-- | Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h b/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h index 057aa7ad1..e183dee0f 100644 --- a/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h +++ b/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h @@ -37,12 +37,19 @@ #define _ISP_TARGET_ /* Includes: */ - #include <avr/io.h> - #include <avr/pgmspace.h> - #include <util/delay.h> - + #include <LUFA/Common/Common.h> #include <LUFA/Drivers/USB/USB.h> - #include <LUFA/Drivers/Peripheral/SPI.h> + + #if defined(ENABLE_ISP_PROTOCOL) || defined(__DOXYGEN__) + #include <LUFA/Drivers/Peripheral/SPI.h> // TODO: FIXME + #endif + + #if (ARCH == ARCH_AVR8) + #include <avr/io.h> + #include <avr/pgmspace.h> + #elif (ARCH == ARCH_UC3) + #include <avr32/io.h> + #endif #include "../V2ProtocolParams.h" @@ -84,6 +91,7 @@ const uint8_t ReadMemCommand); /* Inline Functions: */ + #if defined(ENABLE_ISP_PROTOCOL) || defined(__DOXYGEN__) /** Sends a byte of ISP data to the attached target, using the appropriate SPI hardware or * software routines depending on the selected ISP speed. * @@ -124,6 +132,7 @@ else return ISPTarget_TransferSoftSPIByte(Byte); } + #endif #endif |