Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

Question as to the method to create /dev/i2c device node,

29

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
29

Question as to the method to create /dev/i2c device node,

Posted at 10/25/2017 15:24:52      View:4075 | Replies:7        Print      Only Author   [Copy Link] 1#
if using /dev/i2c -0/1/2 in application like below, how can create the node of i2c device (/dev/i2c) ?
need to add something in dts file (pinctrl.dtsi) or if dtsi file already defined the control of each pins,
only need to define the node in ueventd.rc located in device folder of android code, is it right ?

thankful for your kindness in advance,

ex)
        // Net name I2C_1 Physical address : 0x12C70000
        int fd = open("/dev/i2c-4", O_RDWR);                                    
        if (fd < 0) {                                                           
                printf("ERROR: open failed\n");                                 
                return -1;                                                      
        }                                                                       

        status = ioctl(fd, I2C_SLAVE, SI702X_ADDRESS);                          
        if (status < 0) {                                                      
                printf("ERROR: ioctl error\n");                                 
                close(fd);                                                      
                return -1;                                                      
        }      
Reply

Use props Report

792

Credits

10

Prestige

10

Contribution

advanced

Rank: 4

Credits
792
Posted at 10/25/2017 16:17:56        Only Author  2#
cannot do it like that. The sample use i2c below
http://en.t-firefly.com/doc/product/info/id/306.html
Reply

Use props Report

29

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
29
Posted at 10/26/2017 07:39:51        Only Author  3#
leung先森 Posted at 10/25/2017 16:17
cannot do it like that. The sample use i2c below
http://en.t-firefly.com/doc/product/info/id/306.ht ...

I can't open the link, Could you please kindly check the link again ?
and if possible, please help to let me know the reason with detailed information or explanation,

thanks.
Reply

Use props Report

792

Credits

10

Prestige

10

Contribution

advanced

Rank: 4

Credits
792
Posted at 10/27/2017 09:11:07        Only Author  4#
edmond.yun Posted at 10/26/2017 07:39
I can't open the link, Could you please kindly check the link again ?
and if possible, please hel ...

Links is fine , i have no idea why you cant open it.
Reply

Use props Report

29

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
29
Posted at 10/27/2017 10:03:01        Only Author  5#
ERR_TOO_MANY_REDIRECTS is happened.
Reply

Use props Report

29

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
29
Posted at 10/27/2017 10:04:39        Only Author  6#
leung先森 Posted at 10/27/2017 09:11
Links is fine , i have no idea why you cant open it.

ERR_TOO_MANY_REDIRECTS is happened.
Reply

Use props Report

792

Credits

10

Prestige

10

Contribution

advanced

Rank: 4

Credits
792
Posted at 10/28/2017 15:05:25        Only Author  7#
edmond.yun Posted at 10/27/2017 10:04
ERR_TOO_MANY_REDIRECTS is happened.

http://en.t-firefly.com/
Product -> FirePrime -> Tutorial -> Using I2C
Reply

Use props Report

29

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
29
Posted at 10/30/2017 09:26:10        Only Author  8#
leung先森 Posted at 10/28/2017 15:05
http://en.t-firefly.com/
Product -> FirePrime -> Tutorial -> Using I2C

thanks.
I know the method, but I wonder why the device node can't be made for application.
Could you kindly let me know the reason ?
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list