1.\" $NetBSD: ptcd.4,v 1.5 2013/07/20 21:39:58 wiz Exp $ 2.\" 3.\" Copyright (c) 2012 Marc Balmer <marc@msys.ch> 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25.\" 26.Dd December 17, 2012 27.Dt PTCD 4 28.Os 29.Sh NAME 30.Nm ptcd 31.Nd support for the Protech PS3100 cash drawer port 32.Sh SYNOPSIS 33.Cd "ptcd* at isa? port 0x48d" 34.Cd "gpio* at ptcd?" 35.Sh DESCRIPTION 36The 37.Nm 38driver controls the cash drawer port of the Protech PS3100 point of sale 39terminal using the GPIO subsystem. 40.Pp 41.Nm 42provides a GPIO device with two pins: pin 0 is used to control the cash drawer 43while pin 1 can be used to read the current state of the sense input pin. 44A logical 0 means the cash drawer is closed, a logical 1 means the cash drawer 45is open. 46.Pp 47To open the cash drawer, set pin 0 to logical 1 for a short period 48of time (e.g. < 1 sec) and then reset the pin to logical 0. 49.Sh SEE ALSO 50.Xr gpio 4 , 51.Xr ibmcd 4 , 52.Xr gpioctl 8 53.Sh HISTORY 54The 55.Nm 56driver first appeared in 57.Nx 6.1 . 58.Sh AUTHORS 59.An -nosplit 60The 61.Nm 62driver was written by 63.An Marc Balmer Aq Mt marc@msys.ch . 64.Sh CAVEATS 65As it is not possible to detect the hardware at runtime, this driver, when 66enabled, will always attach. 67Only enable it in your kernel configuration if you have the proper hardware. 68