Skip to content

Commit 37ae977

Browse files
committed
Fix Timer2 interrupt flag register - use PIR4 instead of PIR1
1 parent 59112db commit 37ae977

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

pic18f26k83/pwm.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ static w_status_t configure_pps(uint8_t ccp_module, pwm_pin_config_t pin_config)
1313

1414
// Get TRIS register based on port (macros require compile-time constants, so use switch)
1515
switch (pin_config.port) {
16-
case 'A':
17-
tris_reg = &TRISA;
18-
break;
19-
case 'B':
20-
tris_reg = ⧍
21-
break;
22-
case 'C':
23-
tris_reg = &TRISC;
24-
break;
25-
default:
26-
return W_INVALID_PARAM;
16+
case 'A':
17+
tris_reg = &TRISA;
18+
break;
19+
case 'B':
20+
tris_reg = ⧍
21+
break;
22+
case 'C':
23+
tris_reg = &TRISC;
24+
break;
25+
default:
26+
return W_INVALID_PARAM;
2727
}
2828

2929
// Set the pin as output to drive PWM signal directly using the TRIS register

0 commit comments

Comments
 (0)