diff --git a/src/hal/bk7231/hal_pins_bk7231.c b/src/hal/bk7231/hal_pins_bk7231.c index 13d956442..3de622d4b 100644 --- a/src/hal/bk7231/hal_pins_bk7231.c +++ b/src/hal/bk7231/hal_pins_bk7231.c @@ -34,6 +34,27 @@ int PIN_GetPWMIndexForPinIndex(int pin) { } const char *HAL_PIN_GetPinNameAlias(int index) { + // some of pins have special roles + if (index == 23) + return "ADC3"; + if (index == 26) + return "PWM5"; + if (index == 24) + return "PWM4"; + if (index == 6) + return "PWM0"; + if (index == 0) + return "TXD2"; + if (index == 1) + return "RXD2"; + if (index == 9) + return "PWM3"; + if (index == 8) + return "PWM2"; + if (index == 10) + return "RXD1"; + if (index == 11) + return "TXD1"; return 0; } diff --git a/src/httpserver/http_fns.c b/src/httpserver/http_fns.c index ef951a4df..daeca5ffe 100644 --- a/src/httpserver/http_fns.c +++ b/src/httpserver/http_fns.c @@ -2324,8 +2324,12 @@ int http_fn_cfg_pins(http_request_t* request) { alias = HAL_PIN_GetPinNameAlias(i); poststr(request, "