fsl_i2c_cmsis.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*
  2. * Copyright (c) 2013-2016 ARM Limited. All rights reserved.
  3. * Copyright (c) 2016, Freescale Semiconductor, Inc. Not a Contribution.
  4. * Copyright 2016-2017 NXP. Not a Contribution.
  5. *
  6. * SPDX-License-Identifier: Apache-2.0
  7. *
  8. * Licensed under the Apache License, Version 2.0 (the License); you may
  9. * not use this file except in compliance with the License.
  10. * You may obtain a copy of the License at
  11. *
  12. * http://www.apache.org/licenses/LICENSE-2.0
  13. *
  14. * Unless required by applicable law or agreed to in writing, software
  15. * distributed under the License is distributed on an AS IS BASIS, WITHOUT
  16. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. * See the License for the specific language governing permissions and
  18. * limitations under the License.
  19. */
  20. #ifndef _FSL_I2C_CMSIS_H_
  21. #define _FSL_I2C_CMSIS_H_
  22. #include "fsl_common.h"
  23. #include "Driver_I2C.h"
  24. #include "RTE_Device.h"
  25. #include "fsl_i2c.h"
  26. #include "fsl_flexcomm.h"
  27. #if (defined(FSL_FEATURE_SOC_DMA_COUNT) && FSL_FEATURE_SOC_DMA_COUNT)
  28. #include "fsl_i2c_dma.h"
  29. #endif
  30. #if defined(I2C0)
  31. extern ARM_DRIVER_I2C Driver_I2C0;
  32. #endif
  33. #if defined(I2C1)
  34. extern ARM_DRIVER_I2C Driver_I2C1;
  35. #endif
  36. #if defined(I2C2)
  37. extern ARM_DRIVER_I2C Driver_I2C2;
  38. #endif
  39. #if defined(I2C3)
  40. extern ARM_DRIVER_I2C Driver_I2C3;
  41. #endif
  42. #if defined(I2C4)
  43. extern ARM_DRIVER_I2C Driver_I2C4;
  44. #endif
  45. #if defined(I2C5)
  46. extern ARM_DRIVER_I2C Driver_I2C5;
  47. #endif
  48. #if defined(I2C6)
  49. extern ARM_DRIVER_I2C Driver_I2C6;
  50. #endif
  51. #if defined(I2C7)
  52. extern ARM_DRIVER_I2C Driver_I2C7;
  53. #endif
  54. #if defined(I2C8)
  55. extern ARM_DRIVER_I2C Driver_I2C8;
  56. #endif
  57. #if defined(I2C9)
  58. extern ARM_DRIVER_I2C Driver_I2C9;
  59. #endif
  60. /* I2C Driver state flags */
  61. #define I2C_FLAG_UNINIT (0)
  62. #define I2C_FLAG_INIT (1 << 0)
  63. #define I2C_FLAG_POWER (1 << 1)
  64. #endif