dw_iic_hal_cfg.h 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /* ------------------------------------------
  2. * Copyright (c) 2017, Synopsys, Inc. All rights reserved.
  3. * Redistribution and use in source and binary forms, with or without modification,
  4. * are permitted provided that the following conditions are met:
  5. * 1) Redistributions of source code must retain the above copyright notice, this
  6. * list of conditions and the following disclaimer.
  7. * 2) Redistributions in binary form must reproduce the above copyright notice,
  8. * this list of conditions and the following disclaimer in the documentation and/or
  9. * other materials provided with the distribution.
  10. * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
  11. * be used to endorse or promote products derived from this software without
  12. * specific prior written permission.
  13. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  14. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  15. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  16. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
  17. * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  18. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  19. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  20. * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  21. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  22. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  23. *
  24. * \version 2017.03
  25. * \date 2014-07-01
  26. * \author Huaqi Fang(Huaqi.Fang@synopsys.com)
  27. --------------------------------------------- */
  28. /**
  29. * \file
  30. * \ingroup DEVICE_DW_IIC
  31. * \brief DesignWare IIC driver hardware description
  32. * related header file configuration file
  33. * \details configuration file to enable or disable some function of iic
  34. */
  35. #ifndef _DEVICE_DW_IIC_HAL_CFG_H_
  36. #define _DEVICE_DW_IIC_HAL_CFG_H_
  37. #ifndef DW_IIC_ALLOW_RESTART
  38. #define DW_IIC_ALLOW_RESTART (1) /*!< allow restart configuration */
  39. #endif
  40. #ifdef DW_IIC_SPECIAL_START_BYTE
  41. #define DW_IIC_SPECIAL_START_BYTE (0) /*!< SPECIAL bit enable in IC_TAR */
  42. #endif
  43. #ifndef DW_IIC_MST_10_BIT_ADDR_SUPPORT
  44. #define DW_IIC_MST_10_BIT_ADDR_SUPPORT (1) /*!< enable 10-bit address mode */
  45. #endif
  46. #ifdef DW_IIC_SLV_10_BIT_ADDR_SUPPORT
  47. #define DW_IIC_SLV_10_BIT_ADDR_SUPPORT (1) /*!< slave 10-bit addressing mode */
  48. #endif
  49. #ifndef DW_IIC_DYNAMIC_TAR_UPDATE_SUPPORT
  50. #define DW_IIC_DYNAMIC_TAR_UPDATE_SUPPORT (0) /*!< Dynamic target address update support */
  51. #endif
  52. #ifndef DW_IIC_DISABLE_MAX_T_POLL_CNT
  53. #define DW_IIC_DISABLE_MAX_T_POLL_CNT (1250) /*!< Timeout count, approximate to be 25us in 50MHz CPU @ Standard mode */
  54. #endif
  55. #ifndef DW_IIC_CALC_FIFO_LEN_ENABLE
  56. #define DW_IIC_CALC_FIFO_LEN_ENABLE (1) /*!< Default enable calculate fifo length */
  57. #endif
  58. #ifndef DW_IIC_USE_IC_CLK_MHZ
  59. #define DW_IIC_USE_IC_CLK_MHZ (50) /*!< Default use 50MHz IC_CLK */
  60. #endif
  61. #ifndef DW_IIC_USE_HS_BUS_LOADING_100PF
  62. #define DW_IIC_USE_HS_BUS_LOADING_100PF (1) /*!< Use bus loading 100pf */
  63. #endif
  64. #endif /* _DEVICE_DW_IIC_HAL_CFG_H_ */