Skip to content
Snippets Groups Projects
Alessandro Rubini's avatar
Alessandro Rubini authored
This adds the build choice about whether to use the older sockitowm or
the new "w1" implementation, which supports all three thermometers
but is still missing eeprom support (the API is defined, though, see
include/w1.h

This also adds a shell command, called "w1", which rescans the bus and
tries to read the temperature from all devices. In the example below
the third device is an eeprom, so it return an error for temperature
read-out.

   wrc# w1
   W1: 68000801dce56910
   W1: f70000001eda8242
   W1: 5f00000040e50143
   device 0: 68000801dce56910
   temp: 34.7500
   device 1: f70000001eda8242
   temp: 32.5000
   device 2: 5f00000040e50143
   temp: -32768.0000

The code is properly integrated in wrpc-sw, and the "first" thermometer is
used to build the MAC address of the device, like it used to be with
sockitowm.

The binary built with w1 is 3kB smaller than what is build with sockitowm.

Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
ad2efece