- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I add opencore i2c to Nios II, and tested by i2ctools under uClinux( Microtronix nios2linux 1.4)
1. 3 chips in /dev/i2c-0 _________ typical read (they are different) EEPROM_: S Addr Wr [A] Reg_addr [A]______________S Addr Rd [A] [Data] A.......[Data] NA P FRAM___: S Addr Wr [A] Reg_addr_H [A] Reg_addr_L [A] S Addr Rd [A] [Data] A.......[Data] NA P Realtime : S Addr Rd [A] _____________________________________[Data] A.......[Data] NA P 2. Here is the result of i2cdetect 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: XX XX XX XX XX XX XX XX XX XX XX XX XX 10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 30: 30 31 32 33 34 35 36 37 XX XX XX XX XX XX XX XX 40: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 50: 50 51 XX XX XX XX XX XX XX XX XX XX XX XX XX XX 60: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 70: XX XX XX XX XX XX XX XX which indicates the adress of them correctly: EEPROM : 50 FRAM : 51 Realtimer : 30---37 3. problem 3.1 I see only "ioctl" in i2ctools. Could I using "read" "write" method? (As the compiler tells me errors in :#include <linux/i2c.h># include <linux/i2c-dev.h>
3.2 How can I access 3-different types of i2c chips via oc-i2c drivers?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could I modify i2c-oc.c and i2c-algo-oc.c to implement or add new 3 i2c-eeprom.c, i2c-fram.c and i2c-realtime.c ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
<div class='quotetop'>QUOTE </div>
--- Quote Start --- I see only "ioctl" in i2ctools. Could I using "read" "write" method?[/b] --- Quote End --- you can use ioctl to read/write those devices, the command you need is I2C_RDWR. <div class='quotetop'>QUOTE </div> --- Quote Start --- How can I access 3-different types of i2c chips via oc-i2c drivers?[/b] --- Quote End --- You can have different utilities. The device address is specified in the message passed with this ioctl command. <div class='quotetop'>QUOTE </div> --- Quote Start --- Could I modify i2c-oc.c and i2c-algo-oc.c to implement or add new 3 i2c-eeprom.c, i2c-fram.c and i2c-realtime.c[/b] --- Quote End --- If your kernel does not utilize those devices, you don't have to implement something in kernel.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page