Subversion Repositories zxusbnet

Rev

Blame | Last modification | View Log | Download | RSS feed | ?url?

  1. #ifndef _IINCHIP_CONF_H_
  2. #define _IINCHIP_CONF_H_
  3.  
  4. /**
  5.  * \file    iinchip_conf.h
  6.  * W5300 Configuration & Defintions
  7.  *
  8.  * This file defines some compile options of the W5300 program
  9.  * and code dependency of a target host system. \n \n
  10.  */
  11.  
  12. #include <avr/io.h>
  13.  
  14. #define LITTLE_ENDIAN   //  This must be defined if system is little-endian alignment
  15.  
  16. //#define __DEF_IINCHIP_DBG__      /**< Involves debug code */
  17. //#define __DEF_IINCHIP_INT__    /**< Involves ISR routine */
  18. //#define __DEF_IINCHIP_PPP__    /**< Involves PPP service routines and md5.h & md5.c */
  19.  
  20. /**
  21.  * SOCKET count of W5300
  22.  */
  23. #define MAX_SOCK_NUM            8
  24.  
  25.  
  26. #define __DEF_IINCHIP_DIRECT_MODE__     1    /**< Direct address mode */
  27. #define __DEF_IINCHIP_INDIRECT_MODE__   2    /**< Indirect address mode */
  28.  
  29. /**
  30.  * It is used to decide to W5300 host interface mode.
  31.  */
  32. #define __DEF_IINCHIP_ADDRESS_MODE__           __DEF_IINCHIP_DIRECT_MODE__
  33. //#define __DEF_IINCHIP_ADDRESS_MODE__         __DEF_IINCHIP_INDIRECT_MODE__
  34.  
  35. /**
  36.  * Define the base address of W5300 on your target host system.
  37.  */
  38. #define __DEF_IINCHIP_MAP_BASE__ 0x8000
  39.  
  40. #if (__DEF_IINCHIP_ADDRESS_MODE__ == __DEF_IINCHIP_DIRECT_MODE__)
  41.    #define COMMON_REG_BASE   __DEF_IINCHIP_MAP_BASE__          /**< The base address of COMMON_REG */
  42.    #define SOCKET_REG_BASE   __DEF_IINCHIP_MAP_BASE__ + 0x0200 /**< The base address of SOCKET_REG */  
  43. #else
  44.    #define COMMON_REG_BASE     0                              
  45.    #define SOCKET_REG_BASE     0x0200                          
  46. #endif
  47.  
  48. #define SOCKET_REG_SIZE    0x40     // SOCKET Regsiter Count per Channel
  49.  
  50.  
  51. #define __DEF_C__                  0   /**< Using C code */
  52.  
  53. /**
  54.  * It define how to access to the intenal TX/RX memory of W5300.
  55.  */
  56. #define __DEF_IINCHIP_BUF_OP__      __DEF_C__
  57. //#define __DEF_IINCHIP_BUF_OP__    __DEF_MCU_DEP_INLINE_ASM__
  58. //#define __DEF_IINCHIP_BUF_OP__    __DEF_MCU_DEP_DMA__
  59.  
  60.  
  61. /**
  62.  * Enter a critical section
  63.  */
  64. #define IINCHIP_CRITICAL_SECTION_ENTER() {}
  65.  
  66. /**
  67.  * Exit a critical section
  68.  */
  69. #define IINCHIP_CRITICAL_SECTION_EXIT() {}
  70.  
  71.  
  72. #endif
  73.