xref: /freebsd/share/man/man4/i2ctinyusb.4 (revision 96190b4fef3b4a0cc3ca0606b0c4e3e69a5e6717)
1.\"
2.\" SPDX-License-Identifier: BSD-2-Clause
3.\"
4.\" Copyright (c) 2024 Denis Bodor <dbodor@rollmops.ninja>
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.Dd February 18, 2024
28.Dt I2CTINYUSB 4
29.Os
30.Sh NAME
31.Nm i2ctinyusb
32.Nd driver for a USB / I2C bridge device
33.Sh SYNOPSIS
34To compile this driver into the kernel,
35place the following lines in your
36kernel configuration file:
37.Bd -ragged -offset indent
38.Cd "device i2ctinyusb"
39.Cd "device usb"
40.Cd "device iicbus"
41.Ed
42.Pp
43Alternatively, to load the driver as a
44module at boot time, place the following line in
45.Xr loader.conf 5 :
46.Bd -literal -offset indent
47i2ctinyusb_load="YES"
48.Ed
49.Sh DESCRIPTION
50The
51.Nm
52driver provides support for the device designed by Till Harbaum known
53as i2c-tiny-usb. This is initially a very simple circuit built with
54an Atmel AVR ATtiny45, but a Raspberry Pi Pico (RP2040) implementation
55also exists.
56.Pp
57The
58.Nm
59driver creates a
60.Xr iicbus 4
61child bus to expose the iic functions, enabling I2C sensors, converters
62and displays to be connected to any computer with a USB port.
63.Pp
64More information about this device can be found at:
65.Bd -literal -offset indent
66https://github.com/harbaum/I2C-Tiny-USB
67.Ed
68.Pp
69and (for the Raspberry Pi Pico version):
70.Bd -literal -offset indent
71https://github.com/Nicolai-Electronics/rp2040-i2c-interface
72.Ed
73.Pp
74The I2C controller supports read and write transactions with up to 1024
75bytes of data, and a write followed by the repeated start followed by a
76read transactions up to 1024 bytes.
77Zero length transfers are not supported.
78.Sh SEE ALSO
79.Xr iicbus 4 ,
80.Xr usb 4
81.Sh HISTORY
82The
83.Nm
84driver and this manual page was written by
85.An Denis Bodor Aq Mt dbodor@rollmops.ninja .
86