gpiopwm man page on NetBSD

Man page or keyword search:  
man Server   9087 pages
apropos Keyword Search (all sections)
Output format
NetBSD logo
[printable version]

GPIOPWM(4)		 BSD Kernel Interfaces Manual		    GPIOPWM(4)

NAME
     gpiopwm — support for pulsing GPIO pins in software

SYNOPSIS
     gpiopwm* at gpio? offset ? mask 1
     gpiopwm* at gpio?

DESCRIPTION
     The gpiopwm driver allows for pulsing GPIO pins in software using the
     callout(9) facility.  The pulse frequency and duty cycle are specified
     indirectly by setting an “on” and “off” period, in ticks.	Both values
     are accessible as sysctl(3) variables.

SYSCTL VARIABLES
     The following sysctl(3) variables are used to define the pulsing:

     hw.gpiopwmN.off
		   Define the “off” period in ticks.

     hw.gpiopwmN.on
		   Define the “on” period in ticks.

     Only when both the “on” and the “off” period are set to values higher
     than zero pulsing will start.  To stop the pulsing, set either value to
     zero.

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”
     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%:

     # gpioctl gpio0 20 set pp
     # gpioctl gpio0 attach gpiopwm 20 1
     # sysctl -w hw.gpiopwm0.off=80
     # sysctl -w hw.gpiopwm0.on=20

SEE ALSO
     gpio(4), intro(4), gpioctl(8), sysctl(8)

HISTORY
     The gpiopwm driver first appeared in NetBSD 6.0.

AUTHORS
     The gpiopwm driver was written by Marc Balmer ⟨marc@msys.ch⟩.

BSD			       November 13, 2011			   BSD
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server NetBSD

List of man pages available for NetBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net