[Tinyos Core WG] Re: AdcConfigure and struct return
David Gay
dgay42 at gmail.com
Fri Sep 22 04:16:56 PDT 2006
Random thought of the night, on this front: just go with the current
TEP, except drop the bit about adc_config_t being a structure. That
way developers who like structures can do:
typedef struct myadc_config *const adc_config_t;
and those who don't can write:
typedef uint16_t adc_config_t;
+ some chip-specific wrapping/extracting functions
in their chip-specific Adc.h file (which the TEP probably needs to
mention - one might want to use this adc_config_t type in random
places, so it needs to be in a well-defined .h file).
Btw, I'm confused by the type argument stuff in the TEP101 draft
(there's some unbound size_type usages in section 4, I'm not sure why
AdcConfigure needs a type argument, and if it does, it's unclear if
adc_config_t in section 4 is an unbound type parameter or a reference
to a chip-specific type - in the latter case, it's a bad idea to use
the same name as in AdcConfigure's definition).
Sleepless David
More information about the Tinyos-2.0wg
mailing list