raspberry-sharp/raspberry-sharp-io

Memory Gpio Bug ?

fchaxel opened this issue · 0 comments

Hi,

In MemoryGpioConnectionDriver.cs

line 205
var pinGroupAddress = gpioAddress + (int)((value ? Interop.BCM2835_GPSET0 : Interop.BCM2835_GPCLR0) + offset);
should be 4_offset
BCM2835_GPSET0 is at 0x 7E20 001C
BCM2835_GPSET1 is at 0x 7E20 0020
or var offset = 4_Math.DivRem((int) pin, 32, out shift); in line 203

line 221
same missing : offset*4

by now not raspberry GPIO up to 31, so no way to detect the problem.

Bye