Skip to content

Commit 0981ed4

Browse files
committed
pwm: Move default cases last?
Try to figure out what SDCC fails on when using exhaustive match. Signed-off-by: Tim Crawford <tcrawford@system76.com>
1 parent 2fddf03 commit 0981ed4

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/ec/ite/pwm.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ const enum TachCh board_tachs[NR_TACHS] = {
2222
static void pwm_tach_init(void) {
2323
for (uint8_t i = 0; i < NR_TACHS; i++) {
2424
switch (board_tachs[i]) {
25-
case TACH_CH_0A:
26-
case TACH_CH_1A:
27-
// T0A/T1A always available
28-
// CHSEL default is `A` (0) at init.
29-
break;
30-
3125
case TACH_CH_0B:
3226
GCR5 |= TACH0BEN;
3327
TSWCTLR |= T0CHSEL;
@@ -49,6 +43,12 @@ static void pwm_tach_init(void) {
4943
TSWCTLR2 |= T2CHSEL;
5044
break;
5145
#endif
46+
47+
case TACH_CH_0A:
48+
case TACH_CH_1A:
49+
// T0A/T1A always available
50+
// CHSEL default is `A` (0) at init.
51+
break;
5252
}
5353
}
5454
}

0 commit comments

Comments
 (0)