I have tried both both capitalized and both lower case so it appears that it ltoBCD isn't available.
And I haven't been able to get it to give me ltoa either.
- Code: Select all
#include <xc.h>
#include <stdio.h>
#include <stdlib.h>
// from stdlib.h "extern char * ltoa(long val, char * buf);"
char Display_Buff[13];
int Display_Convert(long input_data) {
char *char_ptr = &Display_Buff;
ltoa(input_data, char_ptr);
}
In the stdlib.h here is the lines:
#ifdef __18CXX
extern char * ltoa(long val, char * buf);
extern char * ultoa(unsigned long val, char * buf);
#else
extern char * ltoa(char * buf, long val, int base);
extern char * ultoa(char * buf, unsigned long val, int base);
#endif
Since this is a PIC18 I would assume that it would use the first definition but it appears to wants the second.
So if that's so how is "base" defined?
The error messages are:
Converter.c:17: warning: (357) illegal conversion of integer to pointer
Converter.c:17: warning: (358) illegal conversion of pointer to integer
Converter.c:17: error: (187) too few function arguments