Content originally posted in LPCWare by Smitjs on Thu Jun 23 19:12:17 MST 2011
Using LPC11C14, losing 2 IO pins because LPC1114 was not available.
I am totally new to LPCXpresso, and obviously my C knowledge is lacking.
1. How to get rid of the welcome screen? I know it has been fully registered by now.
2. I imported the blinky example to another directory I need to
work in. Then to use CMSIS is a dark mystery.
Where in the directory structure must which files of CMSIS be?
I rather imported the CMSIS c and h files into the project src directory.
3. Now I can compile without errors, and the problem starts.
I tried to add another c file to test GPIOsetValue:
#ifndef __GPIO_H
#include "gpio.h"
#endif
extern void GPIOSetValue( uint32_t portNum, uint32_t bitPosi, uint32_t bitVal );
GPIOSetValue( LED_PORT, LED_BIT, LED_ON );
Then get the following errors:
../src/Slave.c:13: warning: data definition has no type or storage class
../src/Slave.c:13: warning: type defaults to 'int' in declaration of 'GPIOSetValue'
../src/Slave.c:13: warning: parameter names (without types) in function declaration
../src/Slave.c:13: error: conflicting types for 'GPIOSetValue'
../src/gpio.h:22: error: previous declaration of 'GPIOSetValue' was here
make: *** [src/Slave.o] Error 1
GPIOSetValue is declared in gpio.h
void GPIOSetValue( uint32_t portNum, uint32_t bitPosi, uint32_t bitVal );
GPIOSetValue is declared once only, and should be visible in slave.c.
Please solve this mysterious puzzle.
Thank you
Johan Smit