DeviceAndHostCommunication_H.h
上传用户:gxz1972
上传日期:2019-09-13
资源大小:323k
文件大小:2k
源码类别:
传真(Fax)编程
开发平台:
C/C++
- //-----------------------------------------------------------------------------
- // nRF2401RX_H.h
- //-----------------------------------------------------------------------------
- // Copyright 2007 Vson Technology, Inc.
- // http://www.usbmcu.com
- //
- // Program Description:
- //
- //
- //
- //
- //
- // MCU: C8051F347
- // Tool chain: Keil C51 7.50 / Keil EVAL C51
- // Silicon Laboratories IDE version 2.6
- // Command Line:
- // Project Name: TR1000
- //
- //
- // Release 1.0
- // -All changes by Brin
- // -24 JUL 2007
- //
- #ifndef _DeviceAndHostCommunication_H_
- #define _DeviceAndHostCommunication_H_ //在#ifndef 之后定义 对#ifndef 没有任何作用
- //-----------------------------------------------------------------------------
- // Function Prototypes
- //-----------------------------------------------------------------------------
- void State_Machine(void);
- void TxConfigResponse2Host(unsigned char);
- void TxTeacherKeyData2Host(void);
- void TxTouchPadData2Host(void);
- //-----------------------------------------------------------------------------
- // Global Constants
- //-----------------------------------------------------------------------------
- // Machine States
- #define ST_WAIT_DEV 0x01 // Wait for application to open a device instance
- #define ST_IDLE_DEV 0x02 // Device is open, wait for Setup Message from host
- #define ST_TX_CONFIG_RESPONSE_TO_HOST 0x04 // Received Setup Message, decode and wait for data
- #define ST_TX_KEY_DATA_TO_HOST 0x08 // Receive file data from host
- #define ST_TX_TOUCHPAD_DATA_TO_HOST 0x10 // Transmit file data to host
- #define ST_TX_ACK 0x20 // Transmit ACK 0xFF to host after every 8 packets
- #define ST_ERROR 0x80 // Error state
- //--------------------------
- // Begin device details
- //--------------------------
- //--------------------------
- // End device details
- //--------------------------
- #endif
- //-----------------------------------------------------------------------------
- // End Of File
- //-----------------------------------------------------------------------------