www.pudn.com > TCPmodbushy.rar > CP220x_CORE.h


#ifndef CP220X_CORE_H_HANDLE 
#define CP220X_CORE_H_HANDLE 
 
//----------------------------------------------------------------------------- 
// macro 
//----------------------------------------------------------------------------- 
// Global Constants 
//----------------------------------------------------------------------------- 
 
#define OSC_ERROR   0x01               // Error Return Codes 
#define CAL_ERROR   0x02 
#define MEM_ERROR   0x04 
#define FLASH_ERROR 0x08 
#define MAC_ERROR   0x10 
#define LINK_ERROR  0x20 
#define DATA_ERROR  0x40 
 
#define DEFAULT_TIMEOUT 100            // Default Timeout in ms   
#define ONE_SECOND      1000           // Timout equal to 1 second 
 
// Initialization routines 
unsigned char CP220x_HW_Reset(void); 
unsigned char PHY_Init(); 
void MAC_Init(); 
 
//----------------------------------------------------------------------------- 
// End Of File 
//----------------------------------------------------------------------------- 
#endif