I am trying to set up a custom driver to do some experimentation with a proprietary device and access the firmware, which is possible to do via I2C but it needs to be set up in a specific way. Without doing this, it does not work. If it matters, the device is an Ilitek I2511 touchpad controller. I am more of a Windows user so I don't have a ton of Ubuntu experience, but I know enough to be able to mostly figure it out. I found the driver files and a PDF guide, but the guide is poorly written in broken english and is hard to understand.
Here is the guide & driver I am talking about
And here is the program I am trying to compile & run
Currently the I2C connection to the device doesn't work at all, and the USB connection works but when I run the tool with the ReadFlash command, I get a segmentation fault. I am guessing this is because I do not have the drivers set up properly, but I am not really sure what the proper way to do it for this use case is.
I am following the guide on pages 5-6.