This is an automated email from Gerrit.

"zapb <d...@zapb.de>" just uploaded a new patch set to Gerrit, which you can 
find at https://review.openocd.org/c/openocd/+/9088

-- gerrit

commit ba576178bb9e2851ebcb253cf247523eb0bbfd30
Author: Marc Schink <d...@zapb.de>
Date:   Thu Jul 31 07:48:46 2025 +0000

    adapter: Add 'user0' GPIO signal
    
    Add a user-specific signal 'user0' which can be used for custom
    functionality.
    
    For now, only a single user-specific signal is supported. Additional
    signals 'userX' or a more generic handling can be added in the future.
    Also, the signal state can only be configured during the adapter
    initialization and termination. Commands to change the signal state at
    run-time may be added in the future.
    
    Change-Id: I3f31242f6a693e11565542c3bd4521a245b4ff95
    Signed-off-by: Marc Schink <d...@zapb.de>

diff --git a/doc/openocd.texi b/doc/openocd.texi
index c8aa922db1..0183ecc975 100644
--- a/doc/openocd.texi
+++ b/doc/openocd.texi
@@ -2436,7 +2436,7 @@ dict get [adapter list] ftdi
 @deffn {Config Command} {adapter gpio [ @
     @option{tdo} | @option{tdi} | @option{tms} | @option{tck} | @option{trst} 
| @
     @option{swdio} | @option{swdio_dir} | @option{swclk} | @option{srst} | @
-    @option{led} @
+    @option{led} | @option{user0} @
     [ @
         gpio_number | @option{-chip} chip_number | @
         @option{-active-high} | @option{-active-low} | @
@@ -2456,6 +2456,7 @@ JTAG transport signals
 @item @option{swdio_dir}: optional swdio buffer control signal
 @item @option{srst}: system reset signal
 @item @option{led}: optional activity led
+@item @option{user0}: optional, user-specific signal
 
 @end itemize
 
diff --git a/src/jtag/adapter.c b/src/jtag/adapter.c
index 173e6ee6b2..f0b5750d7c 100644
--- a/src/jtag/adapter.c
+++ b/src/jtag/adapter.c
@@ -65,6 +65,7 @@ static const struct gpio_map {
        [ADAPTER_GPIO_IDX_TRST] = { "trst", ADAPTER_GPIO_DIRECTION_OUTPUT, 
false, true, true },
        [ADAPTER_GPIO_IDX_SRST] = { "srst", ADAPTER_GPIO_DIRECTION_OUTPUT, 
false, true, true },
        [ADAPTER_GPIO_IDX_LED] = { "led", ADAPTER_GPIO_DIRECTION_OUTPUT, true, 
true, true },
+       [ADAPTER_GPIO_IDX_USER0] = { "user0", 
ADAPTER_GPIO_DIRECTION_BIDIRECTIONAL, true, true, true },
 };
 
 static int adapter_config_khz(unsigned int khz);
diff --git a/src/jtag/adapter.h b/src/jtag/adapter.h
index ed58fe5aaa..d76ea5e327 100644
--- a/src/jtag/adapter.h
+++ b/src/jtag/adapter.h
@@ -60,6 +60,7 @@ enum adapter_gpio_config_index {
        ADAPTER_GPIO_IDX_SWCLK,
        ADAPTER_GPIO_IDX_SRST,
        ADAPTER_GPIO_IDX_LED,
+       ADAPTER_GPIO_IDX_USER0,
        ADAPTER_GPIO_IDX_NUM, /* must be the last item */
 };
 

-- 

Reply via email to