Shop OBEX P1 Docs P2 Docs Learn Events
SD-MMC v1.9 Driver - I2CLock??? — Parallax Forums

SD-MMC v1.9 Driver - I2CLock???

MacTuxLinMacTuxLin Posts: 821
edited 2011-03-24 08:19 in Propeller 1
Hello All or Kye,

I seems to have lost (okay, forgotten to be exact) which thread I downloaded this latest version that has this I2CLock thingy. May I know under what circumstances would this be used? Does it mean if > 1 cog trying to access RTC, I'll need this?

Thanks a lot!:smile:

Comments

  • KyeKye Posts: 2,200
    edited 2011-03-24 07:46
    Eh,

    So, imagine if you were sharing the I2C bus and you wanted to have the cog to lock the bus as it used it. So, the RTC driver is setup such that if it is given a lock number (0-7) it will lock the I2C bus. This only works however if all your accessor functions to the I2C bus support locking. (Look at the RTC driver code...)

    Parallax will have some more documentation available about all this when Parallax Semi comes out.

    Thanks,
  • Bill HenningBill Henning Posts: 6,445
    edited 2011-03-24 08:01
    FYI,

    for my drivers, I use LOCK 0 for external memory access/sharing, and LOCK 1 for spi bus sharing
    Kye wrote: »
    Eh,

    So, imagine if you were sharing the I2C bus and you wanted to have the cog to lock the bus as it used it. So, the RTC driver is setup such that if it is given a lock number (0-7) it will lock the I2C bus. This only works however if all your accessor functions to the I2C bus support locking. (Look at the RTC driver code...)

    Parallax will have some more documentation available about all this when Parallax Semi comes out.

    Thanks,
  • MacTuxLinMacTuxLin Posts: 821
    edited 2011-03-24 08:19
    Hey yo'll, thanks a lot!! I got it, I think... I guess its -1 for now :tongue:
Sign In or Register to comment.