Hi,
I’m trying to use RLP to get the state of a particular input pin. The code I have so far is as follows:
#include "RLP.h"
int ReadDataInput(unsigned int *generalArray, void **args, unsigned int argsCount, unsigned int *argSize)
{
if(RLPext->GPIO.ReadPin(27) == true)
{
return 1;
}
else
{
return 0;
}
}
When I try and compile it I get the following error:
C:\rlp>make
rm *.o ./Output/*.elf ./Output/*.map
rm: cannot remove `*.o': No such file or directory
make: [clean] Error 1 (ignored)
arm-none-eabi-gcc -c -o RLP_GPIO.o RLP_GPIO.c
RLP_GPIO.c: In function 'ReadDataInput':
RLP_GPIO.c:10:5: error: 'RLP_ADDRESS' undeclared (first use in this function)
RLP_GPIO.c:10:5: note: each undeclared identifier is reported only once for each
function it appears in
RLP_GPIO.c:10:5: error: 'RLP_SIZE' undeclared (first use in this function)
RLP_GPIO.c:10:33: error: 'true' undeclared (first use in this function)
make: *** [RLP_GPIO.o] Error 1
It seems to me that the RLPext structure maybe has to be initialised first before use? Does anyone know what I’m doing wrong?
Thanks