Fix a few typos and Xrefs, use Dq, comment out Xr to non-existent gpioattach(4),
sort SEE ALSO.
This commit is contained in:
parent
3aa8e3d303
commit
7405dbf494
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: gpiopwm.4,v 1.1 2011/11/13 12:35:40 mbalmer Exp $
|
||||
.\" $NetBSD: gpiopwm.4,v 1.2 2011/11/13 19:31:05 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2011 Marc Balmer <marc@msys.ch>
|
||||
.\"
|
||||
|
@ -14,7 +14,7 @@
|
|||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.Dd Novemner 13, 2011
|
||||
.Dd November 13, 2011
|
||||
.Dt GPIOPWM 4
|
||||
.Os
|
||||
.Sh NAME
|
||||
|
@ -29,29 +29,42 @@ The
|
|||
driver allows for pulsing GPIO pins in software using the
|
||||
.Xr callout 9
|
||||
facility.
|
||||
The pulse frequency and duty cycle are specified indirectly by setting an 'on'
|
||||
and 'off' period, in ticks.
|
||||
The pulse frequency and duty cycle are specified indirectly by setting an
|
||||
.Dq on
|
||||
and
|
||||
.Dq off
|
||||
period, in ticks.
|
||||
Both values are accessible as
|
||||
.Xr sysctl 2
|
||||
.Xr sysctl 3
|
||||
variables.
|
||||
.Sh SYSCTL VARIABLES
|
||||
The following
|
||||
.Xr sysctl 2
|
||||
.Xr sysctl 3
|
||||
variables are used to define the pulsing:
|
||||
.Bl -tag width
|
||||
.It hw.gpiopwmN.off
|
||||
Define the 'off' period in ticks.
|
||||
Define the
|
||||
.Dq off
|
||||
period in ticks.
|
||||
.It hw.gpiopwmN.on
|
||||
Define the 'on' period in ticks.
|
||||
Define the
|
||||
.Dq on
|
||||
period in ticks.
|
||||
.El
|
||||
.Pp
|
||||
Only when both the 'on' and the 'off' period are set to values higher than
|
||||
zero pulsing will start.
|
||||
Only when both the
|
||||
.Dq on
|
||||
and the
|
||||
.Dq off
|
||||
period are set to values higher than zero pulsing will start.
|
||||
To stop the pulsing, set either value to zero.
|
||||
.Sh EXAMPLES
|
||||
To pulse a pin on a machine with 100 ticks/second with a frequency of 1Hz and a
|
||||
duty cycle of 20%, the 'on' period must be set to 20 and the 'off' perdiod
|
||||
must be set to 80.
|
||||
duty cycle of 20%, the
|
||||
.Dq on
|
||||
period must be set to 20 and the
|
||||
.Dq off
|
||||
period must be set to 80.
|
||||
The following example will pulse the error LED of a Soekris net4801
|
||||
with a frequency of 1 Hz and a duty cycle of 20%:
|
||||
.Bd -literal
|
||||
|
@ -62,10 +75,10 @@ with a frequency of 1 Hz and a duty cycle of 20%:
|
|||
.Ed
|
||||
.Sh SEE ALSO
|
||||
.Xr gpio 4 ,
|
||||
.Xr gpioattach 4 ,
|
||||
.\" .Xr gpioattach 4 ,
|
||||
.Xr intro 4 ,
|
||||
.Xr gpioctl 8 ,
|
||||
.Xr sysctl 8 ,
|
||||
.Xr intro 4
|
||||
.Xr sysctl 8
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Nm
|
||||
|
|
Loading…
Reference in New Issue