fsl_spi_cmsis.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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_SPI_CMSIS_H_
  21. #define _FSL_SPI_CMSIS_H_
  22. #include "fsl_spi.h"
  23. #include "RTE_Device.h"
  24. #include "Driver_SPI.h"
  25. #if defined(FSL_FEATURE_SOC_DMA_COUNT) && (FSL_FEATURE_SOC_DMA_COUNT)
  26. #include "fsl_spi_dma.h"
  27. #endif
  28. #if defined(SPI0)
  29. extern ARM_DRIVER_SPI Driver_SPI0;
  30. #endif /* SPI0 */
  31. #if defined(SPI1)
  32. extern ARM_DRIVER_SPI Driver_SPI1;
  33. #endif /* SPI1 */
  34. #if defined(SPI2)
  35. extern ARM_DRIVER_SPI Driver_SPI2;
  36. #endif /* SPI2 */
  37. #if defined(SPI3)
  38. extern ARM_DRIVER_SPI Driver_SPI3;
  39. #endif /* SPI3 */
  40. #if defined(SPI4)
  41. extern ARM_DRIVER_SPI Driver_SPI4;
  42. #endif /* SPI4 */
  43. #if defined(SPI5)
  44. extern ARM_DRIVER_SPI Driver_SPI5;
  45. #endif /* SPI5 */
  46. #if defined(SPI6)
  47. extern ARM_DRIVER_SPI Driver_SPI6;
  48. #endif /* SPI6 */
  49. #if defined(SPI7)
  50. extern ARM_DRIVER_SPI Driver_SPI7;
  51. #endif /* SPI7 */
  52. #if defined(SPI8)
  53. extern ARM_DRIVER_SPI Driver_SPI8;
  54. #endif /* SPI8 */
  55. #if defined(SPI9)
  56. extern ARM_DRIVER_SPI Driver_SPI9;
  57. #endif /* SPI9 */
  58. #define SPI_FLAG_UNINIT (0)
  59. #define SPI_FLAG_INIT (1 << 0)
  60. #define SPI_FLAG_POWER (1 << 1)
  61. #define SPI_FLAG_CONFIGURED (1 << 2)
  62. #define SPI_FLAG_MASTER (1 << 3)
  63. #endif