Hi Arjan, first my thanks for your prompt response.
Using bcm2835_i2c_set_baudrate I was able to change the i2c clock speed significantly down from 100kHz to 10,000Hz, 5,000 or 1000Hz IIRC but no lower. The signal was much cleaner and this was awesome.
If you don't mind I have a few more questions.
When you say overlays aren't used, you mean the dtoverlay style items in the raspberry pi's /boot/config.txt?
For me this library worked with dtparam=i2c_arm=on present or missing in my /boot/config.txt, is this an overlay? Are you saying this may interfere with this library's operation?
Or are you referring to things specifically called an overlay like dtoverlay=i2c1 in /boot/config.txt instead?
I'd like to be able to use multiple GPIO pins, two more pairs of them in fact, to have 2 more I2C buses.
I am ignorant in this area, however my guess as to how is as follows:
Looking through bcm2835.c, the bcm2835_init function reads /proc/device-tree/soc/ranges to find a base address and size of the peripherals block. Then it goes and mmap's this and sets all the pointers, things like bcm2835_bsc1 that is used as the address that pointers are offset from in i2c functions. Therefore, in order to use some different pins, could I alter the initial address/size read from /proc/device-tree/soc/ranges to point to other pins? If so or if not, could you point me to any documentation that describes how to do this/what these addresses should be?
Perhaps I've got it completely wrong, or it's not possible, if so please let me know.
Any advice appreciated.
Thanks for your time, I'm very grateful.
Justin