From 524653effd52d4035f773cab1f7eda6ad4003de2 Mon Sep 17 00:00:00 2001 From: Martin Teichmann <martin.teichmann@gmail.com> Date: Sun, 19 Feb 2023 08:10:02 +0000 Subject: [PATCH] add a command to output the full eeprom content --- ebpfcat/scripts.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ebpfcat/scripts.py b/ebpfcat/scripts.py index 01bf319..09f9efe 100644 --- a/ebpfcat/scripts.py +++ b/ebpfcat/scripts.py @@ -37,6 +37,7 @@ async def info(): parser.add_argument("-s", "--sdo", action="store_true") parser.add_argument("-v", "--values", action="store_true") parser.add_argument("-p", "--pdo", action="store_true") + parser.add_argument("-e", "--eeprom", action="store_true") args = parser.parse_args() ec = EtherCat(args.interface) @@ -68,6 +69,10 @@ async def info(): print(infos[i+1 : i+infos[i]+1].decode("ascii")) i += infos[i] + 1 + if args.eeprom: + for k, v in t.eeprom.items(): + print(f"{k:2}: {v}\n {v.hex()}") + if args.sdo: await t.to_operational(4) ret = await t.read_ODlist() -- GitLab