I think "neat" was intended to be "near" On 6 July 2010 15:33, Peter wrote: > William "Chops" Westfield mac.com> writes: > > > volatile neat unsigned char *addr; > > > > Various C's are variously picky about having all those extra > > bits match up. You can also cast, but that would be evil. > > Some compilers (which?) support an extended notation like: > > #define LSFR ... > > unsigned int foo @ LSFR; > > And later foo can be used as usual. > > I can find no references on 'neat', do you have a pointer for documentation > on > that please? > > Also one tries to use a predefined type or such to avoid too much typing. > I think that it is also valid to use a #defined or inlined function to > represent > the hairy assignment. I.e. something like: > > #define fsrub(addr) (*((unsigned char*)addr)) > #define fsruw(addr) (*((unsigned short*)addr)) > ... > > Then one could write: > > fsrub(LFSR) = my_usqrt(fsrub(LFSR) + bias); ... > > Defining the above as functions during debug time can add the possibility > of > argument type and range checking, to be followed by recompilation with > suitable > #defined flags to use the presumably shorter #defined code. > > -- Peter > > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist