X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/60fd0ff418566d85224f9841037ba01b77acc0d8..aca7863350509a1f390eda93ac0150378d8cd16c:/Projects/AVRISP-MKII/Lib/V2Protocol.h diff --git a/Projects/AVRISP-MKII/Lib/V2Protocol.h b/Projects/AVRISP-MKII/Lib/V2Protocol.h index 862ea48ef..26c42ab75 100644 --- a/Projects/AVRISP-MKII/Lib/V2Protocol.h +++ b/Projects/AVRISP-MKII/Lib/V2Protocol.h @@ -56,14 +56,22 @@ #endif /* Macros: */ + #if !defined(__DOXYGEN__) + #define _GETADCMUXMASK2(x, y) x ## y + #define _GETADCMUXMASK(x, y) _GETADCMUXMASK2(x, y) + #endif + /** Programmer ID string, returned to the host during the CMD_SIGN_ON command processing */ - #define PROGRAMMER_ID "AVRISP_MK2" + #define PROGRAMMER_ID "AVRISP_MK2" /** Timeout period for each issued command from the host before it is aborted */ - #define COMMAND_TIMEOUT_MS 200 + #define COMMAND_TIMEOUT_MS 200 /** Command timeout counter register, GPIOR for speed */ - #define TimeoutMSRemaining GPIOR0 + #define TimeoutMSRemaining GPIOR0 + + /** MUX mask for the VTARGET ADC channel number */ + #define VTARGET_ADC_CHANNEL_MASK _GETADCMUXMASK(ADC_CHANNEL, VTARGET_ADC_CHANNEL) /* External Variables: */ extern uint32_t CurrentAddress; @@ -74,9 +82,9 @@ void V2Protocol_ProcessCommand(void); #if defined(INCLUDE_FROM_V2PROTOCOL_C) - static void V2Protocol_UnknownCommand(uint8_t V2Command); + static void V2Protocol_UnknownCommand(const uint8_t V2Command); static void V2Protocol_SignOn(void); - static void V2Protocol_GetSetParam(uint8_t V2Command); + static void V2Protocol_GetSetParam(const uint8_t V2Command); static void V2Protocol_ResetProtection(void); static void V2Protocol_LoadAddress(void); #endif