lpcware

GPIO.C file for LPC1317

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by Deepak Bansal on Tue Sep 11 22:28:08 MST 2012
I have GOPI.c file for LPC1343,.
But I want to use it for LPC1317, so I added same file gpio.c without any change:
I have to make some changes in gpio.c for LPC1317 but I don't know what are they
I am using Keil v.4.54

Following error comes when I build using LPC1317. Build using LPC1343 works fine:

[B]Rebuild target 'Target 1'
compiling gpio.c...
.\header\gpio.h(28): error:  #79: expected a type specifier
.\header\gpio.h(28): error:  #145: function "LPC_GPIO_TypeDef" may not be initialized
.\header\gpio.h(28): error:  #29: expected an expression
source\gpio.c(149): error:  #20: identifier "EINT0_IRQn" is undefined
source\gpio.c(150): error:  #20: identifier "EINT1_IRQn" is undefined
source\gpio.c(151): error:  #20: identifier "EINT2_IRQn" is undefined
source\gpio.c(152): error:  #20: identifier "EINT3_IRQn" is undefined
source\gpio.c(176): error:  #20: identifier "LPC_GPIO0" is undefined
source\gpio.c(184): error:  #20: identifier "LPC_GPIO0" is undefined
source\gpio.c(193): error:  #20: identifier "LPC_GPIO1" is undefined
source\gpio.c(201): error:  #20: identifier "LPC_GPIO1" is undefined
source\gpio.c(210): error:  #20: identifier "LPC_GPIO2" is undefined
source\gpio.c(218): error:  #20: identifier "LPC_GPIO2" is undefined
source\gpio.c(227): error:  #20: identifier "LPC_GPIO3" is undefined
source\gpio.c(235): error:  #20: identifier "LPC_GPIO3" is undefined
source\gpio.c(261): error:  #20: identifier "LPC_GPIO0" is undefined
source\gpio.c(264): error:  #20: identifier "LPC_GPIO1" is undefined
source\gpio.c(267): error:  #20: identifier "LPC_GPIO2" is undefined
source\gpio.c(270): error:  #20: identifier "LPC_GPIO3" is undefined
source\gpio.c(292): error:  #20: identifier "LPC_GPIO0" is undefined
source\gpio.c(295): error:  #20: identifier "LPC_GPIO1" is undefined
source\gpio.c(298): error:  #20: identifier "LPC_GPIO2" is undefined
source\gpio.c(301): error:  #20: identifier "LPC_GPIO3" is undefined
source\gpio.c(325): error:  #20: identifier "LPC_GPIO0" is undefined
source\gpio.c(329): error:  #20: identifier "LPC_GPIO1" is undefined
source\gpio.c(333): error:  #20: identifier "LPC_GPIO2" is undefined
source\gpio.c(337): error:  #20: identifier "LPC_GPIO3" is undefined
source\gpio.c(360): error:  #20: identifier "LPC_GPIO0" is undefined
source\gpio.c(363): error:  #20: identifier "LPC_GPIO1" is undefined
source\gpio.c(366): error:  #20: identifier "LPC_GPIO2" is undefined
compiling io.c...
.\header\gpio.h(28): error:  #79: expected a type specifier
.\header\gpio.h(28): error:  #145: function "LPC_GPIO_TypeDef" may not be initialized
.\header\gpio.h(28): error:  #29: expected an expression
assembling startup_LPC13Uxx.s...
compiling core_cm3.c...
compiling system_LPC13Uxx.c...
Target not created[/B]

Outcomes