|
@@ -1,46 +0,0 @@
|
|
|
-// // ******************************************************************
|
|
|
-// // /\ /| @File Constants.h
|
|
|
-// // \ V/ @Brief
|
|
|
-// // | "") @Author lijinwen, ghz005@uni-trend.com.cn
|
|
|
-// // / | @Creation 2024-05-17
|
|
|
-// // / \\ @Modified 2024-06-24
|
|
|
-// // *(__\_\
|
|
|
-// // ******************************************************************
|
|
|
-
|
|
|
-#pragma once
|
|
|
-#include <cstdint>
|
|
|
-
|
|
|
-namespace Protocol
|
|
|
-{
|
|
|
- //差分非对称长度比例阈值
|
|
|
- constexpr double USB_DIFF_LEN_DIFFERENCE_THRESHOLD = 0.95;
|
|
|
-
|
|
|
- //最小序列长度
|
|
|
- constexpr int32_t USB_MINIMUM_SEQUENCE_LENGTH = 12;
|
|
|
- //时域差异容差阈值
|
|
|
- constexpr double USB_TIME_DIFFERENCE_THRESHOLD = 0.28;
|
|
|
- //时域差异容差阈值
|
|
|
- constexpr double USB_TIME_DIFFERENCE_THRESHOLD_HIGH_SPEED = 0.36;
|
|
|
- //同步帧长度容差
|
|
|
- constexpr double USB_SYNC_BIT_TOL = 0.95;
|
|
|
- //同步帧长度
|
|
|
-
|
|
|
- //NRZI 连续补位/个数
|
|
|
- constexpr int32_t USB_NRZI_COMPLEMENT_PER_NUM = 6;
|
|
|
-
|
|
|
- constexpr int32_t USB_BYTE_BIT_COUNT = 8;
|
|
|
- constexpr double USB_LOW_SPEED_MHZ = 1.5;
|
|
|
- constexpr double USB_FULL_SPEED_MHZ = 12;
|
|
|
- constexpr double USB_HIGH_SPEED_MHZ = 480;
|
|
|
- //同步帧长度
|
|
|
- constexpr int32_t USB_USB_SYNC_BIT_MAX_LEN = 32;
|
|
|
- constexpr int32_t USB_USB_SYNC_BIT_NORMAL_SPEED_LEN = USB_BYTE_BIT_COUNT;
|
|
|
- constexpr int32_t USB_USB_SYNC_BIT_HIGH_SPEED_LEN = USB_USB_SYNC_BIT_MAX_LEN;
|
|
|
-
|
|
|
- constexpr int32_t USB_ADDR_BIT_COUNT = 7;
|
|
|
- constexpr int32_t USB_ENDPOINT_BIT_COUNT = 4;
|
|
|
- constexpr int32_t USB_FRAMEID_BIT_COUNT = 11;
|
|
|
- constexpr int32_t USB_CRC5_BIT_COUNT = 5;
|
|
|
- constexpr int32_t USB_CRC16_BIT_COUNT = 16;
|
|
|
-
|
|
|
-}
|