<div dir="ltr">Alan - thanks!.  This is exactly the info I was looking for!  I will review and try it out.  I was going to start looking at the LPS25H humidity sensor first.</div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 24, 2016 at 12:40 PM, Alan Cudmore <span dir="ltr"><<a href="mailto:alan.cudmore@gmail.com" target="_blank">alan.cudmore@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Here is the i2c.c patch to make the sense hat display more reliable. <div>Without this delay, it will randomly hang when writing out a frame of data to the display. </div><div><br></div><div>I’m sure this is not the right solution, just a temporary fix for my driver. I have been doing all of this with the original Pi, so it may not work the same with a Pi2. </div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Alan</div><div><br></div><div></div></font></span></div><br><div style="word-wrap:break-word"><div></div><div><div><blockquote type="cite"><div>On Dec 24, 2016, at 10:24 AM, Alan Cudmore <<a href="mailto:alan.cudmore@gmail.com" target="_blank">alan.cudmore@gmail.com</a>> wrote:</div><br class="m_971636130881660304Apple-interchange-newline"><div><div style="word-wrap:break-word">Hi Scott,<div>The raspberry pi BSP uses the newer Linux I2C API, which is used in a few BSPs. </div><div>I have been able to use the I2C API for a few devices on the Pi, and I have been slowly working on trying to support the sense hat. </div><div>I have a sense hat display driver in the “dpi-drivers” branch of my RKI project:</div><div><a href="https://github.com/alanc98/rki/tree/rpi-drivers" target="_blank">https://github.com/alanc98/<wbr>rki/tree/rpi-drivers</a></div><div><br></div><div>Sense hat display driver in action here:</div><div><a href="https://www.youtube.com/watch?v=cHYxj6aW4jI" target="_blank">https://www.youtube.com/watch?<wbr>v=cHYxj6aW4jI</a></div><div><br></div><div>The code to drive that demo is here:</div><div><a href="https://github.com/alanc98/rki/blob/rpi-drivers/sensehatdisplay_cmd.c" target="_blank">https://github.com/alanc98/<wbr>rki/blob/rpi-drivers/<wbr>sensehatdisplay_cmd.c</a></div><div><br></div><div>The project is setup so you can add and test drivers without adding them to the RTEMS tree. </div><div><br></div><div>The sense hat display driver does bring out a bug ( maybe a race condition ? ) in the I2C Pi BSP code. I had to add a delay in the Pi I2C support code to make the sense hat display work correctly. I can’t seem to locate that patch right now, I’ll have to find it. </div><div><br></div><div>I was starting to work on the HTS221 Temp/Humidity driver next.  </div><div>It would be great to get someone else helping with the rest of the drivers. </div><div><br></div><div>I was also trying to test the SPI support, but I have been unable to get a driver for my simple SPI device to work. ( works on Arduino and Pi/Linux ). I think we need to convert the SPI support in the Pi BSP to the new SPI framework anyway, so it’s worth revisiting the SPI implementation. </div><div><br></div><div>Alan</div><div><br></div><div><br></div><div><br></div><div><br><div><blockquote type="cite"><div>On Dec 23, 2016, at 11:14 PM, Scott Zemerick <<a href="mailto:scott@zemericks.com" target="_blank">scott@zemericks.com</a>> wrote:</div><br class="m_971636130881660304Apple-interchange-newline"><div><div dir="ltr">Is anyone currently using i2c with the raspberrypi2 - and more specifically the SenseHat?  The i2c bsp code looks mostly complete, but I am confused as to which i2c API functions to call, with some concern that the i2c bsp support isn't complete.  A quick comparison of the pi i2c code with the spi code shows some design differences, with the latter looking more complete.  I plan on digging more into the pi bsp, but I would like to know the current state and if anyone has a basic example of pi i2c.  Thanks! </div>
______________________________<wbr>_________________<br>users mailing list<br><a href="mailto:users@rtems.org" target="_blank">users@rtems.org</a><br><a href="http://lists.rtems.org/mailman/listinfo/users" target="_blank">http://lists.rtems.org/<wbr>mailman/listinfo/users</a></div></blockquote></div><br></div></div></div></blockquote></div><br></div></div><br></blockquote></div><br></div>