|
NAMEown , own_send_command ,
own_command_wait ,
own_self_command ,
own_acquire_bus , own crc ,
own_release_bus ,
OWN_ACQUIRE_BUS , OWN_CRC ,
OWN_RELEASE_BUS ,
OWN_SEND_COMMAND —
Dallas Semiconductor 1-Wire Network and Transport
Interface
SYNOPSIS#include <sys/bus.h>
#include <dev/ow/own.h>
int
int
int
int
int
int
int
int
void
uint8_t
DESCRIPTIONTheown interface defines three sets of functions for
interacting with 1-Wire devices: sending commands, reserving the bus, and
ensuring data integrity. Wrappers are provided for the raw
OWN
kobj(9)
interfaces and should be used for improved safety over the
kobj(9)
ones.
Bus CommandsThe 1-Wire bus defines different layers of access to the devices on the bus. Theown functions provide access to the network and
transport layers. The network layer designates the next command as being
either for all devices on the bus, or for a specific device. The network layer
also specifies the speed used by the link layer.
struct ow_cmd encapsulates network access, speed, and timing information. It specifies the commands to send and whether or not to read data. Its members are:
Bus ReservationThe 1-Wire system includes an advisory lock for the bus that presentation layer devices can use to coordinate access. Locking is purely advisory at this time.
Data Integrityown_crc () computes the 1-Wire standard CRC function over
the data passed in buffer and len
and returns the result.
NotesThe 1-Wire standard (Maxim AN937) defines layers that are akin to ISO networking layers. The lowest relevant layer, the link layer, defines the polling windows and the timing of the signaling of different modes. The network layer is built on top of the link layer and is used to address devices in a unicast or multicast manner. The transport layer defines commands and responses from the devices. The presentation layer is composed of the device specific commands and actions used to control the specific 1-Wire devices on bus.These interfaces are implemented by the ow(4) device. Presentation layer devices (children of the newbus ow(4) device) should only call the functions described here. The functionality provided by the owc(4) device (specifically the owll(9) interface) should only be called by the ow(4) driver. SEE ALSOow(4), owc(4), owll(9) https://pdfserv.maximintegrated.com/en/an/AN937.pdfLEGAL1-Wire is a registered trademark of Maxim Integrated Products, Inc.HISTORYTheown driver first appeared in
FreeBSD 11.0.
AUTHORSTheown device driver and this manual page were written
by Warner Losh.
Visit the GSP FreeBSD Man Page Interface. |