18 March 2006
More ways to map memory
by YukuanMarkThis is the third in a series of articles on accessing memory-mapped device registers using C and C++. In my previous column (November 2004), I discussed how small variations in memory-mapping techniques might lead to differences in the efficiency of comp
Place volatile accurately
by YukuanMarkIn my last column, I advised you to use the volatile qualifier, but use it judiciously.1 This month, I'll present some specific situations to show why and how you should think carefully about exactly where to place the volatile keyword in declarations.
24 January 2006
Learn a new trick with the offsetof() macro
by YukuanMarkAlmost never used, the offsetof() macro can actually be a helpful addition to your bag of tricks. Here are a couple of places in embedded systems where the macro is indispensable—packing data structures and describing how EEPROM data are stored.
1
(3 marks)