Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/18/03 17:24
Read: times


 
#52805 - C question (bitfields, structures)
Hello!

I don't really know, if this is the right forum for this question: I'm programming an ARM7, and I defined my registers as bitfields (structures, where you can access to a defined area by ".").

E.g. I can access the field "EN" of the register "CONF" by typing CONF.EN
The structures are defined in a separate header file, and if i use it on just a normal C compiler, everything is fine.

My compiler doesn't accept this form of declaration - so at the moment I'm always defining the registers with their whole values. (what is not good, because I never want to define every value)

Do you have any idea how I can do a similar thing - to be able to access different "fields" within a register? I was thinking of an array or something like that, but i'm not that perfect in programming C - so that's why I ask you...

please help me, it's quite important (even if it's not 8051 but ARM....)!!

THANK YOU!!

Simone

List of 5 messages in thread
TopicAuthorDate
C question (bitfields, structures)            01/01/70 00:00      
   RE: C question (bitfields, structures)            01/01/70 00:00      
   RE: C question (bitfields, structures)            01/01/70 00:00      
      RE: C question (bitfields, structures)            01/01/70 00:00      
      RE: C question (bitfields, structures)            01/01/70 00:00      

Back to Subject List