diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-08-19 08:29:08 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-08-19 08:29:08 +0000 |
commit | fa8beef82d1340a69390d4b11ca785ee016789c5 (patch) | |
tree | 1cfb23637c6e2d1c418ef2645b1ec394dff4cd48 /Projects/Unfinished/AVRISP/Lib/V2Protocol.h | |
parent | 32cc2b8d4d9f2c66a9dbfa859f476c077592e2cf (diff) | |
download | lufa-fa8beef82d1340a69390d4b11ca785ee016789c5.tar.gz lufa-fa8beef82d1340a69390d4b11ca785ee016789c5.tar.bz2 lufa-fa8beef82d1340a69390d4b11ca785ee016789c5.zip |
Moved out the handling of V2 Protocol parameters to a seperate set of files. Added parameter privellages, so that an error can be returned to the host when trying to perform a get/set value action on a parameter without the correct privellages.
Diffstat (limited to 'Projects/Unfinished/AVRISP/Lib/V2Protocol.h')
-rw-r--r-- | Projects/Unfinished/AVRISP/Lib/V2Protocol.h | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/Projects/Unfinished/AVRISP/Lib/V2Protocol.h b/Projects/Unfinished/AVRISP/Lib/V2Protocol.h index 7b9f1b12f..9f6b83b47 100644 --- a/Projects/Unfinished/AVRISP/Lib/V2Protocol.h +++ b/Projects/Unfinished/AVRISP/Lib/V2Protocol.h @@ -45,30 +45,22 @@ #include <LUFA/Drivers/Peripheral/SPI.h>
#include "../Descriptors.h" - #include "V2ProtocolConstants.h" + #include "V2ProtocolConstants.h"
+ #include "V2ProtocolParams.h" /* Macros: */ #define PROGRAMMER_ID "AVRISP_MK2" - #define PROGRAMMER_ID_LEN (sizeof(PROGRAMMER_ID) - 1)
-
- /* Type Defines: */
- typedef struct
- {
- uint8_t ParameterID;
- uint8_t ParameterValue;
- } ParameterItem_t; + #define PROGRAMMER_ID_LEN (sizeof(PROGRAMMER_ID) - 1) +
+ #define MAX_SPI_SETTINGS 7
/* Function Prototypes: */
- void V2Protocol_Init(void);
void V2Protocol_ProcessCommand(void);
#if defined(INCLUDE_FROM_V2PROTOCOL_C)
static void V2Protocol_ReconfigureSPI(void);
static void V2Protocol_ChangeTargetResetLine(bool ResetTarget);
- static uint8_t V2Protocol_GetParameter(uint8_t ParamID);
- static void V2Protocol_SetParameter(uint8_t ParamID, uint8_t Value);
-
static void V2Protocol_Command_Unknown(uint8_t V2Command);
static void V2Protocol_Command_SignOn(void);
static void V2Protocol_Command_GetSetParam(uint8_t V2Command);
|