Skip to content

Commit 1d418c8

Browse files
authored
fix(adc): error flag always set (#113)
1 parent da3e0fb commit 1d418c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/peripherals/adc.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ export class RPADC extends BasePeripheral implements Peripheral {
186186
value &= 0xfff; // 12 bits
187187
if (this.fcs & FCS_SHIFT) {
188188
value >>= 4;
189-
}
190-
if (this.fcs & FCS_ERR) {
189+
}
190+
if (error && this.fcs & FCS_ERR) {
191191
value |= FIFO_ERR;
192192
}
193193
this.fifo.push(value);

0 commit comments

Comments
 (0)