From 052b31b6223a0c15bccc4b8c8a2aadc0077219ca Mon Sep 17 00:00:00 2001 From: sc-bin <3335447573@qq.com> Date: Tue, 21 May 2024 14:23:53 +0800 Subject: [PATCH] =?UTF-8?q?gpio=E5=91=BD=E4=BB=A4=E7=9A=84=E5=8F=AF?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E6=96=87=E4=BB=B6=E4=B8=AD=E3=80=82=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=B8=80=E4=B8=AA=E8=BE=93=E5=87=BA=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E5=BC=95=E8=84=9Amode=E7=9A=84=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- command/command-gpioc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/command/command-gpioc.c b/command/command-gpioc.c index b0ee562..20c4691 100644 --- a/command/command-gpioc.c +++ b/command/command-gpioc.c @@ -13,6 +13,11 @@ int do_pri_pin_para(int argc, char *argv[]) { print_pin_para(); } +int do_pri_mode_name(int argc, char *argv[]) +{ + int ph_num = atoi(argv[2]); + printf("%s\n", pin_get_mode_name_now(ph_num)); +} int do_pin(int argc, char *argv[]) { if (argc != 3) @@ -131,6 +136,7 @@ struct ops commands[] = { {"do_pri_write_para", do_pri_write_para}, {"do_pri_pin_para", do_pri_pin_para}, {"do_pri_all_gpio_on_ph", do_pri_all_gpio_on_ph}, + {"do_pri_mode_name", do_pri_mode_name}, {"search", do_search}, {"pin", do_pin}, {"pins", do_pins},