Updated versions of ChibiOS/RT, NilRTOS, and FreeRTOS

I don't plan on writing a lot of device libraries.

I just want to understand the problem so I know the the TwiMaster I2C library works and so I can write a "How To" for making existing libraries more RTOS friendly.

The BMP085 is an good example since its ADC is so slow that it needs delay loops.

Other I2C libraries I have tried automatically work better since TwiMaster sleeps while the actual I2C transfer takes place. All you need to do is change the include from Wire.h to TwiMaster.h.

I hope most device libraries improve a lot if you change delay calls to sleep and change the include from Wire to the new library.

Edit: I decided to write new software(bit-bang) I2C libraries since I have my logic analyzer and scope setup for I2C testing.

I clear the PORT bit for sda and scl. I then set the DDR bit to pull either scl or sda low and clear the DDR bit to put scl or sda in high Z mode.

So it acts like an open drain/collector bus. I never drive a line high. I have a 100 kHz and 400 kHz version that runs using any pins for scl sda. The 400 kHz version will only run at full speed on "low address" pins since it uses bit set and bit clear which doesn't work for ports H - L on a Mega.