Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gpiopwm(4) [netbsd man page]

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

Check Out this Related Man Page

GPIOCTL(1)						    BSD General Commands Manual 						GPIOCTL(1)

NAME
gpioctl -- GPIO control utility SYNOPSIS
gpioctl -l [-f ctldev] [-v] gpioctl -t [-f ctldev] pin gpioctl -c [-f ctldev] pin flag [flag ...] gpioctl [-f ctldev] pin [0|1] DESCRIPTION
The gpioctl utility could be used to manage GPIO pins from userland and list available pins. The options are as follows: -c pin flag [flag ...] Configure pin by setting provided flags. The following flags are currently defined: IN Input pin OUT Output pin OD Open drain pin PP Push pull pin TS Tristate pin PU Pull-up pin PD Pull-down pin II Inverted input pin IO Inverted output pin -f ctldev GPIO controller device to use If not specified, defaults to /dev/gpioc0 -l list available pins -t pin toggle value of provided pin number -v be verbose: for each listed pin print current configuration EXAMPLES
o List pins available on GPIO controller defined by device /dev/gpioc0 gpioctl -f /dev/gpioc0 -l o Set the value of pin 12 to 1 gpioctl -f /dev/gpioc0 12 1 o Configure pin 12 to be input pin gpioctl -f /dev/gpioc0 -c 12 IN SEE ALSO
gpio(4), gpioiic(4), gpioled(4) HISTORY
The gpioctl utility appeared in FreeBSD 9.0. AUTHORS
The gpioctl utility and this manual page were written by Oleksandr Tymoshenko <gonzo@freebsd.org>. BSD
November 7, 2013 BSD
Man Page

5 More Discussions You Might Find Interesting

1. SCO

SCO 5.05 hard drive pulsing constantly

Just recently my hard drive has started to pulse like data is being read or written constantly. Causes? (2 Replies)
Discussion started by: jimser
2 Replies

2. UNIX for Dummies Questions & Answers

SCO 5.05 hard drive pulsing constantly

(2 Replies)
Discussion started by: jimser
2 Replies

3. Shell Programming and Scripting

output result (period -1)

hello, I have the following basic script which input the period, but I would like to output is period -1.. how? echo Please input period (yyyymm): read PERIOD OUTPUT=$PERIOD -1 echo " you request period -1 is $OUT" input 200705 output 200704 input 200701 output 200612 The above... (4 Replies)
Discussion started by: happyv
4 Replies

4. Hardware

Sun W2100z bios update

Hi I have the above machine, which is exhibiting the classic cpu fan pulsing issue. It seems I need to apply a BIOS update to the machine, from a CD that was formerly a free download from Sun, but now Oracle has taken over you need a support contract to get it. This machine is now very out of... (4 Replies)
Discussion started by: ZaphodB
4 Replies

5. UNIX for Advanced & Expert Users

GPIO and sysfs

I was recently working on a project where some gpio pins were being toggled from within the user space: const char *const amplifierGPIO = "/sys/class/gpio/gpio107/value"; void amplifierUnmute() { std::ofstream amp(amplifierGPIO); if (amp.is_open()) { ... (3 Replies)
Discussion started by: Circuits
3 Replies