• Alessandro Rubini's avatar
    tools/wrpc-w1-read.c: read w1 eeprom from user space · ae81022b
    Alessandro Rubini authored
    This reads to stdout, in binary format. With "-v" it prints text and
    scans the bus too. The examples here below use the same card (and same
    data) as in commit "d44ace7e w1: complete eeprom low-level support".
    
       spusa.root# ./tools/wrpc-w1-read -b 2 0 5 | od -t u1 -Ax -w1
       000000  40
       000001  41
       000002  42
       000003 243
       000004 244
    
       spusa.root# ./tools/wrpc-w1-read -v -b 2 30 6
       ./ohwr/wrpc-sw/tools/wrpc-w1-read: found device 10dc:018d: 0000:02:00.0
       ./ohwr/wrpc-sw/tools/wrpc-w1-read: found device 10dc:018d: 0000:04:00.0
       device 0: 68000801dce56910
       device 1: 5b0000036c567628
       device 2: f70000001eda8242
       device 3: 5f00000040e50143
       Reading device on bus 2: offset 30 (0x1e), len 6
       offset   30 (0x01e):  11 (0x0b)
       offset   31 (0x01f):  22 (0x16)
       offset   32 (0x020):  33 (0x21)
       offset   33 (0x021):  44 (0x2c)
       offset   34 (0x022):  55 (0x37)
       offset   35 (0x023):  66 (0x42)
    Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
    ae81022b
Makefile 478 Bytes