自己建的工程,编译时显示错误Fatal Error[Pe035]: #error directive: "Chip not supported!" D:\IARfor 8051\点到点通信\user\include\hal_board.h 27
Error while running C/C++ Compiler
请问大神这是什么原因,要怎么解决?
#include "hal_board.h"
#include "hal_int.h"
#include "hal_mcu.h"
#include "hal_rf.h"
#include "basic_rf.h"
#include "LCD.h"
#define RF_CHANNEL 25
#define PAN_ID 0x2011
#define SWITCH_ADDR 0x2530
#define LIGHT_ADDR 0xBEEF
#define APP_PAYLOAD_LENGTH 1
#define LIGHT_TOGGLE_CMD 0
#define FAILED 0
//应用状态
#define IDLE 0
#define SEND_CMD 1
//应用角色
#define NONE 0
#define SWITCH 1
#define LIGHT 2
#define APP_MODES 2
//按键
#define HAL_BUTTON_1 1
#define HAL_BUTTON_2 2
#define HAL_BUTTON_3 3
#define HAL_BUTTON_4 4
#define HAL_BUTTON_5 5
#define HAL_BUTTON_6 6
static uint8 pTxData[APP_PAYLOAD_LENGTH];
static uint8 pRxData[APP_PAYLOAD_LENGTH];
static basicRfCfg_t basicRfConfig;
extern void halboardinit(void);
extern void ctrPCA9554FLASHLED(uint8 led);
extern void ctrPCA9554LED(uint8 led,uint8 operation);
extern uint8 halkeycmd(void);
#ifdef SECURITY_CCM
static uint8 key[]={
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,
0xc8,0xc9,0xca, 0xcb,0xcc,0xcd, 0xce,0xcf,
};
#endif
static void appLight();
static void appSwitch();
static uint8 appSelectMode(void);
/*函数名称:appLght*/
static void appLight()
{
basicRfConfig.myAddr=LIGHT_ADDR;
if(basicRfInit(&basicRfConfig)==FAILED)
{
ctrPCA9554FLASHLED(5);
}
basicRfReceiveOn();
//Main loop
while (TRUE)
{
while(!basicRfPacketIsReady());
if(basicRfReceive(pRxData,APP_PAYLOAD_LENGTH,NULL)>0)
{
if(pRxData[0]==LIGHT_TOGGLE_CMD)
{
ctrPCA9554FLASHLED(1);
}
}
}
}
/*appSwitch*/
static void appSwitch()
{
pTxData[0]=LIGHT_TOGGLE_CMD;
basicRfConfig.myAddr=SWITCH_ADDR;
if(basicRfInit(&basicRfConfig)==FAILED)
{
ctrPCA9554FLASHLED(5);
}
basicRfReceiveOff();
//Main loop
while (TRUE)
{
if(halkeycmd()==HAL_BUTTON_4)
{
basicRfSendPacket(LIGHT_ADDR,pTxData,APP_PAYLOAD_LENGTH);
halIntOff();
halIntOn();
}
}
}
/*appSelectrMode*/
static uint8 appSelectMode(void)
{
uint8 key;
GUI_ClearScreen();
GUI_PutString5_7(25,6,"OURS-CC2530");
GUI_PutString5_7(10,22,"Device Mode:");
GUI_PutString5_7(10,35,"SW2->Light");
GUI_PutString5_7(10,48,"SW3->Switch");
LCM_Refresh();
do
{
key=halkeycmd();
}while(key==HAL_BUTTON_1);
if(key==HAL_BUTTON_2)
{
GUI_ClearScreen();
GUI_PutString5_7(25,6,"OURS-CC2530");
GUI_PutString5_7(10,22,"Device Mode:");
GUI_PutString5_7(10,35,"Light");
LCM_Refresh();
return LIGHT;
}
if(key==HAL_BUTTON_3)
{
GUI_ClearScreen();
GUI_PutString5_7(25,6,"OURS-CC2530");
GUI_PutString5_7(10,22,"Device Mode:");
GUI_PutString5_7(10,35,"Switch");
GUI_PutString5_7(10,48,"SW4 Send Command");
LCM_Refresh();
return SWITCH;
}
return NONE;
}
/*main*/
void main(void)
{
uint8 appMode=NONE;
basicRfConfig.panId=PAN_ID;
basicRfConfig.channel=RF_CHANNEL;
basicRfConfig.ackRequest=TRUE;
#ifdef SECURITY_CCM
basicRfConfig.securityKey=key;
#endif
halboardinit();
if(halRfInit()==FAILED)
{
ctrPCA9554FLASHLED(5);
}
ctrPCA9554FLASHLED(6);
GUI_PutString5_7(10,22,"Simple RF test");
GUI_PutString5_7(10,35,"SW1->Start");
LCM_Refresh();
while(halkeycmd()!=HAL_BUTTON_1);
halMcuWaitMs(350);
appMode==appSelectMode();
if(appMode==SWITCH)
{
ctrPCA9554LED(2,1);
appSwitch();
}
else if(appMode==LIGHT)
{
ctrPCA9554LED(3,1);
appLight();
}
} |
|