Skip to content

Commit

Permalink
gpio命令的可执行文件中。增加一个输出当前引脚mode的函数
Browse files Browse the repository at this point in the history
  • Loading branch information
sc-bin committed May 21, 2024
1 parent e195acf commit 052b31b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions command/command-gpioc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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},
Expand Down

0 comments on commit 052b31b

Please sign in to comment.