Application file - main.c
#include "EO3100I_API.h"
#include "EO3100I_CFG.h"
code uint8 VERSION_APP[] = {0xE0,'V','E','R','S','I','O','N',1,0,1,0,'A','V','L','D','-','T','x','D','e','m','o',0x00,0xE0};
#define MY_DATA_LEN (6)
#define MY_TELEGRAM_LEN (MY_DATA_LEN + 7) // 7 byte (1(u8Choice)+4(u32Id)+1(u8Status)+1(u8Chk))
void main()
{
struct myRadioType{
uint8 u8Data[MY_DATA_LEN];
uint32 u32Id;
uint8 u8Status;
uint8 u8Chk;
uint8 u8Length;
}myRT;
uint32 u32MyId;
mainInit();
myRT.u32Id = u32MyId;
myRT.u8Status = 0x30;
myRT.u8Length = MY_TELEGRAM_LEN;
myRT.u8Data[0]= 0x10;
myRT.u8Data[1]= 0x20;
myRT.u8Data[2]= 0x30;
myRT.u8Data[3]= 0x40;
myRT.u8Data[4]= 0x50;
myRT.u8Data[5]= 0x60;
while(1)
{
}
}
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,
0x00,
0xFF,
0x0C,
0x00,
0x00,
0x00,
0x00,
};