From owner-freebsd-multimedia@FreeBSD.ORG Fri Oct 26 13:59:17 2007 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 827A916A417 for ; Fri, 26 Oct 2007 13:59:17 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (casselton.net [63.165.140.2]) by mx1.freebsd.org (Postfix) with ESMTP id 3711313C491 for ; Fri, 26 Oct 2007 13:59:17 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.13.8/8.13.8) with ESMTP id l9QDxGk2088303; Fri, 26 Oct 2007 08:59:16 -0500 (CDT) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1193407156; bh=iZvOt140LJ4ASBpNqsU9jUs3mJl4tjrCV6S8Flq 2CkQ=; h=Date:From:Message-Id:To:Subject:Cc:In-Reply-To; b=gwGYQEVK Vys58kzQa29WegHLms38t8vha1DrECq8MkhpWcPjezyuLZ02hY86meqWDDdJYX9bMiL WsvC6cd9MzesEWilgwk9KiqqLz8+EyNiMdTNmen0hzusTd9owdYLz3w0NBOuEguBhlL sWPz7yTspO13Osd9cfqKy2huIOZ4U= Received: (from tinguely@localhost) by casselton.net (8.13.8/8.13.8/Submit) id l9QDxFZh088302; Fri, 26 Oct 2007 08:59:15 -0500 (CDT) (envelope-from tinguely) Date: Fri, 26 Oct 2007 08:59:15 -0500 (CDT) From: Mark Tinguely Message-Id: <200710261359.l9QDxFZh088302@casselton.net> To: achill@matrix.gatewaynet.com, tinguely@casselton.net In-Reply-To: <200710261113.18925.achill@matrix.gatewaynet.com> Cc: freebsd-multimedia@freebsd.org Subject: Re: bktr and GPIO X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Oct 2007 13:59:17 -0000 (deleted information. He is interested in getting the Zoneminder bktr(8) based relays to work). > I have some contact with the person who manufactures the cards and writes the > linux drivers, and he asked me if FreeBSD has access to bt878 GPIO, and said > that it would be easy if so. You will need to know what values need to be writen to which register to enable the particular relay. In the kernel driver source program, add a new ioctl() so that you can enable this feature from the user program. The command inside the new ioctl() will probably look roughly like: #ifdef OPTIONAL_READ_OLD /* optionally may need to preserve some other settings */ set = (IN#(bktr, BKTR_GPIO_@@@@) & ~mask) | set; #endif OUT#(bktr, BKTR_GPIO_@@@@, set); /* turn on relay "value" */ where mask optional turn off bits set enable bits # is the size (B)yte, (W)ord, (L)ong @@@@ is the register location (you probably will have to add a define for this location into the header file). --Mark Tinguely