X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/a5adbae652bcf5382ef34d71da4d11de15b482a6..05fcf7e2a79bebb978d4aeaef26b12f70c6826f8:/Projects/AVRISP/Lib/V2Protocol.c diff --git a/Projects/AVRISP/Lib/V2Protocol.c b/Projects/AVRISP/Lib/V2Protocol.c index 24f208046..eae2e830f 100644 --- a/Projects/AVRISP/Lib/V2Protocol.c +++ b/Projects/AVRISP/Lib/V2Protocol.c @@ -50,7 +50,9 @@ bool MustSetAddress; void V2Protocol_ProcessCommand(void) { uint8_t V2Command = Endpoint_Read_Byte(); - + + Serial_TxByte(V2Command); + switch (V2Command) { case CMD_SIGN_ON: @@ -66,7 +68,7 @@ void V2Protocol_ProcessCommand(void) case CMD_RESET_PROTECTION: V2Protocol_ResetProtection(); break; -#if defined(ENABLE_SPI_PROTOCOL) +#if defined(ENABLE_ISP_PROTOCOL) case CMD_ENTER_PROGMODE_ISP: ISPProtocol_EnterISPMode(); break; @@ -98,7 +100,7 @@ void V2Protocol_ProcessCommand(void) ISPProtocol_SPIMulti(); break; #endif -#if defined(ENABLE_XPROG_PROTOCOL) +#if defined(ENABLE_PDI_PROTOCOL) case CMD_XPROG_SETMODE: PDIProtocol_XPROG_SetMode(); break; @@ -106,6 +108,9 @@ void V2Protocol_ProcessCommand(void) PDIProtocol_XPROG_Command(); break; #endif +#if defined(ENABLE_TPI_PROTOCOL) + // TODO +#endif default: V2Protocol_UnknownCommand(V2Command); break; @@ -120,7 +125,7 @@ void V2Protocol_ProcessCommand(void) * * \param[in] V2Command Issued V2 Protocol command byte from the host */ -static void V2Protocol_UnknownCommand(uint8_t V2Command) +static void V2Protocol_UnknownCommand(const uint8_t V2Command) { /* Discard all incoming data */ while (Endpoint_BytesInEndpoint() == AVRISP_DATA_EPSIZE) @@ -169,7 +174,7 @@ static void V2Protocol_ResetProtection(void) * * \param[in] V2Command Issued V2 Protocol command byte from the host */ -static void V2Protocol_GetSetParam(uint8_t V2Command) +static void V2Protocol_GetSetParam(const uint8_t V2Command) { uint8_t ParamID = Endpoint_Read_Byte(); uint8_t ParamValue;