From owner-freebsd-arm@FreeBSD.ORG Sat Feb 28 16:30:38 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 54BA46E for ; Sat, 28 Feb 2015 16:30:38 +0000 (UTC) Received: from mail-ig0-x22b.google.com (mail-ig0-x22b.google.com [IPv6:2607:f8b0:4001:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 15F80AC2 for ; Sat, 28 Feb 2015 16:30:38 +0000 (UTC) Received: by igbhn18 with SMTP id hn18so7734777igb.2 for ; Sat, 28 Feb 2015 08:30:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=bUPvhJn0ByzmEO0BPTehHFrPj6RAakE3GnuI0mU89gk=; b=OgWpmjNqXOq24GR/CSXD8xzCHo1OK5Pa7kUKf943ibVCZ8yveN7INfte+8I5a+ioV/ jC3LxkTta2rAkA+onaDiV/C+zKVGLv62JQDu28bqNjDMY4ktpjEQlxH4L3ByL1e7hyAg CieZqakjgUTUcsZp3pRx2LlGNA6aJJNSRp1FSkopH9mkvhWUKDL5LsQh5bzCen0dtHTI 8STKEKIfV2qLaZX69KHtMddT5ZxHbtN+Y0SAz34kuGNk9MO0X8YLF98kCGOjOWFfLAGE fdZJyDqat3DUqJheFv2xbPLGs/1I5Ui/5NAMZZNa9hXudHZfBRejP9ZURxWS3R3lqyEM SMEw== MIME-Version: 1.0 X-Received: by 10.50.79.135 with SMTP id j7mr10389949igx.32.1425141037502; Sat, 28 Feb 2015 08:30:37 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.36.17.66 with HTTP; Sat, 28 Feb 2015 08:30:37 -0800 (PST) In-Reply-To: <20150228142424.6fed0ecf@zeta.dino.sk> References: <20150228111852.15affe31@zeta.dino.sk> <20150228193658.6c872779@B85M-HD3-0.alogt.com> <20150228142424.6fed0ecf@zeta.dino.sk> Date: Sat, 28 Feb 2015 08:30:37 -0800 X-Google-Sender-Auth: CoJ5QnVHqynPkAQv-W0iWDLx8uQ Message-ID: Subject: Re: Raspberry Pi with PiTFT - some GPIO weirdness From: Adrian Chadd To: Milan Obuch Content-Type: text/plain; charset=UTF-8 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 16:30:38 -0000 Please file a PR with this information and I'll make sure the ARM GPIO folk see it. Thanks! -a On 28 February 2015 at 05:24, Milan Obuch wrote: > On Sat, 28 Feb 2015 19:36:58 +0800 > Erich Dollansky wrote: > >> 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 > > According available docs, all GPIO are set to input mode after reset. > This seems not to be the case, but that's not my point. What was a bit > of surprise for me was even 'gpioctl -f /dev/gpioc0 -l' tells those > pins are in input mode ('pin nn'), it did not work. And fact that > even after power disconnect the state remains the same is even more > weird. > > Anyway, I accept the necessity for setup, the question is, where should > these setup instruction go. > > Regards, > Milan > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"