1 /* 2 * Copyright (c) 2013-2016 ARM Limited. All rights reserved. 3 * Copyright (c) 2016, Freescale Semiconductor, Inc. Not a Contribution. 4 * Copyright 2016-2020 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 21 #ifndef FSL_SPI_CMSIS_H_ 22 #define FSL_SPI_CMSIS_H_ 23 24 #include "fsl_spi.h" 25 #include "RTE_Device.h" 26 #include "Driver_SPI.h" 27 #if defined(FSL_FEATURE_SOC_DMA_COUNT) && (FSL_FEATURE_SOC_DMA_COUNT) 28 #include "fsl_spi_dma.h" 29 #endif 30 31 #if defined(SPI0) && defined(RTE_SPI0) && RTE_SPI0 32 extern ARM_DRIVER_SPI Driver_SPI0; 33 #endif /* SPI0 */ 34 35 #if defined(SPI1) && defined(RTE_SPI1) && RTE_SPI1 36 extern ARM_DRIVER_SPI Driver_SPI1; 37 #endif /* SPI1 */ 38 39 #if defined(SPI2) && defined(RTE_SPI2) && RTE_SPI2 40 extern ARM_DRIVER_SPI Driver_SPI2; 41 #endif /* SPI2 */ 42 43 #if defined(SPI3) && defined(RTE_SPI3) && RTE_SPI3 44 extern ARM_DRIVER_SPI Driver_SPI3; 45 #endif /* SPI3 */ 46 47 #if defined(SPI4) && defined(RTE_SPI4) && RTE_SPI4 48 extern ARM_DRIVER_SPI Driver_SPI4; 49 #endif /* SPI4 */ 50 51 #if defined(SPI5) && defined(RTE_SPI5) && RTE_SPI5 52 extern ARM_DRIVER_SPI Driver_SPI5; 53 #endif /* SPI5 */ 54 55 #if defined(SPI6) && defined(RTE_SPI6) && RTE_SPI6 56 extern ARM_DRIVER_SPI Driver_SPI6; 57 #endif /* SPI6 */ 58 59 #if defined(SPI7) && defined(RTE_SPI7) && RTE_SPI7 60 extern ARM_DRIVER_SPI Driver_SPI7; 61 #endif /* SPI7 */ 62 63 #if defined(SPI8) && defined(RTE_SPI8) && RTE_SPI8 64 extern ARM_DRIVER_SPI Driver_SPI8; 65 #endif /* SPI8 */ 66 67 #if defined(SPI9) && defined(RTE_SPI9) && RTE_SPI9 68 extern ARM_DRIVER_SPI Driver_SPI9; 69 #endif /* SPI9 */ 70 71 #if defined(SPI10) && defined(RTE_SPI10) && RTE_SPI10 72 extern ARM_DRIVER_SPI Driver_SPI10; 73 #endif /* SPI10 */ 74 75 #if defined(SPI11) && defined(RTE_SPI11) && RTE_SPI11 76 extern ARM_DRIVER_SPI Driver_SPI11; 77 #endif /* SPI11 */ 78 79 #if defined(SPI12) && defined(RTE_SPI12) && RTE_SPI12 80 extern ARM_DRIVER_SPI Driver_SPI12; 81 #endif /* SPI12 */ 82 83 #if defined(SPI13) && defined(RTE_SPI13) && RTE_SPI13 84 extern ARM_DRIVER_SPI Driver_SPI13; 85 #endif /* SPI13 */ 86 87 #define SPI_FLAG_UNINIT (0UL) 88 #define SPI_FLAG_INIT (1UL << 0) 89 #define SPI_FLAG_POWER (1UL << 1) 90 #define SPI_FLAG_CONFIGURED (1UL << 2) 91 #define SPI_FLAG_MASTER (1UL << 3) 92 93 #endif 94