sop板
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

91 lines
1.9 KiB

//////////////////////////////////////////////////////////////////////////
/// COPYRIGHT NOTICE
/// Copyright (c) 2018, 传控科技
/// All rights reserved.
///
/// @file tpc_fsk.c
/// @brief transaction protocol control of fsk
///
///(本文件实现的功能的详述)
///
/// @version 1.1 CCsens technology
/// @author CC
/// @date 20150102
///
///
/// @version 1.2 CCsens technology
/// @author CC
/// @date 20180308
/// @info 整理
//
//////////////////////////////////////////////////////////////////////////
#ifndef __TPC_DEBUG_H_
#define __TPC_DEBUG_H_
#include "tpc_x.h"
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
//定长协议:长度固定为5个字节
//eg: F1 01 02 03 06
typedef struct
{//8byte
vU8 filter;
vU8 R1;
vU8 R2;
vU8 R3;
vU8 ocr;
}TS_P_debug;
#define TPC_NFC_DAT_MAX 16
typedef struct _tpc_nfc_
{
U8 head;
U8 slaveId;
U8 num[2];
U8 cmd;
U8 buf[TPC_NFC_DAT_MAX];
U8 ocr;
}TPC_NFC;
#define TPC_RFID_DAT_MAX 32
typedef struct _tpc_rfid_
{
U8 head;
U8 type;
U8 cmd;
U8 num[2];
U8 buf[TPC_RFID_DAT_MAX];
U8 ocr;
U8 tail;
}TPC_RFID;
#define TPC_RS485_DAT_MAX 32
typedef struct _tpc_rs485_
{
U8 head[2];
U8 slaveId;
U8 cmd;
U8 num[2];
U8 buf[TPC_RS485_DAT_MAX];
U8 ocr;
}TPC_RS485;
#define D_HETU_FX_buf_max 5 //定长协议 长度为5
#define D_HETU_FX_fi 0x60
extern void L1_s2b_debug(Ts_uart_recv_buf *p);
extern void L1_s2b_nfc (Ts_uart_recv_buf *p);
extern void L1_s2b_rfid (Ts_uart_recv_buf *p);
extern void L1_s2b_rs485 (Ts_uart_recv_buf *p);
extern void L1_s2b_PH1 (Ts_uart_recv_buf *p);// reentrant;
#endif /* end __TPC_DEBUG_H_ */
/*****************************************************************************
** End Of File
******************************************************************************/