I use this test main: #include <cyg/infra/diag.h> #include <cyg/hal/var_io.h>
int main (void) { diag_printf("setting gpio\n"); cyg_uint32 v_led_ok = CYGHWR_HAL_LPC17XX_PIN_OUT(B, 14, OPENDRAIN, NONE, 2MHZ); // Turn the LED on CYGHWR_HAL_LPC17XX_GPIO_OUT(v_led_ok, 1); // Turn the LED off CYGHWR_HAL_LPC17XX_GPIO_OUT(v_led_ok, 0); 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 ‘CYGHWR_HAL_LPC17XX_GPIO’ gpio.c:9: error: ‘B’ 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: ‘OUT_2MHZ’ undeclared (first use in this function) gpio.c:9: error: ‘OUT_OPENDRAIN’ undeclared (first use in this 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