diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-05-02 05:16:34 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-05-02 05:16:34 +0000 |
| commit | 0a6f0311e09196b8d76fd7f908409a6769957e6d (patch) | |
| tree | f395bb297884750d54614b941f2bda0727cc2796 /Projects/AVRISP-MKII/Lib/V2Protocol.h | |
| parent | 4ea2a22f687f65e927f1d74a191795116ac746e4 (diff) | |
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).
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1227 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Projects/AVRISP-MKII/Lib/V2Protocol.h')
| -rw-r--r-- | Projects/AVRISP-MKII/Lib/V2Protocol.h | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/Projects/AVRISP-MKII/Lib/V2Protocol.h b/Projects/AVRISP-MKII/Lib/V2Protocol.h index 43dee1e7..7ad896da 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
|
