[riot-devel] Use fixed size types in 'hwtimer_arch' function signatures

Kaspar Schleiser kaspar at schleiser.de
Wed Feb 12 11:36:53 CET 2014


Hi,

On 02/12/14 10:18, ROUSSEL Kévin wrote:
> Indeed, it depends on the use case.
>
> In the case of the 'hwtimer_arch' functions, we have two situations:
>
> * the definition of a counter value (be it absolute or relative) which
> is currently implemented as an 'unsigned long' ; since we want to keep
> high precision (that is: high frequency) while allowing for long enough
> delays to be specified, I propose to stick on 32-bit values (==> use
> 'uint32_t')
We used non-specific types for holding timer values so we can use the 
same code for timers which use 16bit counters (e.g., msp430?). For some 
reason I assumed that timer width corresponds to word size of a platform...

Kaspar


More information about the devel mailing list