Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

additional check for turnOffPWM#77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
bridystone wants to merge2 commits intoarduino:master
base:master
Choose a base branch
Loading
frombridystone:master
Open
Changes fromall 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
12 changes: 12 additions & 0 deletionscores/arduino/wiring_digital.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -103,6 +103,10 @@ static void turnOffPWM(uint8_t pin)

/* TCA0 */
case TIMERA0:
// check, if TCA is set to Port B (default megaavr-PWM ports)
// see variants/nona4809/variant.c line 13
if (!(PORTMUX_TCAROUTEA == PORTMUX_TCA0_PORTB_gc))
break;
/* Bit position will give output channel */
bit_pos = digitalPinToBitPosition(pin);

Expand All@@ -113,7 +117,15 @@ static void turnOffPWM(uint8_t pin)

/* TCB - only one output */
case TIMERB0:
// check, if TCB0 is set to alternate mode PF4 (Pin D6) (default megaavr-PWM)
// see variants/nona4809/variant.c line 31
if ((pin == 6) && ((PORTMUX_TCBROUTEA & PORTMUX_TCB0_bm) != PORTMUX_TCB0_bm))
break;
case TIMERB1:
// check, if TCB1 is set to alternate mode PF5 (Pin D3) (default megaavr-PWM)
// see variants/nona4809/variant.c line 36
if ((pin == 3) && ((PORTMUX_TCBROUTEA & PORTMUX_TCB1_bm) != PORTMUX_TCB1_bm))
break;
case TIMERB2:
case TIMERB3:

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp