.\" $NetBSD: gpio.conf.5,v 1.2 2009/08/01 13:14:40 mbalmer Exp $ .\" .\" Copyright (c) 2009 Marc Balmer <marc@msys.ch> .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd August 1, 2009 .Dt GPIO.CONF 5 .Os .Sh NAME .Nm gpio.conf .Nd GPIO config file .Sh DESCRIPTION The .Nm file is read by the .Pa gpio rc.d script during system start-up and shutdown, and is intended for configuring GPIO pins. .Ss FILE FORMAT Lines starting with a hash .Pq Sq # and empty lines are ignored. All other lines are passed to .Xr gpioctl 8 . .Sh FILES .Bl -tag -width XXetcXgpioXconfXX .It Pa /etc/gpio.conf The .Nm configuration file resides in .Pa /etc . .It Pa /etc/rc.d/gpio .Xr rc.d 8 script that parses .Nm . .El .Sh EXAMPLES In this example, if the .Pa /etc/gpio.conf config file is present pin 1 of .Pa /dev/gpio0 is set as output and named "error_led". .Bd -literal -offset indent # Program pin 1 of /dev/gpio0 as output and name it "error_led" gpio0 1 set out error_led .Ed .Sh SEE ALSO .Xr gpioctl 8 , .Xr rc 8 |