我的工作收尾小结

uint32_t cfg_read ( uint8_t mode , void **parma )
{
	uint32_t data = 0;
	case CFG_SYS_DEVICE_MODULE:
	{
	*parma = cfg.parm.deviceModuleSn;-->是一个数组uint8_t	deviceModuleSn[20]
									 -->log(DEBUG,"设备型号:%s\n" ,cfg.parm.deviceModuleSn);
									 -->uint8_t 	defaultDeviceModel[20]="M00101";这是缺损值 所以0位总是M
									 -->
										#define	DEVICE_NFC_TYPE_BIT				1
										#define DEVICE_NFC_TYPE_ST95			'0'--已经下架
										#define DEVICE_NFC_TYPE_ST25			'1'
										#define DEVICE_NFC_TYPE_NXP663P			'2'


										#define	DEVICE_BT_TYPE_BIT				2
										#define DEVICE_BT_TYPE_BM77				'0'
										#define DEVICE_BT_TYPE_BM78				'1'
										#define DEVICE_BT_TYPE_BB0906			'2'

										#define	DEVICE_NET_TYPE_BIT				3
										#define DEVICE_NET_TYPE_GPRS			'1'
										#define DEVICE_NET_TYPE_WIFI			'2'
										#define DEVICE_NET_TYPE_ETH				'3'
										组合:集合 
	}break;
	case CFG_SYS_RUN_MODULE:
	{
	data = info.runModule;-->是一个 uint32_t 				runModule;
						  -->	log(DEBUG,"设备运行模式=%d .\n" , info.runModule);
				          -->info.runModule|= NET_USE_GPRS;
				
				            #define	BT_USE_BM77			    1<<12
							#define	BT_USE_BB0906			1<<13
							#define	BT_USE_CC2640			1<<14


							#define	NFC_USE_NXP			    1<<7
							#define	NFC_USE_ST25			1<<8
							#define	NFC_USE_ST95			1<<9

							#define	NET_USE_GPRS			1<<0
							#define	NET_USE_WIFI			1<<1
							#define	NET_USE_ETH				1<<2
	}break;

	case CFG_SYS_DEVICE_TYPE:
	{
	data = cfg.parm.device_type;
							--> log(DEBUG,"设备类型 = [%d]\n",cfg.parm.device_type);
							-->cfg.parm.device_type = DEVICE_TYPE;默认是6写死的  设备类型  , 用于识别设备大类:具体见excel , TYPE=6为门禁设备
	}break;
	case CFG_SYS_DEVICE_NUM:
	{
	data = cfg.parm.deviceNum;
							--> log(DEBUG,"设备编号 = [%d]\n",cfg.parm.deviceNum);
							--> cfg.parm.deviceNum = DEVICE_NUM; 默认是217写死的   设备编号, 具体设备的详细编?
	}break;

	case CFG_SYS_DEVICE_NAME:
	{
	*parma = cfg.parm.deviceName;
							-->log(DEBUG,"设备蓝牙名称 = %s \n" ,cfg.parm.deviceName);
							-->#define		DEVICE_NAME			"CCYT"  
	}break;
}

小结:
	case CFG_SYS_DEVICE_MODULE:增加了几个!【BLE IOT】

	case CFG_SYS_RUN_MODULE:貌似没有用 本地使用的 没有互动


	case CFG_SYS_DEVICE_TYPE:不变

	case CFG_SYS_DEVICE_NUM:不变

	case CFG_SYS_DEVICE_NAME:蓝牙MAC修改了规则
	
结论:	CFG_SYS_DEVICE_MODULE需要平台知道新的设备型号 安卓手机蓝牙MAC失配


猜你喜欢

转载自blog.csdn.net/weixin_42381351/article/details/88016176
今日推荐