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

ROUSSEL Kévin Kevin.Roussel at inria.fr
Mon Feb 24 12:52:13 CET 2014


I understand why it was done that way. But what do you think about my 
proposal: do you think too that switching on fixed-size types is a good 
thing, or would you stick with generic types?


Le 12/02/2014 11:36, Kaspar Schleiser a écrit :
> 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
> _______________________________________________
> devel mailing list
> devel at riot-os.org
> http://lists.riot-os.org/mailman/listinfo/devel


      Kévin Roussel
      Doctorant, projet LAR
      Équipe MADYNES, INRIA Nancy Grand-Est / LORIA
      Tél. : +33 3 54 95 86 27
      Kevin.Roussel at inria.fr

More information about the devel mailing list