mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
0862a3c512
Those macros are all about convenience. However, always using 64 bit makes casts nececcary that goes against the idea of having a convenience macro. E.g. when printing a frequency in KHZ one might want to do printf("freq: %lu kHz\n", freq / KHZ(1)); leads to an error > error: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'long long unsigned int' Now we would have to cast - `%llu` is not available with newlib-nano and wholly uneccecary. Only use 64 bit artithmetic where necessary (GHZ, GiB), not for smaller units. |
||
---|---|---|
.. | ||
units.h | ||
xtstr.h |