MCPcopy Create free account
hub / github.com/Arduino-IRremote/Arduino-IRremote / tone

Function tone

examples/SendDemo/PinDefinitionsAndMore.h:219–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217#if ESP_ARDUINO_VERSION <= ESP_ARDUINO_VERSION_VAL(2, 0, 2)
218#define TONE_LEDC_CHANNEL 1 // Using channel 1 makes tone() independent of receiving timer -> No need to stop receiving timer.
219void tone(uint8_t aPinNumber, unsigned int aFrequency){
220 ledcAttachPin(aPinNumber, TONE_LEDC_CHANNEL);
221 ledcWriteTone(TONE_LEDC_CHANNEL, aFrequency);
222}
223void tone(uint8_t aPinNumber, unsigned int aFrequency, unsigned long aDuration){
224 ledcAttachPin(aPinNumber, TONE_LEDC_CHANNEL);
225 ledcWriteTone(TONE_LEDC_CHANNEL, aFrequency);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected