This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bit Fields




Is there a way to dynamically define bit fields in a integer?

I know how to define them in code, but how can it be done for purposes of 
reading in a file that would be easier to deal with if there was a way to 
do this.

Basically, read in a file describing internal registers of a micro 
controller of some sort, and have the bit fields to designate the different 
functions of some of the bits.

I know this can be done via a mask, but I would like to know if this is 
possible?

Thanks,

Matt Minnis


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]