diff --git a/src/httpserver/http_fns.c b/src/httpserver/http_fns.c index 33058e4d1..ed61c4b83 100644 --- a/src/httpserver/http_fns.c +++ b/src/httpserver/http_fns.c @@ -1036,16 +1036,24 @@ int http_fn_cfg_pins(http_request_t *request) { } // strcat(outbuf,""); poststr(request,"
"); - for( i = 0; i < GPIO_MAX; i++) { + for(i = 0; i < GPIO_MAX; i++) { int si, ch, ch2; int j; +#if PLATFORM_BL602 + // On BL602, any GPIO can be mapped to one of 5 PWM channels +#else int internalPWMIndex; +#endif si = PIN_GetPinRoleForPinIndex(i); ch = PIN_GetPinChannelForPinIndex(i); ch2 = PIN_GetPinChannel2ForPinIndex(i); +#if PLATFORM_BL602 + // On BL602, any GPIO can be mapped to one of 5 PWM channels +#else // internal pwm index (-1 if this pin is not supported by pwm) internalPWMIndex = PIN_GetPWMIndexForPinIndex(i); +#endif #if PLATFORM_XR809 poststr(request,PIN_GetPinNameAlias(i)); @@ -1055,12 +1063,16 @@ int http_fn_cfg_pins(http_request_t *request) { #endif hprintf128(request, "