Hello,
I would like to print signed long long int (s64_t ) values using printk or printf.
I tried some suggestions I found online %lli , %lld but they did not work.
Please advise.
Thank you.
Kind regards
Mohamed
Hello,
I would like to print signed long long int (s64_t ) values using printk or printf.
I tried some suggestions I found online %lli , %lld but they did not work.
Please advise.
Thank you.
Kind regards
Mohamed
Hi,
With ncs v1.5.0-rc1 (with minimal lib c), it should print 64 bit numbers using printk(). I added this to the hello_world sample:
int64_t long_num = 0x10000000000; printk("%lli\n", long_num);
And it prints:
Hello World! nrf9160dk_nrf9160 1099511627776
Which tag are you on?
Kind regards,
Håkon
Thank you Hakon,
Yes, it works with int64_t type but for some reason it did not work with s64_t type which is what I was using when I posted my ticket.
Kind regards
Mohamed
Thank you Hakon,
Yes, it works with int64_t type but for some reason it did not work with s64_t type which is what I was using when I posted my ticket.
Kind regards
Mohamed