i am trying to make an aplication where i integrate rfid reader and an LCD, i have acomplished this by two different libraries, wiringPi for LCD and i found a library called rc522 for the rfid. and apart from each other they work great.
The problem is when i try to mix both together, i get compiler errors.
In file included from main.c:20:0: /usr/local/include/wiringPi.h:216:21: error: conflicting types for ‘bcm2835_delayMicroseconds’ bcm2835.h:912:17: note: previous declaration of ‘bcm2835_delayMicroseconds’ was here
and I found this on the header file, but i have defined it and yet wont work.
// Historical name compatibility #ifndef BCM2835_NO_DELAY_COMPATIBILITY #define delay(x) bcm2835_delay(x) #define delayMicroseconds(x) bcm2835_delayMicroseconds(x) #endif
So i tried comenting this out and was able to compile without errors, but now, when i do lcdClear() from the lcd library on wiringPi i get some weird characters written instead of erasing the lcd screen.
What can i do with this? am i missing something? should i not use both libraries?
This is extra info on the bcm2835:
/// \version 1.10 Changed the names of the delay functions to bcm2835_delay() /// and bcm2835_delayMicroseconds() to prevent collisions with wiringPi. /// Macros to map delay()-> bcm2835_delay() and /// Macros to map delayMicroseconds()-> bcm2835_delayMicroseconds(), which /// can be disabled by defining BCM2835_NO_DELAY_COMPATIBILITY