ardupilot/libraries/Desktop/support/ultoa_invert.c

13 lines
227 B
C
Raw Normal View History

#include <stdio.h>
char * __ultoa_invert(unsigned long val, char *s, int base)
{
switch (base) {
case 8:
return s+sprintf(s, "%lo", val);
case 16:
return s+sprintf(s, "%lx", val);
}
return s+sprintf(s, "%lu", val);
}