Skip to main content

Module linux

Module linux 

Source
Expand description

The kernel’s own 1-Wire driver: thermometers as files under /sys/bus/w1/devices.

On a Raspberry Pi the w1-gpio overlay (dtoverlay=w1-gpio in config.txt) puts the bus on a GPIO, and the kernel’s w1_therm driver lists every DS18B20 it finds as a directory named by its family code and serial, 28-000005e2fdc3, with a w1_slave file that runs a conversion and prints the scratchpad on every read. A Thermometer reads that file as a Sensor, which is the right way to reach a DS18B20 from a Linux process, where the bit timing a Ds18b20 needs cannot be held.

Structs§

Thermometer
A DS18B20 the kernel exposes as a w1_slave file.

Enums§

ThermometerError
What can go wrong reading a thermometer through the kernel.

Constants§

DEVICES
Where the kernel lists the devices on its 1-Wire buses.
W1_SLAVE
The name of the file that runs a conversion and prints the scratchpad.