File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -191,11 +191,9 @@ export class GPIOPin {
191
191
if ( this . pulldownEnabled && this . pullupEnabled ) {
192
192
// Pull high when high, pull low when low:
193
193
return GPIOPinState . InputBusKeeper ;
194
- }
195
- else if ( this . pulldownEnabled ) {
194
+ } else if ( this . pulldownEnabled ) {
196
195
return GPIOPinState . InputPullDown ;
197
- }
198
- else if ( this . pullupEnabled ) {
196
+ } else if ( this . pullupEnabled ) {
199
197
return GPIOPinState . InputPullUp ;
200
198
}
201
199
return GPIOPinState . Input ;
Original file line number Diff line number Diff line change @@ -440,7 +440,7 @@ export class RPI2C extends BasePeripheral implements Peripheral {
440
440
// I2C status - read only. bit 0 reflects IC_ENABLE, bit 1,2 relate to i2c slave mode.
441
441
return this . enable & 0x1 ;
442
442
case IC_FS_SPKLEN :
443
- return this . spikelen & 0xff
443
+ return this . spikelen & 0xff ;
444
444
case IC_COMP_PARAM_1 :
445
445
// From the datasheet:
446
446
// 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 {
500
500
case IC_SDA_HOLD :
501
501
if ( ! ( value & ENABLE ) ) {
502
502
if ( value != 0x1 ) {
503
- this . warn ( 'Unimplemented write to IC_SDA_HOLD' )
503
+ this . warn ( 'Unimplemented write to IC_SDA_HOLD' ) ;
504
504
}
505
505
}
506
506
return ;
Original file line number Diff line number Diff line change @@ -42,7 +42,9 @@ export class BasePeripheral implements Peripheral {
42
42
}
43
43
44
44
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
+ ) ;
46
48
}
47
49
48
50
writeUint32Atomic ( offset : number , value : number , atomicType : number ) {
You can’t perform that action at this time.
0 commit comments