Hello
I'm implementing a proprietary communication protocol in Arduino, using libraries I got from my company's repository.
#include "crc.h"
unsigned char sequence[] = {0x15, 0x45, 0x01, 0x21, 0x00, 0xfe, 0x01};
unsigned short *crc;
unsigned short msgSize = 7;
void setup() {
// initialize serial:
Serial.begin(9600);
Serial.println("Alive");
// reserve 200 bytes for the inputString:
*crc = 0xFFFF; //initialize CRC
}
void loop() {
CRCRangeEx(sequence, crc, msgSize);
Serial.println(*crc);
}
When I try to compile the code above, I get the error:
CrcTest.ino:16: undefined reference to `CRCRangeEx(unsigned char*, unsigned short*, unsigned short)'
Here's my function signature from the .h file:
void CRCRangeEx(unsigned char*, unsigned short*, unsigned short);
I know Arduino found the files and my function is compiling because if I mess up the code inside CRCRangeEx I get compiling errors. I've used custom libraries before, but this is my first time "creating" one. What am I doing wrong here?