Changeset View
Changeset View
Standalone View
Standalone View
head/usr.sbin/pwm/pwm.8
Show All 16 Lines | |||||
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||||
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||||
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||||
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||||
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd November 12, 2018 | .Dd January 12, 2019 | ||||
.Dt PWM 8 | .Dt PWM 8 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm pwm | .Nm pwm | ||||
.Nd configure pwm controller | .Nd configure pwm controller | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.Nm | .Nm | ||||
.Op Fl f Ar device | .Op Fl f Ar device | ||||
.Fl c Ar channel | .Fl c Ar channel | ||||
.Fl E | .Fl E | ||||
.Nm | .Nm | ||||
.Op Fl f Ar device | .Op Fl f Ar device | ||||
.Fl c Ar channel | .Fl c Ar channel | ||||
.Fl D | .Fl D | ||||
.Nm | .Nm | ||||
.Op Fl f Ar device | .Op Fl f Ar device | ||||
.Fl c Ar channel | .Fl c Ar channel | ||||
.Fl C | .Fl C | ||||
.Nm | .Nm | ||||
.Op Fl f Ar device | .Op Fl f Ar device | ||||
.Fl c Ar channel | .Fl c Ar channel | ||||
.Fl p period | .Fl p Ar period | ||||
.Nm | .Nm | ||||
.Op Fl f Ar device | .Op Fl f Ar device | ||||
.Fl c Ar channel | .Fl c Ar channel | ||||
.Fl d duty | .Fl d Ar duty | ||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
The | The | ||||
.Nm | .Nm | ||||
utility can be used to configure pwm controllers. | utility can be used to configure pwm controllers. | ||||
.Pp | .Pp | ||||
The options are as follow: | The options are as follow: | ||||
.Bl -tag -width ".Fl f Ar device" | .Bl -tag -width "-c channel" | ||||
.It Fl c Ar channel | .It Fl c Ar channel | ||||
Channel number to operate on | Channel number to operate on | ||||
.It Fl f Ar device | |||||
Device to operate on. | |||||
If not specified, | |||||
.Pa /dev/pwmc0 | |||||
is used. | |||||
.It Fl E | .It Fl E | ||||
Enable the pwm channel | Enable the pwm channel | ||||
.It Fl D | .It Fl D | ||||
Disable the pwm channel | Disable the pwm channel | ||||
.It Fl C | .It Fl C | ||||
Show the configuration of the pwm channel | Show the configuration of the pwm channel | ||||
.It Fl p Ar period | .It Fl p Ar period | ||||
Configure the period (in nanoseconds) of the pwm channel | Configure the period (in nanoseconds) of the pwm channel | ||||
.It Fl d Ar duty | .It Fl d Ar duty | ||||
Configure the duty (in nanoseconds or percentage) of the pwm channel | Configure the duty (in nanoseconds or percentage) of the pwm channel | ||||
.El | .El | ||||
.Sh EXAMPLES | .Sh EXAMPLES | ||||
.Bl -bullet | .Bl -bullet | ||||
.It | .It | ||||
Show the configuration of the pwm channel: | Show the configuration of the pwm channel: | ||||
.Pp | .Bd -literal | ||||
pwm -f /dev/pwmc0 -C | pwm -f /dev/pwmc0 -C | ||||
.Ed | |||||
.It | .It | ||||
Configure a 50000 ns period and a 25000 duty cycle: | Configure a 50000 ns period and a 25000 duty cycle: | ||||
.Pp | .Bd -literal | ||||
pwm -f /dev/pwmc0 -p 50000 -d 25000 | pwm -f /dev/pwmc0 -p 50000 -d 25000 | ||||
.Ed | |||||
.It | .It | ||||
Configure a 50% duty cycle: | Configure a 50% duty cycle: | ||||
.Pp | .Bd -literal | ||||
pwm -f /dev/pwmc0 -d 50% | pwm -f /dev/pwmc0 -d 50% | ||||
.Ed | |||||
.El | .El | ||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr pwm 9 , | .Xr pwm 9 , | ||||
.Xr pwmbus 9 | .Xr pwmbus 9 | ||||
.Sh HISTORY | .Sh HISTORY | ||||
The | The | ||||
.Nm | .Nm | ||||
utility appeared in | utility appeared in | ||||
.Fx 13.0 . | .Fx 13.0 . | ||||
.Sh AUTHORS | .Sh AUTHORS | ||||
.An -nosplit | .An -nosplit | ||||
The | The | ||||
.Nm | .Nm | ||||
utility and this manual page were written by | utility and this manual page were written by | ||||
.An Emmanuel Vadot Aq Mt manu@FreeBSD.org . | .An Emmanuel Vadot Aq Mt manu@FreeBSD.org . |