Tiny asynchronous I2C driver

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Tiny asynchronous I2C driver

913件の閲覧回数
jrychter
Contributor V

I wrote a tiny driver that allows you to access I2C (IIC, I²C, or I squared C) on Freescale Kinetis microcontrollers. It works asynchronously (interrupt-driven), supports repeated start (restart) and does not depend on any large software framework.

It isn't anything particularly great, but I couldn't find anything like it (Kinetis SDK is nowhere near done, unfortunately), so I wrote my own and I thought I'd share the code. It is MIT-licensed, which means you can do pretty much anything you want with it.

It is not a fully-featured driver. Only master mode is implemented. Only 7-bit addressing is supported. Addressing is fully manual: it is your responsibility to shift the 7-bit I2C address to the left and add the R/W bit (actually, I see this as an advantage). There is almost no error handling.

Find it on the Kinetis I2C Driver page, or go directly to the GitHub repo with the code.

Enjoy!

--Jan (@jrychter on Twitter)

タグ(1)
0 件の賞賛
返信
0 返答(返信)