I need uint64_t variables to store time in seconds. It need to be capacious enough to store many years without overflow.
Does somebody have patch or idea for chprintf function to support "unsigned long long" type or "uint64_t"?
Current implementation of chprintf() in ChibiOS-2.4.6 does not understand such a type.
Here is example, which print "123456 0" instead of "123456 78":
Code: Select all
uint64_t time = 123456;
uint16_t other_var = 78;
chprintf((BaseSequentialStream *)&SD1, "%ld %d\n\r", time, other_var);
Second example, which print "ld 123456" instead of "123456 78":
Code: Select all
uint64_t time = 123456;
uint16_t other_var = 78;
chprintf((BaseSequentialStream *)&SD1, "%lld %d\n\r", time, other_var);
Any ideas?