public void Dispose()
{
// Set all the I2C/BSC1 pins back to original values if changed
if (wasSdaPinSet)
{
SetPinMode((uint)(int)sdaPin, Interop.BCM2835_GPIO_FSEL_INPT); // SDA
}
if (wasSclPinSet)
{
SetPinMode((uint)(int)sclPin, Interop.BCM2835_GPIO_FSEL_INPT); // SCL
}
Interop.munmap(gpioAddress, Interop.BCM2835_BLOCK_SIZE);
Interop.munmap(bscAddress, Interop.BCM2835_BLOCK_SIZE);
}