From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29778 invoked by alias); 14 Mar 2013 21:10:44 -0000 Received: (qmail 29691 invoked by uid 22791); 14 Mar 2013 21:10:42 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org Received: from mail1.bemta7.messagelabs.com (HELO mail1.bemta7.messagelabs.com) (216.82.254.97) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Mar 2013 21:10:37 +0000 Received: from [216.82.254.179:31099] by server-1.bemta-7.messagelabs.com id 5B/F0-09940-CCC32415; Thu, 14 Mar 2013 21:10:36 +0000 X-Env-Sender: Richard.Morris@lifetech.com X-Msg-Ref: server-8.tower-199.messagelabs.com!1363295434!3174828!2 X-StarScan-Received: X-StarScan-Version: 6.8.6.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 23905 invoked from network); 14 Mar 2013 21:10:35 -0000 Received: from unknown (HELO cbd01exc7ets01.ads.invitrogen.net) (198.160.190.35) by server-8.tower-199.messagelabs.com with RC4-SHA encrypted SMTP; 14 Mar 2013 21:10:35 -0000 Received: from CBD01EXC7HTCA01.ads.invitrogen.net (10.33.67.50) by cbd01exc7ets01.ads.invitrogen.net (172.16.16.35) with Microsoft SMTP Server (TLS) id 8.3.192.1; Thu, 14 Mar 2013 13:15:52 -0700 Received: from CBD01MAIL02.ads.invitrogen.net ([10.33.67.57]) by CBD01EXC7HTCA01.ads.invitrogen.net ([10.33.67.50]) with mapi; Thu, 14 Mar 2013 14:10:34 -0700 From: "Morris, Richard" To: EnneGi CC: "ecos-discuss@ecos.sourceware.org" Date: Thu, 14 Mar 2013 21:10:00 -0000 Message-ID: <174B0313-B7C1-4E9A-A55A-B02EA0759900@lifetech.com> References: <1363126636423-225218.post@n7.nabble.com> <1363272049159-225400.post@n7.nabble.com> <6830B196-28A1-4D40-9749-9A36371524F7@linear.com> <1363274631389-225418.post@n7.nabble.com> <1363275339898-225422.post@n7.nabble.com> <3F040114-5CCD-4DF6-9343-EA5DC6CB99F5@lifetech.com> <1363280900917-225438.post@n7.nabble.com> <1363291147348-225465.post@n7.nabble.com> In-Reply-To: <1363291147348-225465.post@n7.nabble.com> Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes 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: Re: [ECOS] Re: How to create a GPIO driver X-SW-Source: 2013-03/txt/msg00049.txt.bz2 You will need to adapt the macro to the needs of the LPC17XX. It will have= different configuration that the STM32. To do this you will need to read the GPIO section of the LPC17XX user manua= l and adapt the code from the STM32 to the LPC17XX. --Richard On Mar 14, 2013, at 12:59 PM, EnneGi wrote: I use this test main: #include #include int main (void) { diag_printf("setting gpio\n"); cyg_uint32 v_led_ok =3D CYGHWR_HAL_LPC17XX_PIN_OUT(B, 14, OPENDRAIN, NONE= ,=20 2MHZ);=20 // Turn the LED on=20 CYGHWR_HAL_LPC17XX_GPIO_OUT(v_led_ok, 1);=20 // Turn the LED off=20 CYGHWR_HAL_LPC17XX_GPIO_OUT(v_led_ok, 0);=20=20 diag_printf("DONE\n"); while(1) {;} return 0; } and, when I compile, the compiler give me this error: gpio.c:9: warning: implicit declaration of function =91CYGHWR_HAL_LPC17XX_GPIO=92 gpio.c:9: error: =91B=92 undeclared (first use in this function) gpio.c:9: error: (Each undeclared identifier is reported only once gpio.c:9: error: for each function it appears in.) gpio.c:9: error: =91OUT_2MHZ=92 undeclared (first use in this function) gpio.c:9: error: =91OUT_OPENDRAIN=92 undeclared (first use in this function) make: *** [gpio.o] Error 1 what should I change? Thanks a lot! -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss