I developed an application on a Connect Wi-Me. Now the same application runs correctly also on a Connect Me (after selecting the right device on the my project) but only if I remove all calls to wireless driver functions: I obtain this with a simple preprocessor conditional directive.
I’d like to get the same result automatically: Is it possible to tell the code to include part of it depending on the specific device?
One of our engineers came up with the following code that will let you know which platform you are running on. This code will allow you make the determination to execute certain calls based on the platform. Below is an abbreviated root.c file showing how to setup the #define. You may still have to work out any possible build issues.
/* Copyright (c) 1996-2007 Digi International Inc., All Rights Reserved */
/* Code to start the user application goes here. */
printf ("Hello World!
printf("MY_BOARD is %x
printf("I am running on a ");
myPlatformType = NABspGetThisPlatformsId();
// use MY_BOARD to mask against what NABspGetThisPlatformsId returned.
// if myPlatformType is (in my case) an NS9360 processor running on an NS9360
// dev board, then I should get a match. Else, I'll hit the default
switch(myPlatformType & MY_BOARD)