New answers tagged


The Pi does not support multi-master mode. There is no requirement for the I2C clock to be a square wave.


It is standard programming practice to check if includes/initialisers have been used which can easily be done with #ifdef directives. Frankly including wiringPiSetup() in a constructor is poor practice - if you want to use it include ONCE in your main code (as I think Gordon's comment indicates). If you have multiple modules use #ifdef directives in each to ...


The first setup sets the wiringPiSetuped flag which is checked at each invocation. From that it can be seen that it does not matter (any more) if setup is called multiple times. The relevant part of the wiringPi code is as follows. int wiringPiSetup (void) { int fd ; int model, rev, mem, maker, overVolted ; // It's actually a fatal error to call any ...


What you do with the chip-select or chip-enable depends largely on what kind of a device you are communicating with. Some devices, such as programmable LEDs, may not use a chip-select at all. Some devices may allow you to permanently connect the chip-select so that it is always asserted. Of course, without using chip-selects you are generally limited to a ...

Top 50 recent answers are included