Stupid error, probably

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Stupid error, probably

830 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by OXO on Wed Jun 20 04:48:25 MST 2012
I can't figure out what I've done wrong here.. looks like the type uint32_t is not recognised.

this is gpio.h:-

void GPIOSetValue(  uint32_t portNum,  uint32_t bitPos,  uint32_t bitVal);


and this is the error
 
X:\Projects\Products\VHP-1\Firmware\V1.0\VHP-1\driver/gpio.h:42:27: error: 
expected ')' before 'portNum'
0 Kudos
Reply
3 Replies

821 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed Jun 20 06:27:53 MST 2012

Quote: OXO
#include <stdint.h> fixes it, but I don't remember having to do this before..

(i'm not at home so can't check my other projects)...



Usually CMSIS projects include cr_startup_lpc176x.c with:[INDENT]
#if defined (__USE_CMSIS)
#include "system_LPC17xx.h"
#endif
[/INDENT]And system_LPC17xx.h is including:[INDENT]
#include <stdint.h>
[/INDENT]No magic
0 Kudos
Reply

821 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Wed Jun 20 05:48:25 MST 2012
You must do (unless you define the types yourself) - stdint.h is where all the 'portable' types are defined.
0 Kudos
Reply

821 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by OXO on Wed Jun 20 05:38:31 MST 2012
#include <stdint.h> fixes it, but I don't remember having to do this before..

(i'm not at home so can't check my other projects)...
0 Kudos
Reply