ChibiOS/HAL 9.0.0
hal_spi.h
Go to the documentation of this file.
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/**
18 * @file hal_spi.h
19 * @brief SPI Driver selector macros and structures.
20 *
21 * @addtogroup SPI
22 * @{
23 */
24
25#ifndef HAL_SPI_H
26#define HAL_SPI_H
27
28#if (HAL_USE_SPI == TRUE) || defined(__DOXYGEN__)
29
30#if defined(HAL_LLD_SELECT_SPI_V2) || defined(__DOXYGEN__)
31#include "hal_spi_v2.h"
32#endif
33
34#if !defined(HAL_LLD_SELECT_SPI_V2) || defined(__DOXYGEN__)
35#include "hal_spi_v1.h"
36#endif
37
38/* For compatibility with v1 driver which does not require this.*/
39#if !defined(SPI_SUPPORTS_SLAVE_MODE)
40#define SPI_SUPPORTS_SLAVE_MODE FALSE
41#endif
42
43#endif /* HAL_USE_SPI == TRUE */
44
45#endif /* HAL_SPI_H */
46
47/** @} */
SPI (v1) Driver macros and structures.
SPI (v2) Driver macros and structures.