Jasper, you'd be surprised how many incorrect comments I've seen over the years. I agree that finding them in an 'official' header file is rather surprising. And of course it raises questions about the correctness of the code they comment.
Usually, it comes from a bug or typo that has been corrected, but the comment didn't change with the code. In this case, I guess TASSEL0 and TASSEL1 values had been twisted. And instead of correcting the values, the names were changed, but not the comments belonging to the names. I've been sent lots of codes from people where there was a line like "P1DIR|=0x01; // switch P3.5 to output" and then came a request for analysis and help. So this line raises the question: is the comment right and the code wrong? Is the comment wrong and the code right? Are both wrong and this is the cause for failure? And of course I didn't have the schematics to check. Usually the comment was old, sometiems still from the original TI demo code that was copied and changed. So copy/paste errors are common too (and you can find a lot of them in the users guides too, especially in teh first releases). On the bottom line: if something isn't as you expect and the comments tell, check the comments for validity - or ignore them and check the code right away. And if you write comments yourself (which everyone should do), update them if you update the code. Then you can trust at least your own comnments :) JMGross ----- Ursprüngliche Nachricht ----- Von: Jasper Lievisse Adriaanse An: Eric Decker Gesendet am: 01 Okt 2011 10:59:07 Thanks for taking the time to explain this all for such a trivial find :-) I agree it's really a 'who-cares-matter', though it would be nice if TI could fix this trivial, yet incorrect comment. ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users