spigen.4 (e25152834cdf3b353892835a4f3b157e066a8ed4) | spigen.4 (3d265fce43746c293ae826e9603adbfe09f93cf6) |
---|---|
1.\" 2.\" Copyright (c) 2018 Ian Lepore <ian@freebsd.org> 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" --- 44 unchanged lines hidden (view full) --- 53driver provides direct access to a slave device on the SPI bus. 54Each instance of a 55.Nm 56device is associated with a single chip-select 57line on the bus, and all I/O performed through that instance is done 58with that chip-select line asserted. 59.Pp 60SPI data transfers are inherently bi-directional; there are not separate | 1.\" 2.\" Copyright (c) 2018 Ian Lepore <ian@freebsd.org> 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" --- 44 unchanged lines hidden (view full) --- 53driver provides direct access to a slave device on the SPI bus. 54Each instance of a 55.Nm 56device is associated with a single chip-select 57line on the bus, and all I/O performed through that instance is done 58with that chip-select line asserted. 59.Pp 60SPI data transfers are inherently bi-directional; there are not separate |
61read and write operations. | 61read and write operations. |
62When commands and data are sent to a device, data also comes back from 63the device, although in some cases the data may not be useful (or even 64documented or predictable for some devices). 65Likewise on a read operation, whatever data is in the buffer at the start 66of the operation is sent to (and typically ignored by) the device, with each 67outgoing byte then replaced in the buffer by the corresponding incoming byte. 68Thus, all buffers passed to the transfer functions are both input and 69output buffers. --- 54 unchanged lines hidden (view full) --- 124when communicating with this device. 125.It Dv SPIGENIOC_SET_SPI_MODE Pq Vt uint32_t 126Set the SPI mode (clock polarity and phase) to be used 127when communicating with this device. 128The setting remains in effect for subsequent transfers; it 129is not necessary to reset this before each transfer. 130.El 131.Sh HINTS CONFIGURATION | 62When commands and data are sent to a device, data also comes back from 63the device, although in some cases the data may not be useful (or even 64documented or predictable for some devices). 65Likewise on a read operation, whatever data is in the buffer at the start 66of the operation is sent to (and typically ignored by) the device, with each 67outgoing byte then replaced in the buffer by the corresponding incoming byte. 68Thus, all buffers passed to the transfer functions are both input and 69output buffers. --- 54 unchanged lines hidden (view full) --- 124when communicating with this device. 125.It Dv SPIGENIOC_SET_SPI_MODE Pq Vt uint32_t 126Set the SPI mode (clock polarity and phase) to be used 127when communicating with this device. 128The setting remains in effect for subsequent transfers; it 129is not necessary to reset this before each transfer. 130.El 131.Sh HINTS CONFIGURATION |
132On a | 132On a |
133.Xr device.hints 5 134based system, such as 135.Li MIPS , 136these values are configurable for 137.Nm : 138.Bl -tag -width indent 139.It Va hint.spigen.%d.at 140The spibus the --- 67 unchanged lines hidden --- | 133.Xr device.hints 5 134based system, such as 135.Li MIPS , 136these values are configurable for 137.Nm : 138.Bl -tag -width indent 139.It Va hint.spigen.%d.at 140The spibus the --- 67 unchanged lines hidden --- |