From owner-freebsd-arm@FreeBSD.ORG Sat Feb 28 11:37:19 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE83FDF8 for ; Sat, 28 Feb 2015 11:37:19 +0000 (UTC) Received: from alogt.com (alogt.com [69.36.191.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88D8B9CF for ; Sat, 28 Feb 2015 11:37:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alogt.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=kl3LPK5f01HT6ijFCnTXhWT5Us7paKVJEHN8VXijvFQ=; b=nDDUp/glpIhuycxP3V2QYcWdCehwJ1kS5+FqganzycbJfqkDrCv9OI1LBiUC0XnNRrBeTvmhtbOBX2io/w3syRflsrQiznRtPeu8eVI0ttJ5cs2++0nchhhFFCqTZWJgkEXilXGjXv+R+74lr729dp4ynYDEjWLddF4JmZSfeyA=; Received: from [114.124.29.248] (port=34594 helo=B85M-HD3-0.alogt.com) by sl-508-2.slc.westdc.net with esmtpsa (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.85) (envelope-from ) id 1YRfht-002eyh-Ax; Sat, 28 Feb 2015 04:37:18 -0700 Date: Sat, 28 Feb 2015 19:36:58 +0800 From: Erich Dollansky To: Milan Obuch Subject: Re: Raspberry Pi with PiTFT - some GPIO weirdness Message-ID: <20150228193658.6c872779@B85M-HD3-0.alogt.com> In-Reply-To: <20150228111852.15affe31@zeta.dino.sk> References: <20150228111852.15affe31@zeta.dino.sk> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - sl-508-2.slc.westdc.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - alogt.com X-Get-Message-Sender-Via: sl-508-2.slc.westdc.net: authenticated_id: erichsfreebsdlist@alogt.com X-Source: X-Source-Args: X-Source-Dir: Cc: freebsd-arm@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2015 11:37:19 -0000 Hi, On Sat, 28 Feb 2015 11:18:52 +0100 Milan Obuch wrote: > today I found some time to play a bit with my little display attached > to Rasoberry Pi, and I decided to test buttons connected to GPIO, as > this should work on FreeBSD already. According docs, buttons are > connected to GPIO lines 23, 22, 21 and 18, leftmost first. > > Using basic 'gpioctl -f /dev/gpioc0 -lv' command I found only first > one, on line 23, reacts. It has value 1 normally and 0 when pressed. > you must setup the pins as inputs first before using them as inputs. I would not rely on any defaults. Erich