![]() |
|
QA: How can I detect XScale?
By Nicholas Tsipanov, October 11, 2002.
QuestionI want to add some XScale specific code. How can I determine if my program is running on XScale processor? AnswerFirst you need some definitions that are not included in Pocket PC SDK, but you can find it in <pkfuncs.h> file from the Platform Builder. Here I presented a small excerpt from <pkfuncs.h> needed for my code to compile: The code itself is simple and straightforward. Please use the following: You will get a string with the processor type description in pi.szProcessorName. There are two XScale type processors out there used by Pocket PC OEMs (PXA210 and PXA 250) currently, so you can simply search for a substring "PXA" in the strings pi.szProcessCore and pi.szProcessorName, because some devices return processor name in the szProcessorName (like Toshiba e740 and iPAQ 39xx), and others - in the string szProcessCore (like Pocket Loox). You can download sources of a simple application, which determines whether you're running on XScale or not (16140b, Zipped).
Related resources:
DiscussDiscuss this article. Here you can write your comments and read comments of other developers. |
|||||||||||||||||||||