Application file - main.c
#include "EO3100I_API.h"
#include "EO3100I_CFG.h"
#define led_on(); io_setDigital(ADIO_7,1);
#define led_off(); io_setDigital(ADIO_7,0);
code uint8 VERSION_APP[] = {0xE0,'V','E','R','S','I','O','N',1,0,1,1,'A','A','D','T','S','E','N','S','O','R',0x00,0xE0};
void main()
{
uint32 u32MyId;
uint32 *pID;
uint8 u8SrcIdLength;
uint8 u8DstIdLength;
mainInit();
rTelTx.raw.
bytes[5] = 0x09;
while (1)
{
continue;
pID = (uint32*)
misc_getID2(&rTelRx, &u8SrcIdLength, &u8DstIdLength);
if (u8DstIdLength == 4 && *(pID+1) == u32MyId)
{
led_on();
led_off();
}
}
}
Config file - EO3100I_CFG.h
#ifndef _EO3100I_CFG_H_INCLUDED
#define _EO3100I_CFG_H_INCLUDED
void startupInit();
void mainInit();
#define RADIO_BUFF_NUM 10
#define RADIO_MATURITY_TIME 100
#define FILTER_NUM 1
extern volatile uint32 xdata u32gFilterValue[FILTER_NUM];
extern volatile uint8 xdata u8gFilterCfg[FILTER_NUM];
extern uint8 code io_param[];
#endif //_EO3100I_CFG_H_INCLUDED
Config file - EO3100I_CFG.c
#include "EO3100I_API.h"
#include "EO3100I_CFG.h"
void startupInit()
{
}
void mainInit()
{
}
volatile uint32 xdata u32gFilterValue[FILTER_NUM];
volatile uint8 xdata u8gFilterCfg[FILTER_NUM];
uint8 code io_param[] = {
0x07,
0x00,
0x0F,
0x00,
0x00,
0x00,
0x00,
0x03,
0x80,
0x7F,
0x0C,
0x00,
0x00,
0x00,
0x00,
};