Change the AVRISP project's RESET LINE makefile tokens to AUX LINE, as it is not...
authorDean Camera <dean@fourwalledcubicle.com>
Tue, 29 Dec 2009 05:18:16 +0000 (05:18 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Tue, 29 Dec 2009 05:18:16 +0000 (05:18 +0000)
Projects/AVRISP-MKII/AVRISP.txt
Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c
Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.h
Projects/AVRISP-MKII/makefile

index 8ea8c8d..9bed59e 100644 (file)
  *  </table>\r
  *\r
  *  <b><sup>1</sup></b> <i>Optional, see \ref SSec_Options section - for USB AVRs with ADC modules only</i> \n\r
- *  <b><sup>2</sup></b> <i>See \ref SSec_Options section</i>\r
+ *  <b><sup>2</sup></b> <i>See AUX line related tokens in the \ref SSec_Options section</i>\r
  *\r
  *  \section Sec_PDI PDI Connections\r
  *  Connections to the device for PDI programming<b><sup>1</sup></b> (when enabled):\r
  *  </table>\r
  *\r
  *  <b><sup>1</sup></b> <i>When XPROG_VIA_HARDWARE_USART is set, the AVR's Tx and Rx become the DATA line when connected together\r
- *                         via a pair of 300 ohm resistors, and the AVR's XCK pin becomes CLOCK.</i>\r
+ *                         via a pair of 300 ohm resistors, and the AVR's XCK pin becomes CLOCK.</i> \n\r
+ *  <b><sup>2</sup></b> <i>See AUX line related tokens in the \ref SSec_Options section</i>\r
  *\r
  *  \section Sec_TPI TPI Connections\r
  *  Connections to the device for TPI programming<b><sup>1</sup></b> (when enabled):\r
  *  </table>\r
  *\r
  *  <b><sup>1</sup></b> <i>When XPROG_VIA_HARDWARE_USART is set, the AVR's Tx and Rx become the DATA line when connected together\r
- *                         via a pair of 300 ohm resistors, and the AVR's XCK pin becomes CLOCK.</i>\r
+ *                         via a pair of 300 ohm resistors, and the AVR's XCK pin becomes CLOCK.</i> \n\r
+ *  <b><sup>2</sup></b> <i>See AUX line related tokens in the \ref SSec_Options section</i>\r
  *\r
  *  \section SSec_Options Project Options\r
  *\r
  *    <td><b>Description:</b></td>\r
  *   </tr>\r
  *   <tr>\r
- *    <td>RESET_LINE_PORT</td>\r
+ *    <td>AUX_LINE_PORT</td>\r
  *    <td>Makefile CDEFS</td>\r
- *    <td>PORT register for the programmer's target RESET line. <i>Ignored when compiled for the XPLAIN board.</i></td>\r
+ *    <td>PORT register for the programmer's AUX target line. The use of this line varies between the programming protocols,\r
+ *        but is generally used for the target's /RESET line. <i>Ignored when compiled for the XPLAIN board.</i></td>\r
  *   </tr>\r
  *   <tr>\r
- *    <td>RESET_LINE_PIN</td>\r
+ *    <td>AUX_LINE_PIN</td>\r
  *    <td>Makefile CDEFS</td>\r
- *    <td>PIN register for the programmer's target RESET line. <i>Ignored when compiled for the XPLAIN board.</i></td>\r
+ *    <td>PIN register for the programmer's AUX target line. The use of this line varies between the programming protocols,\r
+ *        but is generally used for the target's /RESET line. <i>Ignored when compiled for the XPLAIN board.</i></td>\r
  *   </tr>\r
  *   <tr>\r
- *    <td>RESET_LINE_DDR</td>\r
+ *    <td>AUX_LINE_DDR</td>\r
  *    <td>Makefile CDEFS</td>\r
- *    <td>DDR register for the programmer's target RESET line. <i>Ignored when compiled for the XPLAIN board.</i></td>\r
+ *    <td>DDR register for the programmer's AUX target line. The use of this line varies between the programming protocols,\r
+ *        but is generally used for the target's /RESET line. <i>Ignored when compiled for the XPLAIN board.</i></td>\r
  *   </tr>\r
  *   <tr>\r
- *    <td>RESET_LINE_MASK</td>\r
+ *    <td>AUX_LINE_MASK</td>\r
  *    <td>Makefile CDEFS</td>\r
- *    <td>Mask for the programmer's target RESET line on the chosen port. <b>Must not be the AVR's /SS pin</b>, as the\r
- *        target pins are tri-stated when not in use, and low signals on the /SS pin will force SPI slave mode when the\r
- *        pin is configured as an input. When in PDI programming mode, this is the target clock pin.\r
- *        <i>Ignored when compiled for the XPLAIN board.</i></td>\r
+ *    <td>Mask for the programmer's AUX target line. The use of this line varies between the programming protocols,\r
+ *        but is generally used for the target's /RESET line. <b>Must not be the AVR's /SS pin</b>. <i>Ignored when\r
+ *        compiled for the XPLAIN board.</i></td>\r
  *   </tr>\r
  *   <tr>\r
  *    <td>VTARGET_ADC_CHANNEL</td>\r
  *    <td>Makefile CDEFS</td>\r
  *    <td>Define to force the PDI and TPI protocols (when enabled) to use the much faster hardware USART instead of bit-banging\r
  *        to match the official AVRISP pinout. This breaks pinout compatibility with the official AVRISP MKII (and requires \r
- *        seperate ISP and PDI/TPI programming headers) but increases programming speed dramatically.\r
+ *        seperate ISP, PDI, and TPI programming headers) but increases programming speed dramatically.\r
  *        <i>Ignored when compiled for the XPLAIN board.</i></td>  \r
  *   </tr>\r
  *  </table>\r
index ebaf2f3..1bd6887 100644 (file)
@@ -84,15 +84,15 @@ void ISPTarget_ChangeTargetResetLine(const bool ResetTarget)
 {\r
        if (ResetTarget)\r
        {\r
-               RESET_LINE_DDR |= RESET_LINE_MASK;\r
+               AUX_LINE_DDR |= AUX_LINE_MASK;\r
                \r
                if (!(V2Params_GetParameterValue(PARAM_RESET_POLARITY)))\r
-                 RESET_LINE_PORT |= RESET_LINE_MASK;\r
+                 AUX_LINE_PORT |= AUX_LINE_MASK;\r
        }\r
        else\r
        {\r
-               RESET_LINE_DDR  &= ~RESET_LINE_MASK;\r
-               RESET_LINE_PORT &= ~RESET_LINE_MASK;\r
+               AUX_LINE_DDR  &= ~AUX_LINE_MASK;\r
+               AUX_LINE_PORT &= ~AUX_LINE_MASK;\r
        }\r
 }\r
 \r
@@ -144,7 +144,7 @@ uint8_t ISPTarget_WaitForProgComplete(const uint8_t ProgrammingMode, const uint1
 }\r
 \r
 /** Waits until the target has completed the last operation, by continuously polling the device's\r
- *  BUSY flag until it is cleared, or until the \ref TARGET_BUSY_TIMEOUT_MS timeout period has expired.\r
+ *  BUSY flag until it is cleared, or until the command timeout period has expired.\r
  *\r
  *  \return V2 Protocol status \ref STATUS_CMD_OK if the no timeout occurred, \ref STATUS_RDY_BSY_TOUT otherwise\r
  */\r
index def3499..856b489 100644 (file)
@@ -189,8 +189,8 @@ void XPROGTarget_EnableTargetTPI(void)
        IsSending = false;\r
 \r
        /* Set /RESET line low for at least 90ns to enable TPI functionality */\r
-       RESET_LINE_DDR  |= RESET_LINE_MASK;\r
-       RESET_LINE_PORT &= ~RESET_LINE_MASK;\r
+       AUX_LINE_DDR  |=  AUX_LINE_MASK;\r
+       AUX_LINE_PORT &= ~AUX_LINE_MASK;\r
        asm volatile ("NOP"::);\r
        asm volatile ("NOP"::);\r
 \r
@@ -269,8 +269,8 @@ void XPROGTarget_DisableTargetTPI(void)
 #endif\r
 \r
        /* Tristate target /RESET line */\r
-       RESET_LINE_DDR  &= ~RESET_LINE_MASK;\r
-       RESET_LINE_PORT &= ~RESET_LINE_MASK;\r
+       AUX_LINE_DDR  &= ~AUX_LINE_MASK;\r
+       AUX_LINE_PORT &= ~AUX_LINE_MASK;\r
 }\r
 \r
 /** Sends a byte via the USART.\r
index f4c3b7b..3bbf454 100644 (file)
                        #define BITBANG_PDIDATA_PIN      PINB\r
                        #define BITBANG_PDIDATA_MASK     (1 << 3)\r
                        \r
-                       #define BITBANG_PDICLOCK_PORT    RESET_LINE_PORT\r
-                       #define BITBANG_PDICLOCK_DDR     RESET_LINE_DDR\r
-                       #define BITBANG_PDICLOCK_PIN     RESET_LINE_PIN\r
-                       #define BITBANG_PDICLOCK_MASK    RESET_LINE_MASK\r
+                       #define BITBANG_PDICLOCK_PORT    AUX_LINE_PORT\r
+                       #define BITBANG_PDICLOCK_DDR     AUX_LINE_DDR\r
+                       #define BITBANG_PDICLOCK_PIN     AUX_LINE_PIN\r
+                       #define BITBANG_PDICLOCK_MASK    AUX_LINE_MASK\r
 \r
                        #define BITBANG_TPIDATA_PORT     PORTB\r
                        #define BITBANG_TPIDATA_DDR      DDRB\r
index f5bb5b7..a3f1368 100644 (file)
@@ -191,10 +191,10 @@ CSTANDARD = -std=gnu99
 \r
 # Place -D or -U options here for C sources\r
 CDEFS  = -DF_CPU=$(F_CPU)UL -DF_CLOCK=$(F_CLOCK)UL -DBOARD=BOARD_$(BOARD) $(LUFA_OPTS)\r
-CDEFS += -DRESET_LINE_PORT=PORTB\r
-CDEFS += -DRESET_LINE_PIN=PINB\r
-CDEFS += -DRESET_LINE_DDR=DDRB\r
-CDEFS += -DRESET_LINE_MASK="(1 << 4)"\r
+CDEFS += -DAUX_LINE_PORT=PORTB\r
+CDEFS += -DAUX_LINE_PIN=PINB\r
+CDEFS += -DAUX_LINE_DDR=DDRB\r
+CDEFS += -DAUX_LINE_MASK="(1 << 4)"\r
 CDEFS += -DVTARGET_ADC_CHANNEL=2\r
 CDEFS += -DENABLE_ISP_PROTOCOL\r
 CDEFS += -DENABLE_XPROG_PROTOCOL\r