# select Connect Me or Connect Wi Me

**URL:** <https://forums.digi.com/t/select-connect-me-or-connect-wi-me/3577>\
**Category:** NET+OS\
**Tags:** hardware\
**Created:** [September 8, 2009, 2:49pm UTC](https://forums.digi.com/t/select-connect-me-or-connect-wi-me/3577 "2009-09-08T14:49:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![maumau](https://avatars.discourse-cdn.com/v4/letter/m/df788c/32.png) [@maumau](https://forums.digi.com/u/maumau)\
**Post date:** [September 8, 2009, 2:49pm UTC](https://forums.digi.com/t/select-connect-me-or-connect-wi-me/3577/1 "2009-09-08T14:49:41Z")

</div>

Hi to everyone,

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?

thanks  
maumau

---

<div class="post-metadata">

**Author:** ![maumau](https://avatars.discourse-cdn.com/v4/letter/m/df788c/32.png) [@maumau](https://forums.digi.com/u/maumau)\
**Post date:** [September 9, 2009, 10:22am UTC](https://forums.digi.com/t/select-connect-me-or-connect-wi-me/3577/2 "2009-09-09T10:22:23Z")

</div>

Plaese, can anyboby help me?

thanks

---

<div class="post-metadata">

**Author:** ![sbrown](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@sbrown](https://forums.digi.com/u/sbrown)\
**Post date:** [September 13, 2009, 6:03pm UTC](https://forums.digi.com/t/select-connect-me-or-connect-wi-me/3577/3 "2009-09-13T18:03:57Z")

</div>

Hi,

One of our engineers came up with the following code that will let 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 set it up.

To be included in the root.c file:

#include  
#include  
#include  
#include “appconf.h”  
#include “bsp\_api.h”  
#include “platformCodes.h”

#define MY\_BOARD ((0x80000000) | (BSP\_BOARD\_SHIFT(BSP\_BOARD\_NS9360)) | (BSP\_PROCESSOR\_SHIFT(BSP\_PROCESSOR\_NS9360)) | (BSP\_REVISION\_SHIFT(0)) | (BSP\_RAM\_SHIFT(0)))

void applicationStart (void)  
{  
unsigned long myPlatformType = 0;

/\* Code to start the user application goes here. \*/

printf ("Hello World!  
");

printf("MY\_BOARD is %x  
", MY\_BOARD);  
printf("I am running on a ");  
myPlatformType = NABspGetThisPlatformsId();

// use MY\_BOARD to mask against what NABspGetThis-  
// PlatformsId returned. if myPlatformType is (in my  
// case) an NS9360 processor running on an NS9360  
// dev board, then you should get a match. Else,  
// you will hit the default.

switch(myPlatformType & MY\_BOARD)  
{  
case MY\_BOARD:  
printf("NS9360  
");  
break;  
default:  
printf("unknown %x  
", myPlatformType);  
break;  
}

printf("end of test  
“);  
printf(”  
");

tx\_thread\_suspend(tx\_thread\_identify());  
}
