Add options to invert pin reset logic (#97)

This PR adds 'dtr_inverted' and 'rts_inverted' as options for '-A' that
invert the pin logic for autoreset.
This commit is contained in:
hkzlab
2023-11-11 11:23:29 +01:00
committed by GitHub
parent 6e8e73669e
commit a660184520
3 changed files with 13 additions and 5 deletions

View File

@ -263,7 +263,7 @@ def cli():
exclusives.add_argument("-e", "--erase", help="only erase flash memory", action="store_true")
parser.add_argument("-a", "--autoreset", help="cycle power automatically by asserting DTR", action="store_true")
parser.add_argument("-A", "--resetpin", help="pin to hold down when using --autoreset (default: DTR)",
choices=["dtr", "rts"], default="dtr")
choices=["dtr", "rts", "dtr_inverted", "rts_inverted"], default="dtr")
parser.add_argument("-r", "--resetcmd", help="shell command for board power-cycling (instead of DTR assertion)", action="store")
parser.add_argument("-P", "--protocol", help="protocol version (default: auto)",
choices=["stc89", "stc89a", "stc12a", "stc12b", "stc12", "stc15a", "stc15", "stc8", "stc8d", "stc8g", "usb15", "auto"], default="auto")