ver:init

Committer:
iv123
Date:
Sun Jun 18 16:10:28 2017 +0000
Revision:
0:88b85febcb45
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
iv123 0:88b85febcb45 1 /**
iv123 0:88b85febcb45 2 ******************************************************************************
iv123 0:88b85febcb45 3 * @file x_nucleo_idb0xa1_targets.h
iv123 0:88b85febcb45 4 * @author AST / EST
iv123 0:88b85febcb45 5 * @version V0.0.1
iv123 0:88b85febcb45 6 * @date 24-July-2015
iv123 0:88b85febcb45 7 * @brief This header file is intended to manage the differences between
iv123 0:88b85febcb45 8 * the different supported base-boards which might mount the
iv123 0:88b85febcb45 9 * X_NUCLEO_IDB0XA1 BlueNRG BLE Expansion Board.
iv123 0:88b85febcb45 10 ******************************************************************************
iv123 0:88b85febcb45 11 * @attention
iv123 0:88b85febcb45 12 *
iv123 0:88b85febcb45 13 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
iv123 0:88b85febcb45 14 *
iv123 0:88b85febcb45 15 * Redistribution and use in source and binary forms, with or without modification,
iv123 0:88b85febcb45 16 * are permitted provided that the following conditions are met:
iv123 0:88b85febcb45 17 * 1. Redistributions of source code must retain the above copyright notice,
iv123 0:88b85febcb45 18 * this list of conditions and the following disclaimer.
iv123 0:88b85febcb45 19 * 2. Redistributions in binary form must reproduce the above copyright notice,
iv123 0:88b85febcb45 20 * this list of conditions and the following disclaimer in the documentation
iv123 0:88b85febcb45 21 * and/or other materials provided with the distribution.
iv123 0:88b85febcb45 22 * 3. Neither the name of STMicroelectronics nor the names of its contributors
iv123 0:88b85febcb45 23 * may be used to endorse or promote products derived from this software
iv123 0:88b85febcb45 24 * without specific prior written permission.
iv123 0:88b85febcb45 25 *
iv123 0:88b85febcb45 26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
iv123 0:88b85febcb45 27 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
iv123 0:88b85febcb45 28 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
iv123 0:88b85febcb45 29 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
iv123 0:88b85febcb45 30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
iv123 0:88b85febcb45 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
iv123 0:88b85febcb45 32 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
iv123 0:88b85febcb45 33 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
iv123 0:88b85febcb45 34 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
iv123 0:88b85febcb45 35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
iv123 0:88b85febcb45 36 *
iv123 0:88b85febcb45 37 ******************************************************************************
iv123 0:88b85febcb45 38 */
iv123 0:88b85febcb45 39
iv123 0:88b85febcb45 40 /* Define to prevent from recursive inclusion --------------------------------*/
iv123 0:88b85febcb45 41 #ifndef _X_NUCLEO_IDB0XA1_TARGETS_H_
iv123 0:88b85febcb45 42 #define _X_NUCLEO_IDB0XA1_TARGETS_H_
iv123 0:88b85febcb45 43
iv123 0:88b85febcb45 44 /*** SPI ***/
iv123 0:88b85febcb45 45 /* Use Arduino I2C Connectors */
iv123 0:88b85febcb45 46 #define IDB0XA1_PIN_SPI_MOSI (D11)
iv123 0:88b85febcb45 47 #define IDB0XA1_PIN_SPI_MISO (D12)
iv123 0:88b85febcb45 48 #define IDB0XA1_PIN_SPI_nCS (A1)
iv123 0:88b85febcb45 49 #define IDB0XA1_PIN_SPI_RESET (D7)
iv123 0:88b85febcb45 50 #define IDB0XA1_PIN_SPI_IRQ (A0)
iv123 0:88b85febcb45 51
iv123 0:88b85febcb45 52 /* NOTE: Define macro 'IDB0XA1_D13_PATCH' if you want to compile for a specifically
iv123 0:88b85febcb45 53 modified version of the X_NUCLEO_IDB0XA1 expansion board in
iv123 0:88b85febcb45 54 which pin 'D13' (rather than the standard pin 'D3') is used
iv123 0:88b85febcb45 55 in order to provide the SPI serial clock.
iv123 0:88b85febcb45 56 Expansion boards modified in this way allow to be used on almost
iv123 0:88b85febcb45 57 any Arduino-compliant base board.
iv123 0:88b85febcb45 58 */
iv123 0:88b85febcb45 59 #if defined(IDB0XA1_D13_PATCH)
iv123 0:88b85febcb45 60 #define IDB0XA1_PIN_SPI_SCK (D13)
iv123 0:88b85febcb45 61 #else // !defined(IDB0XA1_D13_PATCH)
iv123 0:88b85febcb45 62 #define IDB0XA1_PIN_SPI_SCK (D3)
iv123 0:88b85febcb45 63 #endif // !defined(IDB0XA1_D13_PATCH)
iv123 0:88b85febcb45 64
iv123 0:88b85febcb45 65 /* NOTE: Stack Mode 0x04 allows Simultaneous Scanning and Advertisement (SSAdv)
iv123 0:88b85febcb45 66 Define macro 'SSADV' to enable it
iv123 0:88b85febcb45 67 */
iv123 0:88b85febcb45 68 #define SSADV
iv123 0:88b85febcb45 69 #if defined(SSADV)
iv123 0:88b85febcb45 70 #define IDB0XA1_STACK_MODE (0x04)
iv123 0:88b85febcb45 71 #else
iv123 0:88b85febcb45 72 #define IDB0XA1_STACK_MODE (0x02)
iv123 0:88b85febcb45 73 #endif
iv123 0:88b85febcb45 74
iv123 0:88b85febcb45 75 #endif // _X_NUCLEO_IDB0XA1_TARGETS_H_