Hi All, I am trying to compile this pretty basic code and keep failing with an undefined reference to `test(ProtoCmds)' error. I've tried everything I can think of but keep failing as I am not big on C.. Any help would be highly appreciated!
main sketch:
#include "common.h"
int main (void)
{
test(PROTOCMD_INIT);
}
common.h:
#include <stdint.h>
#include <avr/io.h>
enum ProtoCmds {
PROTOCMD_INIT,
PROTOCMD_DEINIT,
PROTOCMD_BIND,
PROTOCMD_CHECK_AUTOBIND,
PROTOCMD_NUMCHAN,
PROTOCMD_DEFAULT_NUMCHAN,
PROTOCMD_CURRENT_ID,
PROTOCMD_SET_TXPOWER,
PROTOCMD_GETOPTIONS,
PROTOCMD_SETOPTIONS,
PROTOCMD_TELEMETRYSTATE,
};
extern const void *test(enum ProtoCmds cmd);
other.c:
#include "common.h"
const void *test(enum ProtoCmds cmd)
{
//do something
return 0;
}