"Garrett D'Amore" <[EMAIL PROTECTED]> wrote: > > - You take care about Bit-ordering (this may be different from Byte-order > > see Plan 9 compiler...) > > > > Yeah, I don't like to rely on ordering of the bits within the C > structure. C structures are fine for bit fields used only by software, > but when the intent is to define a mapping to hardware registers, I find > that #define's are a lot more portable. > > And like Jim said, I usually just set up the defines for my hardware > once, and forget about them. I rarely use special macros.
If you write code for one specific piece of hardware you may be right, if you like to create a framework for a huge bunch of devices like SCSI, things look different. Code should also be readable, in special if you would have to read 50-100 different command reference manuals for vendor unique commands from different CD/DVD/BD drives in order to understand the code. Jörg -- EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin [EMAIL PROTECTED] (uni) [EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily _______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code