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

Function timerEnableSendPWM

src/private/IRTimer.hpp:1209–1214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1207#define IR_SEND_PIN 13
1208
1209void timerEnableSendPWM() {
1210 TCD0.CTRLA = 0; // reset enable bit in order to unprotect the other bits
1211 _PROTECTED_WRITE(TCD0.FAULTCTRL, FUSE_CMPAEN_bm); // enable WOA output at pin 13/PA4
1212// _PROTECTED_WRITE(TCD0.FAULTCTRL, FUSE_CMPAEN_bm | FUSE_CMPBEN_bm); // enable WOA + WOB output pins at 13/PA4 + 14/PA5
1213 TCD0.CTRLA = TCD_ENABLE_bm | TCD_CLKSEL_SYSCLK_gc | TCD_CNTPRES_DIV1_gc; // System clock, no prescale, no synchronization prescaler
1214}
1215
1216void enableSendPWMByTimer() {
1217 timerEnableSendPWM();

Callers 1

enableSendPWMByTimerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected