Hi George, I'm also not sure what is best. I try not to create too many redundant header files in order to keep things maintainable. But I also like all SFR's in one header file for easy comparison against the specs (datasheet). What I definitely do not like is different behaviour depending on predefined macros.
What I normally do is one header file per datasheet. Usually a datasheet contains info for several comparable derivatives which differ in supported peripherals. That means that the header file might define some SFR's that a particular derivative does not have. Maarten > Hello, Maarten. > > While I don't have strong feelings about this, I'm curious about the > reasoning behind your suggestion. Since those 5 are only present on the > cc2431, would it not make more sense to keep them separate? (I just had a > look at the Keil site and they appear to have done the same thing). > > Whatever works best for SDCC works for me too. If they are to go inside > cc2430.h, I would recommend something like 'cc2431 only' as part of the > comment line. > > Best Regards > George > > Maarten Brock wrote: >> Hi George, >> >> May I suggest that we include these lines in the current >> cc2430.h? >> >> Maarten >> >>> Hello all, >>> >>> I've written a mini header file with declarations for TI's cc2431 >>> RFRs. This 8051-based SoC is identical to the cc2430, enhanced with >>> a location engine. The loc. eng. is controlled through 5 new RFRs so >>> what I've done is, I've only declared those 5 and then included >>> cc2430.h for everything else (which in turn includes compiler.h for >>> us). >>> >>> It's based on the cc2431 data sheet (Rev. 2.01) SWRS034B: >>> http://focus.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=swrs034b >>> >>> I'm attaching it here with GPL+LE and happy for it to be distributed >>> with SDCC or for anyone to use. >>> >>> Hoping someone will find it handy. Best Regards > > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Sdcc-user mailing list > Sdcc-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sdcc-user > > ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user