From 91c0003b158e5f0ed9d0677fb136ae8bb6f86ec5 Mon Sep 17 00:00:00 2001 From: "N.N." Date: Mon, 28 Apr 2008 18:10:15 +0000 Subject: this is an old gridflow, and there's already a svn repository at http://gridflow.ca/svn/trunk svn path=/trunk/; revision=9739 --- externals/gridflow/devices4ruby/ParallelPort.rb | 72 ------------------------- 1 file changed, 72 deletions(-) delete mode 100644 externals/gridflow/devices4ruby/ParallelPort.rb (limited to 'externals/gridflow/devices4ruby/ParallelPort.rb') diff --git a/externals/gridflow/devices4ruby/ParallelPort.rb b/externals/gridflow/devices4ruby/ParallelPort.rb deleted file mode 100644 index 10188592..00000000 --- a/externals/gridflow/devices4ruby/ParallelPort.rb +++ /dev/null @@ -1,72 +0,0 @@ -require "linux/ioctl" -# Copyright (c) 2001, 2003 by Mathieu Bouchard -# this is published under the Ruby license - -=begin - if using a DB-25 female connector as found on a PC, - then the pin numbering is like: - 13 _____ 1 - 25 \___/ 14 - - 1 = STROBE = the clock line is a square wave, often at 9600 Hz, - which determines the data rate in usual circumstances. - 2..9 = D0..D7 = the eight ordinary data bits - 10 = -ACK (status bit 6 ?) - 11 = BUSY (status bit 7) - 12 = PAPER_END (status bit 5) - 13 = SELECT (status bit 4 ?) - 14 = -AUTOFD - 15 = -ERROR (status bit 3 ?) - 16 = -INIT - 17 = -SELECT_IN - 18..25 = GROUND -=end - -module Linux; module ParallelPort - extend IoctlClass - - @port_flags = %w[ - LP_EXIST - LP_SELEC - LP_BUSY - LP_OFFL - LP_NOPA - LP_ERR - LP_ABORT - LP_CAREFUL - LP_ABORTOPEN - LP_TRUST_IRQ - ] - - @port_status = %w[ - nil, - nil, - nil, - LP_PERRORP # unchanged input, active low - LP_PSELECD # unchanged input, active high - LP_POUTPA # unchanged input, active high - LP_PACK # unchanged input, active low - LP_PBUSY # inverted input, active high - ] - - LPCHAR = 0x0601 - LPTIME = 0x0602 - LPABORT = 0x0604 - LPSETIRQ = 0x0605 - LPGETIRQ = 0x0606 - LPWAIT = 0x0608 - LPCAREFUL = 0x0609 # obsoleted??? wtf? - LPABORTOPEN = 0x060a - LPGETSTATUS = 0x060b # return LP_S(minor) - LPRESET = 0x060c # reset printer - LPGETSTATS = 0x060d # struct lp_stats (most likely turned off) - LPGETFLAGS = 0x060e # get status flags - LPTRUSTIRQ = 0x060f # set/unset the LP_TRUST_IRQ flag - - ioctl_reader :port_flags , :LPGETFLAGS - ioctl_reader :port_status, :LPGETSTATUS - ioctl_writer :port_careful,:LPCAREFUL - ioctl_writer :port_char, :LPCHAR - -end end - -- cgit v1.2.1