Sog Yang / Mbed OS BLE_DOORCTL_4CH
Committer:
sog_yang
Date:
Mon Jan 16 14:16:03 2017 +0000
Revision:
0:1eec8720727a
NQ62X BLE DOORCTL 4CH project init

Who changed what in which revision?

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