fsl_lpspi_cmsis.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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,2020,2021 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_LPSPI_CMSISI_H_
  21. #define _FSL_LPSPI_CMSISI_H_
  22. #include "fsl_common.h"
  23. #include "RTE_Device.h"
  24. #include "Driver_SPI.h"
  25. #include "fsl_lpspi.h"
  26. #if (defined(FSL_FEATURE_SOC_EDMA_COUNT) && FSL_FEATURE_SOC_EDMA_COUNT)
  27. #include "fsl_lpspi_edma.h"
  28. #endif
  29. #if (defined(FSL_FEATURE_SOC_DMAMUX_COUNT) && FSL_FEATURE_SOC_DMAMUX_COUNT)
  30. #include "fsl_dmamux.h"
  31. #endif
  32. #if defined(LPSPI0) && defined(RTE_SPI0) && RTE_SPI0
  33. extern ARM_DRIVER_SPI Driver_SPI0;
  34. #endif /* LPSPI0 */
  35. #if defined(LPSPI1) && defined(RTE_SPI1) && RTE_SPI1
  36. extern ARM_DRIVER_SPI Driver_SPI1;
  37. #endif /* LPSPI1 */
  38. #if defined(LPSPI2) && defined(RTE_SPI2) && RTE_SPI2
  39. extern ARM_DRIVER_SPI Driver_SPI2;
  40. #endif /* LPSPI2 */
  41. #if defined(LPSPI3) && defined(RTE_SPI3) && RTE_SPI3
  42. extern ARM_DRIVER_SPI Driver_SPI3;
  43. #endif /* LPSPI3 */
  44. #if defined(LPSPI4) && defined(RTE_SPI4) && RTE_SPI4
  45. extern ARM_DRIVER_SPI Driver_SPI4;
  46. #endif /* LPSPI4 */
  47. #if defined(LPSPI5) && defined(RTE_SPI5) && RTE_SPI5
  48. extern ARM_DRIVER_SPI Driver_SPI5;
  49. #endif /* LPSPI5 */
  50. #if defined(LPSPI6) && defined(RTE_SPI6) && RTE_SPI6
  51. extern ARM_DRIVER_SPI Driver_SPI6;
  52. #endif /* LPSPI6 */
  53. /* SPI Driver state flags */
  54. #define SPI_FLAG_UNINIT (0UL)
  55. #define SPI_FLAG_INIT (1UL << 0)
  56. #define SPI_FLAG_POWER (1UL << 1)
  57. #define SPI_FLAG_CONFIGURED (1UL << 2)
  58. #endif