Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cores/esp32/esp32-hal-ledc.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,3 +226,7 @@ void analogWrite(uint8_t pin, int value) {
ledcWrite(pin_to_channel[pin] - 1, value);
}
}

int8_t analogGetChannel(uint8_t pin) {
return pin_to_channel[pin] - 1;
}
1 change: 1 addition & 0 deletions cores/esp32/esp32-hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ void yield(void);
#include "esp32-hal-cpu.h"

void analogWrite(uint8_t pin, int value);
int8_t analogGetChannel(uint8_t pin);

//returns chip temperature in Celsius
float temperatureRead();
Expand Down