Fix TeensyHID bootloader - change vendor page in the descriptors to match the undocum...
[pub/USBasp.git] / Projects / AVRISP / Lib / V2ProtocolParams.c
index 62149b4..f900d7e 100644 (file)
@@ -67,7 +67,7 @@ static ParameterItem_t ParameterTable[] =
                  .ParamPrivileges = PARAM_PRIV_READ                    },\r
 \r
                { .ParamID          = PARAM_SCK_DURATION,\r
                  .ParamPrivileges = PARAM_PRIV_READ                    },\r
 \r
                { .ParamID          = PARAM_SCK_DURATION,\r
-                 .ParamValue       = (TOTAL_PROGRAMMING_SPEEDS - 1),\r
+                 .ParamValue       = (TOTAL_ISP_PROGRAMMING_SPEEDS - 1),\r
                  .ParamPrivileges = PARAM_PRIV_READ | PARAM_PRIV_WRITE },\r
 \r
                { .ParamID          = PARAM_RESET_POLARITY,\r
                  .ParamPrivileges = PARAM_PRIV_READ | PARAM_PRIV_WRITE },\r
 \r
                { .ParamID          = PARAM_RESET_POLARITY,\r
@@ -88,8 +88,7 @@ static ParameterItem_t ParameterTable[] =
 void V2Params_LoadNonVolatileParamValues(void)\r
 {\r
        /* Target RESET line polarity is a non-volatile value, retrieve current parameter value from EEPROM -\r
 void V2Params_LoadNonVolatileParamValues(void)\r
 {\r
        /* Target RESET line polarity is a non-volatile value, retrieve current parameter value from EEPROM -\r
-        *   NB: Cannot call V2Protocol_SetParameterValue() here, as that will cause another EEPROM write!\r
-        */\r
+        *   NB: Cannot call V2Protocol_SetParameterValue() here, as that will cause another EEPROM write! */\r
        V2Params_GetParamFromTable(PARAM_RESET_POLARITY)->ParamValue = eeprom_read_byte(&EEPROM_Rest_Polarity);\r
 }\r
 \r
        V2Params_GetParamFromTable(PARAM_RESET_POLARITY)->ParamValue = eeprom_read_byte(&EEPROM_Rest_Polarity);\r
 }\r
 \r
@@ -112,7 +111,7 @@ void V2Params_UpdateParamValues(void)
  *\r
  *  \return Privileges for the requested parameter, as a mask of PARAM_PRIV_* masks\r
  */ \r
  *\r
  *  \return Privileges for the requested parameter, as a mask of PARAM_PRIV_* masks\r
  */ \r
-uint8_t V2Params_GetParameterPrivileges(uint8_t ParamID)\r
+uint8_t V2Params_GetParameterPrivileges(const uint8_t ParamID)\r
 {\r
        ParameterItem_t* ParamInfo = V2Params_GetParamFromTable(ParamID);\r
        \r
 {\r
        ParameterItem_t* ParamInfo = V2Params_GetParamFromTable(ParamID);\r
        \r
@@ -128,7 +127,7 @@ uint8_t V2Params_GetParameterPrivileges(uint8_t ParamID)
  *\r
  *  \return Current value of the parameter in the table, or 0 if not found\r
  */ \r
  *\r
  *  \return Current value of the parameter in the table, or 0 if not found\r
  */ \r
-uint8_t V2Params_GetParameterValue(uint8_t ParamID)\r
+uint8_t V2Params_GetParameterValue(const uint8_t ParamID)\r
 {\r
        ParameterItem_t* ParamInfo = V2Params_GetParamFromTable(ParamID);\r
        \r
 {\r
        ParameterItem_t* ParamInfo = V2Params_GetParamFromTable(ParamID);\r
        \r
@@ -141,11 +140,11 @@ uint8_t V2Params_GetParameterValue(uint8_t ParamID)
 /** Sets the value for a given parameter in the parameter table.\r
  *\r
  *  \param[in] ParamID  Parameter ID whose value is to be set in the table\r
 /** Sets the value for a given parameter in the parameter table.\r
  *\r
  *  \param[in] ParamID  Parameter ID whose value is to be set in the table\r
- *  \param[in] Value  New value to set the parameter to\r
+ *  \param[in] Value    New value to set the parameter to\r
  *\r
  *  \return Pointer to the associated parameter information from the parameter table if found, NULL otherwise\r
  */\r
  *\r
  *  \return Pointer to the associated parameter information from the parameter table if found, NULL otherwise\r
  */\r
-void V2Params_SetParameterValue(uint8_t ParamID, uint8_t Value)\r
+void V2Params_SetParameterValue(const uint8_t ParamID, const uint8_t Value)\r
 {\r
        ParameterItem_t* ParamInfo = V2Params_GetParamFromTable(ParamID);\r
 \r
 {\r
        ParameterItem_t* ParamInfo = V2Params_GetParamFromTable(ParamID);\r
 \r
@@ -166,7 +165,7 @@ void V2Params_SetParameterValue(uint8_t ParamID, uint8_t Value)
  *\r
  *  \return Pointer to the associated parameter information from the parameter table if found, NULL otherwise\r
  */\r
  *\r
  *  \return Pointer to the associated parameter information from the parameter table if found, NULL otherwise\r
  */\r
-static ParameterItem_t* V2Params_GetParamFromTable(uint8_t ParamID)\r
+static ParameterItem_t* V2Params_GetParamFromTable(const uint8_t ParamID)\r
 {\r
        /* Find the parameter in the parameter table if present */\r
        for (uint8_t TableIndex = 0; TableIndex < (sizeof(ParameterTable) / sizeof(ParameterTable[0])); TableIndex++)\r
 {\r
        /* Find the parameter in the parameter table if present */\r
        for (uint8_t TableIndex = 0; TableIndex < (sizeof(ParameterTable) / sizeof(ParameterTable[0])); TableIndex++)\r