📄 slbud.hec
字号:
#ifndef SLBUD_HEC
#define SLBUD_HEC
/* Module version */
#define SL_VERSION_SLBUD 0x00000436
/* include CVI version in revision MSB */
#if (_CVI_ == 501)
#define SL_REVISION_SLBUD_TEMP 0x50100000
#endif /* _CVI_ == 501 */
#if (_CVI_ == 550)
#define SL_REVISION_SLBUD_TEMP 0x55000000
#endif /* _CVI_ == 550 */
#if (_CVI_ == 551)
#define SL_REVISION_SLBUD_TEMP 0x55100000
#endif /* _CVI_ == 551 */
#if (_CVI_ == 600)
#define SL_REVISION_SLBUD_TEMP 0x60000000
#endif /* _CVI_ == 600 */
#define SL_REVISION_SLBUD (SL_REVISION_SLBUD_TEMP | 0x00000000)
/*************************************/
/* Error code values */
/* Those error MUST be superior to 0x80 */
/* Except the SL_ERROR_NONE */
/* To prevent mix with TAT error under 0x80 */
/*************************************/
#define SL_ERROR_NONE 0x00 /* No error */
#define SL_ERROR_READFILE 0x81 /* Error reading from file or com */
#define SL_ERROR_WRITEFILE 0x82 /* Error writing to file or com */
#define SL_ERROR_OL_RESULT 0x83 /* Error getting overlapped result */
#define SL_ERROR_EVENT 0x84 /* Error creating event */
#define SL_ERROR_MASK 0x85 /* Error Setting com mask */
#define SL_ERROR_WAIT_EV 0x86 /* Error waiting event */
#define SL_ERROR_WAIT_OBJ 0x87 /* Error waiting object */
#define SL_ERROR_UNK_STA 0x88 /* Error unknown state in switch/case */
#define SL_ERROR_UNK_EV 0x89 /* Error unknown event */
#define SL_ERROR_TX_INC 0x8A /* Error Tx incomplete */
#define SL_ERROR_OPENFILE 0x8B /* Error opening file or com */
#define SL_ERROR_CLOSEFILE 0x8C /* Error closing file or com */
#define SL_ERROR_ALLOC 0x8D /* Error allocationg memory */
#define SL_ERROR_PROC_EV 0x8E /* Error processing events */
#define SL_ERROR_NO_MESS 0x8F /* Error no rec messages */
#define SL_ERROR_UIR 0x90 /* Error refreshing uir */
#define SL_ERROR_COM_PORT 0x91 /* Error refreshing uir */
#define SL_ERROR_THREAD_EX 0x92 /* Error thread already exists */
#define SL_ERROR_COM_OPEN 0x93 /* Error com is already opened */
#define SL_ERROR_COM_SET 0x94 /* Error setting com config */
#define SL_ERROR_COM_EVENT 0x95 /* Com event error occured (framing, overrun or parity) */
#define SL_ERROR_ABORTED 0xAB /* Error com thread aborted */
#define SL_ERROR_UNKNOWN_BLOCKING 0xB0 /* Error no Blocking defense */
#define SL_ERROR_NO_BLOCKING 0xB1 /* Error no Blocking defense */
#define SL_ERROR_BLOCKING 0xBD /* Error Blocking defense */
#define SL_ERROR_RX_TO 0xC0 /* Error Rx Timeout */
#define SL_ERROR_TX_TO 0xC1 /* Error Tx Timeout */
#define SL_ERROR_CHKS 0xC2 /* Error in checksum */
#define SL_ERROR_LGTH 0xC3 /* Error in length */
#define SL_ERROR_TX_FLOW_CONTROL 0xC4 /* Error Tx Flow Control Timeout */
#define SL_ERROR_GENERIC 0xFF /* Error GENERIC */
/************************************************************************/
/* Obsolete error define codes to be suppressed, for compatibility only */
/************************************************************************/
#define SL_IPEATIO1_NO_ERROR SL_ERROR_NONE
#define SL_IPEATIO1_TIME_OUT_ERR SL_ERROR_RX_TO
/*************************************/
/* reception modes */
#define SL_MODE_AUTOTEST 0
#define SL_MODE_USERMODE SL_MODE_AUTOTEST + 1
#define SL_MODE_DOWNLOAD SL_MODE_USERMODE + 1
#define SL_MODE_TRACMODE SL_MODE_DOWNLOAD + 1
/* Serial cable recognition */
#define SL_CABLE_RECO_NOT_DONE 0
#define SL_MODEL_SHOP_CABLE 1
#define SL_DATA_CABLE 2
#define SL_PROD_OR_UNKNOWN_CABLE 3
/* Init bytes for mobile */
#define SL_INIT_BYTE49 0x49
#define SL_INIT_BYTECC 0xCC
#define SL_INIT_BYTE28 0x28
#define SL_INIT_BYTEEB 0xEB
#define SL_INIT_BYTEBE 0xBE
/* Mode bytes for mobile */
#define SL_MODE_BYTE4F 0x4F
#define SL_MODE_BYTE58 0x58
#define SL_MODE_BYTE59 0x59
#define SL_MODE_BYTE61 0x61
#define SL_MODE_BYTE69 0x69
#define SL_MODE_BYTEBC 0xBC
#define SL_MODE_BYTEB0 0xB0
#define SL_MODE_BYTECB 0xCB
/* Bad defines, keep only for compatibilty, do no more use */
/* use 'SL_MODE_xx' with same value instead */
#define SL_INIT_BYTECB 0xCB
#define SL_INIT_BYTEBC 0xBC
/* Uart configuration */
#define SL_COM_RATE038 38400
#define SL_COM_RATE115 115200
#define SL_UART_BYTESIZE 8
#define SL_UART_BITSTOP 0
#define SL_DEFAULT_COM_PORT 1
#define SL_IPEATIO2_NO_PARITY 0
#define SL_IPEATIO2_ODD_PARITY 1
#define SL_IPEATIO2_EVEN_PARITY 2
/* SL configuration/parameters */
#define SL_LEN_ALL 0xFFFF
#define SL_TRAN_ALL 0xFFFF
#define SL_REC_ALL 0xFFFF
#define SL_TYPE_ALL 0xFFFF
#define SL_NB_MAX_MESSAGE 20
#define SL_NB_COM_IN_PARALLEL 32
#define SL_UART_BUFFERIN 32768
#define SL_UART_BUFFEROUT 32768
#define SL_AUTOTEST_97 3
#define SL_TRACE_98 2
/*EMISSION OR RECEPTION ON THE SERIAL LINK*/
typedef enum serial_link_direction
{
SL_IPEATIO1_RECEPTION, /*Mobile to PC*/
SL_IPEATIO1_EMISSION, /*PC to Mobile*/
SL_IPEATIO1_NOTRANSMIT /*No exchange*/
}direction;
/*FORMAT ON THE SERIAL LINK*/
typedef enum
{
SL_IPEATIO1_PCX,
SL_IPEATIO1_BUD
} format;
/* constants used to test intensively 2 parallel inits piloted by COM DTR + relay */
#define SL_TIMER2_INACTIVE 0
#define SL_TIMER2_ARMED 1
#define SL_TIMER2_DISARMED 2
#define SL_TIMER2_MOBILEON 3
/* For endianness management */
#define SL_LITTLE_ENDIAN 0
#define SL_BIG_ENDIAN 1
#define SL_DEFAULT_ENDIANNESS SL_BIG_ENDIAN
#endif /* SLBUD_HEC */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -