From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21807 invoked by alias); 14 Mar 2013 19:59:13 -0000 Received: (qmail 21787 invoked by uid 22791); 14 Mar 2013 19:59:12 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_THREADED,NML_ADSP_CUSTOM_MED,SPF_NEUTRAL X-Spam-Check-By: sourceware.org Received: from sam.nabble.com (HELO sam.nabble.com) (216.139.236.26) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Mar 2013 19:59:07 +0000 Received: from tom.nabble.com ([192.168.236.105]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1UGEIt-0007KX-BV for ecos-discuss@ecos.sourceware.org; Thu, 14 Mar 2013 12:59:07 -0700 Date: Thu, 14 Mar 2013 19:59:00 -0000 From: EnneGi To: ecos-discuss@ecos.sourceware.org Message-ID: <1363291147348-225465.post@n7.nabble.com> In-Reply-To: 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> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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] Re: How to create a GPIO driver X-SW-Source: 2013-03/txt/msg00048.txt.bz2 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, NON= E,=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 =E2=80=98CYGHWR_HAL_LPC17XX_GPIO=E2=80=99 gpio.c:9: error: =E2=80=98B=E2=80=99 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: =E2=80=98OUT_2MHZ=E2=80=99 undeclared (first use in this f= unction) gpio.c:9: error: =E2=80=98OUT_OPENDRAIN=E2=80=99 undeclared (first use in t= his function) make: *** [gpio.o] Error 1 what should I change? Thanks a lot! -- View this message in context: http://sourceware-org.1504.n7.nabble.com/How-= to-create-a-GPIO-driver-tp224910p225465.html Sent from the Sourceware - ecos-discuss mailing list archive at Nabble.com. -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss