aboutsummaryrefslogtreecommitdiff
path: root/Projects/AVRISP-MKII/Lib/V2Protocol.h
diff options
context:
space:
mode:
authorDean Camera <[email protected]>2010-05-02 05:16:34 +0000
committerDean Camera <[email protected]>2010-05-02 05:16:34 +0000
commit3d28d53c3e2ae529933283e63a8b05f2ab1ce2be (patch)
treef395bb297884750d54614b941f2bda0727cc2796 /Projects/AVRISP-MKII/Lib/V2Protocol.h
parent9a1560dc050f79fd189838a87ce623e79ff48677 (diff)
downloadqmk_firmware-3d28d53c3e2ae529933283e63a8b05f2ab1ce2be.tar.gz
qmk_firmware-3d28d53c3e2ae529933283e63a8b05f2ab1ce2be.zip
Change AVRISP project's timeout to be interrupt based again, but make the interrupt itself interruptable and use a seperate assembly file to hand-optimize the ISR code.
Removed the cast to uint16_t on the set baud rate in the USBtoSerial project, so that the higher >1M baud rates can be selected (thanks to Steffan).
Diffstat (limited to 'Projects/AVRISP-MKII/Lib/V2Protocol.h')
-rw-r--r--Projects/AVRISP-MKII/Lib/V2Protocol.h44
1 files changed, 25 insertions, 19 deletions
diff --git a/Projects/AVRISP-MKII/Lib/V2Protocol.h b/Projects/AVRISP-MKII/Lib/V2Protocol.h
index 43dee1e77c..7ad896da8a 100644
--- a/Projects/AVRISP-MKII/Lib/V2Protocol.h
+++ b/Projects/AVRISP-MKII/Lib/V2Protocol.h
@@ -37,14 +37,16 @@
#define _V2_PROTOCOL_
/* Includes: */
- #include <LUFA/Drivers/USB/USB.h>
- #include <LUFA/Drivers/Peripheral/SPI.h>
-
- #include "../Descriptors.h"
- #include "V2ProtocolConstants.h"
- #include "V2ProtocolParams.h"
- #include "ISP/ISPProtocol.h"
- #include "XPROG/XPROGProtocol.h"
+ #if !defined(__ASSEMBLER__)
+ #include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Drivers/Peripheral/SPI.h>
+
+ #include "../Descriptors.h"
+ #include "V2ProtocolConstants.h"
+ #include "V2ProtocolParams.h"
+ #include "ISP/ISPProtocol.h"
+ #include "XPROG/XPROGProtocol.h"
+ #endif
/* Preprocessor Checks: */
#if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))
@@ -80,19 +82,23 @@
#endif
/* External Variables: */
- extern uint32_t CurrentAddress;
- extern bool MustSetAddress;
+ #if !defined(__ASSEMBLER__)
+ extern uint32_t CurrentAddress;
+ extern bool MustSetAddress;
+ #endif
/* Function Prototypes: */
- void V2Protocol_Init(void);
- void V2Protocol_ProcessCommand(void);
-
- #if defined(INCLUDE_FROM_V2PROTOCOL_C)
- static void V2Protocol_UnknownCommand(const uint8_t V2Command);
- static void V2Protocol_SignOn(void);
- static void V2Protocol_GetSetParam(const uint8_t V2Command);
- static void V2Protocol_ResetProtection(void);
- static void V2Protocol_LoadAddress(void);
+ #if !defined(__ASSEMBLER__)
+ void V2Protocol_Init(void);
+ void V2Protocol_ProcessCommand(void);
+
+ #if defined(INCLUDE_FROM_V2PROTOCOL_C)
+ static void V2Protocol_UnknownCommand(const uint8_t V2Command);
+ static void V2Protocol_SignOn(void);
+ static void V2Protocol_GetSetParam(const uint8_t V2Command);
+ static void V2Protocol_ResetProtection(void);
+ static void V2Protocol_LoadAddress(void);
+ #endif
#endif
#endif