Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cc8f4e5

Browse filesBrowse files
VasilyRakcheSuGliderP-R-O-C-H-Y
authored
Allow access to the PWM channel assigned to the Pin. Opportunity to change PWM configurations (espressif#6992)
* Get channel assigned to the pin with analogWrite * Respect coding standard in LEDC source file Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com> Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
1 parent e55a1be commit cc8f4e5
Copy full SHA for cc8f4e5

File tree

2 files changed

+5
-0
lines changed
Filter options

2 files changed

+5
-0
lines changed

‎cores/esp32/esp32-hal-ledc.c

Copy file name to clipboardExpand all lines: cores/esp32/esp32-hal-ledc.c
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,3 +226,7 @@ void analogWrite(uint8_t pin, int value) {
226226
ledcWrite(pin_to_channel[pin] - 1, value);
227227
}
228228
}
229+
230+
int8_t analogGetChannel(uint8_t pin) {
231+
return pin_to_channel[pin] - 1;
232+
}

‎cores/esp32/esp32-hal.h

Copy file name to clipboardExpand all lines: cores/esp32/esp32-hal.h
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ void yield(void);
9292
#include "esp32-hal-cpu.h"
9393

9494
void analogWrite(uint8_t pin, int value);
95+
int8_t analogGetChannel(uint8_t pin);
9596

9697
//returns chip temperature in Celsius
9798
float temperatureRead();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.