select Connect Me or Connect Wi Me

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

Plaese, can anyboby help me?

thanks

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());
}