Skip to content

Commit bd3eb2d

Browse files
Inverted the 'Device Already Open' check so it will work as designed. (#2095)
As per issue #2094 Co-authored-by: Gido Nijenhuis <[email protected]>
1 parent 30f0875 commit bd3eb2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/devices/Ft232H/Ft232HI2cBus.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public Ft232HI2cBus(Ftx232HDevice deviceInformation)
3737
/// <inheritdoc/>
3838
public override I2cDevice CreateDevice(int deviceAddress)
3939
{
40-
if (!_usedAddresses.ContainsKey(deviceAddress))
40+
if (_usedAddresses.ContainsKey(deviceAddress))
4141
{
4242
throw new ArgumentException($"Device with address 0x{deviceAddress,0X2} is already open.", nameof(deviceAddress));
4343
}

0 commit comments

Comments
 (0)