From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5292 invoked by alias); 1 Oct 2007 12:27:44 -0000 Received: (qmail 5240 invoked by uid 22791); 1 Oct 2007 12:27:43 -0000 X-Spam-Check-By: sourceware.org Received: from nf-out-0910.google.com (HELO nf-out-0910.google.com) (64.233.182.184) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 01 Oct 2007 12:27:38 +0000 Received: by nf-out-0910.google.com with SMTP id b21so2337360nfd for ; Mon, 01 Oct 2007 05:27:33 -0700 (PDT) Received: by 10.78.138.6 with SMTP id l6mr3019817hud.1191241652353; Mon, 01 Oct 2007 05:27:32 -0700 (PDT) Received: by 10.78.191.20 with HTTP; Mon, 1 Oct 2007 05:27:32 -0700 (PDT) Message-ID: Date: Mon, 01 Oct 2007 12:27:00 -0000 From: "Rasmus Stougaard" To: ecos-discuss@ecos.sourceware.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] Problem reading buttons on AT91sam7s-ek X-SW-Source: 2007-10/txt/msg00004.txt.bz2 Hi I am trying to read the state of the buttons on a AT91sam7s-ek evaluation kit from atmel. I figure that something like: cyg_uint32 value; HAL_ARM_AT91_GPIO_CFG_DIRECTION(AT91_GPIO_PA20, AT91_PIN_IN); HAL_ARM_AT91_GPIO_CFG_PULLUP(AT91_GPIO_PA20, AT91_PIN_PULLUP_ENABLE); HAL_ARM_AT91_GPIO_GET(AT91_GPIO_PA20, value); trace(" AT91_GPIO_PA20 %d\n", value); Should configure the pin for input and print the current state of the of the pin. However, the state returned in value is always zero, so I must be doing something wrong. Any hints much apreciated. Regards Rasmus Stougaard -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss