Shop OBEX P1 Docs P2 Docs Learn Events
C version I2C driver — Parallax Forums

C version I2C driver

telluriantellurian Posts: 52
edited 2009-03-09 07:39 in Propeller 1
I just added a C version of the I2C driver to OBEX for any ICCV7 users out there. It has been well tested with a number of common I2C devices but manure happens smile.gif, so bug reports and suggestions are welcome.

tellurian (Allen)

Comments

  • jazzedjazzed Posts: 11,803
    edited 2009-03-08 23:20
    Hi Allen.
    Nice to see you adding C code to obex ... looks good to me.
    Any reason you did not use printf in your test code rather than FdSerial_str, etc... ?
    All you need do is define putchar according to stdio.h prototype that calls FdSerial_tx.
    Just curious. Cheers.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve

    Post Edited (jazzed) : 3/8/2009 11:25:47 PM GMT
  • telluriantellurian Posts: 52
    edited 2009-03-09 00:52
    jazzed said...
    Hi Allen.
    Nice to see you adding C code to obex ... looks good to me.
    Any reason you did not use printf in your test code rather than FdSerial_str, etc... ?
    All you need do is define putchar according to stdio.h prototype that calls FdSerial_tx.
    Just curious. Cheers.

    Hi jazzed

    Ya, I deliberately did not do that because some ICC libraries have printf defined already. I ran into that problem with the ICCV7 asyncio and VGA_text libraries ... my printf that I thought was going to go to the serial port ended up on the screen instead. I didn't look into it though as I don't use those libraries anyway, they are not very flexible. I like a clean name space though, so I am happy with XXXX_str() or YYYY_str().

    Ditto on the good to see C code in OBEX. I am sure that there will be more and more of it in OBEX. I like SPIN a lot, but C I like C better smile.gif

    Cheers,
    tellurian (Allen)
  • ImageCraftImageCraft Posts: 348
    edited 2009-03-09 07:39
    Thanks! Keep those C libraries coming smile.gif

    You may wish to join the ICC user mailing list and tell the other people there. Thanks.

    // richard
Sign In or Register to comment.