Main_H.h
上传用户:gxz1972
上传日期:2019-09-13
资源大小:323k
文件大小:2k
- //-----------------------------------------------------------------------------
- // Main.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 Cai
- // -24 JUL 2007
- //
- //
- #ifndef _MAIN_H_
- #define _MAIN_H_
- //-----------------------------------------------------------------------------
- // 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
- //-----------------------------------------------------------------------------
- // Global Constants
- //-----------------------------------------------------------------------------
- sbit Led1 = P2^2; // LED='1' means ON
- sbit Led2 = P2^3; // blink to indicate data transmission
- //-----------------------------------------------------------------------------
- // Function Prototypes
- //-----------------------------------------------------------------------------
- void USB0_Enable (void);
- #endif
- //-----------------------------------------------------------------------------
- // End Of File
- //-----------------------------------------------------------------------------