Skip to content

Commit 730dd17

Browse files
committed
Apply prettier changes
1 parent 3cd6401 commit 730dd17

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/gpio-pin.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,9 @@ export class GPIOPin {
191191
if (this.pulldownEnabled && this.pullupEnabled) {
192192
// Pull high when high, pull low when low:
193193
return GPIOPinState.InputBusKeeper;
194-
}
195-
else if (this.pulldownEnabled) {
194+
} else if (this.pulldownEnabled) {
196195
return GPIOPinState.InputPullDown;
197-
}
198-
else if (this.pullupEnabled) {
196+
} else if (this.pullupEnabled) {
199197
return GPIOPinState.InputPullUp;
200198
}
201199
return GPIOPinState.Input;

src/peripherals/i2c.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ export class RPI2C extends BasePeripheral implements Peripheral {
440440
// I2C status - read only. bit 0 reflects IC_ENABLE, bit 1,2 relate to i2c slave mode.
441441
return this.enable & 0x1;
442442
case IC_FS_SPKLEN:
443-
return this.spikelen & 0xff
443+
return this.spikelen & 0xff;
444444
case IC_COMP_PARAM_1:
445445
// From the datasheet:
446446
// Note This register is not implemented and therefore reads as 0. If it was implemented it would be a constant read-only
@@ -500,7 +500,7 @@ export class RPI2C extends BasePeripheral implements Peripheral {
500500
case IC_SDA_HOLD:
501501
if (!(value & ENABLE)) {
502502
if (value != 0x1) {
503-
this.warn('Unimplemented write to IC_SDA_HOLD')
503+
this.warn('Unimplemented write to IC_SDA_HOLD');
504504
}
505505
}
506506
return;

src/peripherals/peripheral.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ export class BasePeripheral implements Peripheral {
4242
}
4343

4444
writeUint32(offset: number, value: number) {
45-
this.warn(`Unimplemented peripheral write to 0x${offset.toString(16)}: 0x${value.toString(16)}`);
45+
this.warn(
46+
`Unimplemented peripheral write to 0x${offset.toString(16)}: 0x${value.toString(16)}`,
47+
);
4648
}
4749

4850
writeUint32Atomic(offset: number, value: number, atomicType: number) {

0 commit comments

Comments
 (0)