1 /***********************************************************************************************//** 2 * \copyright 3 * Copyright 2018-2022 Cypress Semiconductor Corporation (an Infineon company) or 4 * an affiliate of Cypress Semiconductor Corporation 5 * 6 * SPDX-License-Identifier: Apache-2.0 7 * 8 * Licensed under the Apache License, Version 2.0 (the "License"); 9 * you may 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, 16 * WITHOUT 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 #pragma once 22 23 #include "cybsp_doc.h" 24 25 #if defined(__cplusplus) 26 extern "C" { 27 #endif 28 29 /** 30 * \cond INTERNAL 31 */ 32 /* WIFI interface types */ 33 #define CYBSP_SDIO_INTERFACE (0) 34 #define CYBSP_SPI_INTERFACE (1) 35 #define CYBSP_M2M_INTERFACE (2) 36 37 /* Map from the new components to the old interface names for 38 * compatibility with code that still depends on those defines */ 39 #if defined(COMPONENT_WIFI_INTERFACE_SDIO) 40 #define CYBSP_WIFI_INTERFACE_TYPE (CYBSP_SDIO_INTERFACE) 41 #elif defined(COMPONENT_WIFI_INTERFACE_SPI) 42 #define CYBSP_WIFI_INTERFACE_TYPE (CYBSP_SPI_INTERFACE) 43 #elif defined(COMPONENT_WIFI_INTERFACE_M2M) 44 #define CYBSP_WIFI_INTERFACE_TYPE (CYBSP_M2M_INTERFACE) 45 #endif 46 /** \endcond */ 47 48 /** 49 * \addtogroup group_bsp_pin_state Pin States 50 * \{ 51 * Macros to abstract out whether the LEDs & Buttons are wired high or active low. 52 */ 53 /** Pin state for the LED on. */ 54 #ifndef CYBSP_LED_STATE_ON 55 #define CYBSP_LED_STATE_ON (0U) 56 #endif 57 /** Pin state for the LED off. */ 58 #ifndef CYBSP_LED_STATE_OFF 59 #define CYBSP_LED_STATE_OFF (1U) 60 #endif 61 /** Pin state for when a button is pressed. */ 62 #ifndef CYBSP_BTN_PRESSED 63 #define CYBSP_BTN_PRESSED (0U) 64 #endif 65 /** Pin state for when a button is released. */ 66 #ifndef CYBSP_BTN_OFF 67 #define CYBSP_BTN_OFF (1U) 68 #endif 69 /** \} group_bsp_pin_state */ 70 71 #if defined(__cplusplus) 72 } 73 #endif 74