Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more
targets/TARGET_NORDIC/TARGET_NRF5_SDK13/sdk/boards/pca10056.h@162:e13f6fdb2ac4, 2017-04-12 (annotated)
- Committer:
- <>
- Date:
- Wed Apr 12 16:21:43 2017 +0100
- Revision:
- 162:e13f6fdb2ac4
This updates the lib to the mbed lib v140
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| <> | 162:e13f6fdb2ac4 | 1 | /* |
| <> | 162:e13f6fdb2ac4 | 2 | * Copyright (c) 2016 Nordic Semiconductor ASA |
| <> | 162:e13f6fdb2ac4 | 3 | * All rights reserved. |
| <> | 162:e13f6fdb2ac4 | 4 | * |
| <> | 162:e13f6fdb2ac4 | 5 | * Redistribution and use in source and binary forms, with or without modification, |
| <> | 162:e13f6fdb2ac4 | 6 | * are permitted provided that the following conditions are met: |
| <> | 162:e13f6fdb2ac4 | 7 | * |
| <> | 162:e13f6fdb2ac4 | 8 | * 1. Redistributions of source code must retain the above copyright notice, this list |
| <> | 162:e13f6fdb2ac4 | 9 | * of conditions and the following disclaimer. |
| <> | 162:e13f6fdb2ac4 | 10 | * |
| <> | 162:e13f6fdb2ac4 | 11 | * 2. Redistributions in binary form, except as embedded into a Nordic Semiconductor ASA |
| <> | 162:e13f6fdb2ac4 | 12 | * integrated circuit in a product or a software update for such product, must reproduce |
| <> | 162:e13f6fdb2ac4 | 13 | * the above copyright notice, this list of conditions and the following disclaimer in |
| <> | 162:e13f6fdb2ac4 | 14 | * the documentation and/or other materials provided with the distribution. |
| <> | 162:e13f6fdb2ac4 | 15 | * |
| <> | 162:e13f6fdb2ac4 | 16 | * 3. Neither the name of Nordic Semiconductor ASA nor the names of its contributors may be |
| <> | 162:e13f6fdb2ac4 | 17 | * used to endorse or promote products derived from this software without specific prior |
| <> | 162:e13f6fdb2ac4 | 18 | * written permission. |
| <> | 162:e13f6fdb2ac4 | 19 | * |
| <> | 162:e13f6fdb2ac4 | 20 | * 4. This software, with or without modification, must only be used with a |
| <> | 162:e13f6fdb2ac4 | 21 | * Nordic Semiconductor ASA integrated circuit. |
| <> | 162:e13f6fdb2ac4 | 22 | * |
| <> | 162:e13f6fdb2ac4 | 23 | * 5. Any software provided in binary or object form under this license must not be reverse |
| <> | 162:e13f6fdb2ac4 | 24 | * engineered, decompiled, modified and/or disassembled. |
| <> | 162:e13f6fdb2ac4 | 25 | * |
| <> | 162:e13f6fdb2ac4 | 26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
| <> | 162:e13f6fdb2ac4 | 27 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| <> | 162:e13f6fdb2ac4 | 28 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| <> | 162:e13f6fdb2ac4 | 29 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR |
| <> | 162:e13f6fdb2ac4 | 30 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| <> | 162:e13f6fdb2ac4 | 31 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| <> | 162:e13f6fdb2ac4 | 32 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
| <> | 162:e13f6fdb2ac4 | 33 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| <> | 162:e13f6fdb2ac4 | 34 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| <> | 162:e13f6fdb2ac4 | 35 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| <> | 162:e13f6fdb2ac4 | 36 | * |
| <> | 162:e13f6fdb2ac4 | 37 | */ |
| <> | 162:e13f6fdb2ac4 | 38 | #ifndef PCA10056_H |
| <> | 162:e13f6fdb2ac4 | 39 | #define PCA10056_H |
| <> | 162:e13f6fdb2ac4 | 40 | |
| <> | 162:e13f6fdb2ac4 | 41 | #ifdef __cplusplus |
| <> | 162:e13f6fdb2ac4 | 42 | extern "C" { |
| <> | 162:e13f6fdb2ac4 | 43 | #endif |
| <> | 162:e13f6fdb2ac4 | 44 | |
| <> | 162:e13f6fdb2ac4 | 45 | #include "nrf_gpio.h" |
| <> | 162:e13f6fdb2ac4 | 46 | |
| <> | 162:e13f6fdb2ac4 | 47 | // LEDs definitions for PCA10056 |
| <> | 162:e13f6fdb2ac4 | 48 | #define LEDS_NUMBER 4 |
| <> | 162:e13f6fdb2ac4 | 49 | |
| <> | 162:e13f6fdb2ac4 | 50 | #define LED_1 NRF_GPIO_PIN_MAP(0,13) |
| <> | 162:e13f6fdb2ac4 | 51 | #define LED_2 NRF_GPIO_PIN_MAP(0,14) |
| <> | 162:e13f6fdb2ac4 | 52 | #define LED_3 NRF_GPIO_PIN_MAP(0,15) |
| <> | 162:e13f6fdb2ac4 | 53 | #define LED_4 NRF_GPIO_PIN_MAP(0,16) |
| <> | 162:e13f6fdb2ac4 | 54 | |
| <> | 162:e13f6fdb2ac4 | 55 | #define LEDS_ACTIVE_STATE 0 |
| <> | 162:e13f6fdb2ac4 | 56 | |
| <> | 162:e13f6fdb2ac4 | 57 | #define LEDS_LIST { LED_1, LED_2, LED_3, LED_4 } |
| <> | 162:e13f6fdb2ac4 | 58 | |
| <> | 162:e13f6fdb2ac4 | 59 | #define LEDS_INV_MASK LEDS_MASK |
| <> | 162:e13f6fdb2ac4 | 60 | |
| <> | 162:e13f6fdb2ac4 | 61 | #define BSP_LED_0 13 |
| <> | 162:e13f6fdb2ac4 | 62 | #define BSP_LED_1 14 |
| <> | 162:e13f6fdb2ac4 | 63 | #define BSP_LED_2 15 |
| <> | 162:e13f6fdb2ac4 | 64 | #define BSP_LED_3 16 |
| <> | 162:e13f6fdb2ac4 | 65 | |
| <> | 162:e13f6fdb2ac4 | 66 | #define BUTTONS_NUMBER 4 |
| <> | 162:e13f6fdb2ac4 | 67 | |
| <> | 162:e13f6fdb2ac4 | 68 | #define BUTTON_1 11 |
| <> | 162:e13f6fdb2ac4 | 69 | #define BUTTON_2 12 |
| <> | 162:e13f6fdb2ac4 | 70 | #define BUTTON_3 24 |
| <> | 162:e13f6fdb2ac4 | 71 | #define BUTTON_4 25 |
| <> | 162:e13f6fdb2ac4 | 72 | #define BUTTON_PULL NRF_GPIO_PIN_PULLUP |
| <> | 162:e13f6fdb2ac4 | 73 | |
| <> | 162:e13f6fdb2ac4 | 74 | #define BUTTONS_ACTIVE_STATE 0 |
| <> | 162:e13f6fdb2ac4 | 75 | |
| <> | 162:e13f6fdb2ac4 | 76 | #define BUTTONS_LIST { BUTTON_1, BUTTON_2, BUTTON_3, BUTTON_4 } |
| <> | 162:e13f6fdb2ac4 | 77 | |
| <> | 162:e13f6fdb2ac4 | 78 | #define BSP_BUTTON_0 BUTTON_1 |
| <> | 162:e13f6fdb2ac4 | 79 | #define BSP_BUTTON_1 BUTTON_2 |
| <> | 162:e13f6fdb2ac4 | 80 | #define BSP_BUTTON_2 BUTTON_3 |
| <> | 162:e13f6fdb2ac4 | 81 | #define BSP_BUTTON_3 BUTTON_4 |
| <> | 162:e13f6fdb2ac4 | 82 | |
| <> | 162:e13f6fdb2ac4 | 83 | #define RX_PIN_NUMBER 8 |
| <> | 162:e13f6fdb2ac4 | 84 | #define TX_PIN_NUMBER 6 |
| <> | 162:e13f6fdb2ac4 | 85 | #define CTS_PIN_NUMBER 7 |
| <> | 162:e13f6fdb2ac4 | 86 | #define RTS_PIN_NUMBER 5 |
| <> | 162:e13f6fdb2ac4 | 87 | #define HWFC true |
| <> | 162:e13f6fdb2ac4 | 88 | |
| <> | 162:e13f6fdb2ac4 | 89 | #define BSP_QSPI_SCK_PIN 19 |
| <> | 162:e13f6fdb2ac4 | 90 | #define BSP_QSPI_CSN_PIN 17 |
| <> | 162:e13f6fdb2ac4 | 91 | #define BSP_QSPI_IO0_PIN 20 |
| <> | 162:e13f6fdb2ac4 | 92 | #define BSP_QSPI_IO1_PIN 21 |
| <> | 162:e13f6fdb2ac4 | 93 | #define BSP_QSPI_IO2_PIN 22 |
| <> | 162:e13f6fdb2ac4 | 94 | #define BSP_QSPI_IO3_PIN 23 |
| <> | 162:e13f6fdb2ac4 | 95 | |
| <> | 162:e13f6fdb2ac4 | 96 | |
| <> | 162:e13f6fdb2ac4 | 97 | // serialization APPLICATION board - temp. setup for running serialized MEMU tests |
| <> | 162:e13f6fdb2ac4 | 98 | #define SER_APP_RX_PIN NRF_GPIO_PIN_MAP(1,13) // UART RX pin number. |
| <> | 162:e13f6fdb2ac4 | 99 | #define SER_APP_TX_PIN NRF_GPIO_PIN_MAP(1,14) // UART TX pin number. |
| <> | 162:e13f6fdb2ac4 | 100 | #define SER_APP_CTS_PIN NRF_GPIO_PIN_MAP(0,2) // UART Clear To Send pin number. |
| <> | 162:e13f6fdb2ac4 | 101 | #define SER_APP_RTS_PIN NRF_GPIO_PIN_MAP(1,15) // UART Request To Send pin number. |
| <> | 162:e13f6fdb2ac4 | 102 | |
| <> | 162:e13f6fdb2ac4 | 103 | #define SER_APP_SPIM0_SCK_PIN NRF_GPIO_PIN_MAP(0,27) // SPI clock GPIO pin number. |
| <> | 162:e13f6fdb2ac4 | 104 | #define SER_APP_SPIM0_MOSI_PIN NRF_GPIO_PIN_MAP(0,2) // SPI Master Out Slave In GPIO pin number |
| <> | 162:e13f6fdb2ac4 | 105 | #define SER_APP_SPIM0_MISO_PIN NRF_GPIO_PIN_MAP(0,26) // SPI Master In Slave Out GPIO pin number |
| <> | 162:e13f6fdb2ac4 | 106 | #define SER_APP_SPIM0_SS_PIN NRF_GPIO_PIN_MAP(1,13) // SPI Slave Select GPIO pin number |
| <> | 162:e13f6fdb2ac4 | 107 | #define SER_APP_SPIM0_RDY_PIN NRF_GPIO_PIN_MAP(1,15) // SPI READY GPIO pin number |
| <> | 162:e13f6fdb2ac4 | 108 | #define SER_APP_SPIM0_REQ_PIN NRF_GPIO_PIN_MAP(1,14) // SPI REQUEST GPIO pin number |
| <> | 162:e13f6fdb2ac4 | 109 | |
| <> | 162:e13f6fdb2ac4 | 110 | // serialization CONNECTIVITY board |
| <> | 162:e13f6fdb2ac4 | 111 | #define SER_CON_RX_PIN NRF_GPIO_PIN_MAP(1,14) // UART RX pin number. |
| <> | 162:e13f6fdb2ac4 | 112 | #define SER_CON_TX_PIN NRF_GPIO_PIN_MAP(1,13) // UART TX pin number. |
| <> | 162:e13f6fdb2ac4 | 113 | #define SER_CON_CTS_PIN NRF_GPIO_PIN_MAP(1,15) // UART Clear To Send pin number. Not used if HWFC is set to false. |
| <> | 162:e13f6fdb2ac4 | 114 | #define SER_CON_RTS_PIN NRF_GPIO_PIN_MAP(0,2) // UART Request To Send pin number. Not used if HWFC is set to false. |
| <> | 162:e13f6fdb2ac4 | 115 | |
| <> | 162:e13f6fdb2ac4 | 116 | |
| <> | 162:e13f6fdb2ac4 | 117 | #define SER_CON_SPIS_SCK_PIN NRF_GPIO_PIN_MAP(0,27) // SPI SCK signal. |
| <> | 162:e13f6fdb2ac4 | 118 | #define SER_CON_SPIS_MOSI_PIN NRF_GPIO_PIN_MAP(0,2) // SPI MOSI signal. |
| <> | 162:e13f6fdb2ac4 | 119 | #define SER_CON_SPIS_MISO_PIN NRF_GPIO_PIN_MAP(0,26) // SPI MISO signal. |
| <> | 162:e13f6fdb2ac4 | 120 | #define SER_CON_SPIS_CSN_PIN NRF_GPIO_PIN_MAP(1,13) // SPI CSN signal. |
| <> | 162:e13f6fdb2ac4 | 121 | #define SER_CON_SPIS_RDY_PIN NRF_GPIO_PIN_MAP(1,15) // SPI READY GPIO pin number. |
| <> | 162:e13f6fdb2ac4 | 122 | #define SER_CON_SPIS_REQ_PIN NRF_GPIO_PIN_MAP(1,14) // SPI REQUEST GPIO pin number. |
| <> | 162:e13f6fdb2ac4 | 123 | |
| <> | 162:e13f6fdb2ac4 | 124 | #define SER_CONN_CHIP_RESET_PIN NRF_GPIO_PIN_MAP(1,1) // Pin used to reset connectivity chip |
| <> | 162:e13f6fdb2ac4 | 125 | |
| <> | 162:e13f6fdb2ac4 | 126 | // Arduino board mappings |
| <> | 162:e13f6fdb2ac4 | 127 | #define ARDUINO_SCL_PIN 27 // SCL signal pin |
| <> | 162:e13f6fdb2ac4 | 128 | #define ARDUINO_SDA_PIN 26 // SDA signal pin |
| <> | 162:e13f6fdb2ac4 | 129 | #define ARDUINO_AREF_PIN 2 // Aref pin |
| <> | 162:e13f6fdb2ac4 | 130 | |
| <> | 162:e13f6fdb2ac4 | 131 | #define ARDUINO_13_PIN NRF_GPIO_PIN_MAP(1, 15) // Digital pin 13 |
| <> | 162:e13f6fdb2ac4 | 132 | #define ARDUINO_12_PIN NRF_GPIO_PIN_MAP(1, 14) // Digital pin 12 |
| <> | 162:e13f6fdb2ac4 | 133 | #define ARDUINO_11_PIN NRF_GPIO_PIN_MAP(1, 13) // Digital pin 11 |
| <> | 162:e13f6fdb2ac4 | 134 | #define ARDUINO_10_PIN NRF_GPIO_PIN_MAP(1, 12) // Digital pin 10 |
| <> | 162:e13f6fdb2ac4 | 135 | #define ARDUINO_9_PIN NRF_GPIO_PIN_MAP(1, 11) // Digital pin 9 |
| <> | 162:e13f6fdb2ac4 | 136 | #define ARDUINO_8_PIN NRF_GPIO_PIN_MAP(1, 10) // Digital pin 8 |
| <> | 162:e13f6fdb2ac4 | 137 | |
| <> | 162:e13f6fdb2ac4 | 138 | #define ARDUINO_7_PIN NRF_GPIO_PIN_MAP(1, 8) // Digital pin 7 |
| <> | 162:e13f6fdb2ac4 | 139 | #define ARDUINO_6_PIN NRF_GPIO_PIN_MAP(1, 7) // Digital pin 6 |
| <> | 162:e13f6fdb2ac4 | 140 | #define ARDUINO_5_PIN NRF_GPIO_PIN_MAP(1, 6) // Digital pin 5 |
| <> | 162:e13f6fdb2ac4 | 141 | #define ARDUINO_4_PIN NRF_GPIO_PIN_MAP(1, 5) // Digital pin 4 |
| <> | 162:e13f6fdb2ac4 | 142 | #define ARDUINO_3_PIN NRF_GPIO_PIN_MAP(1, 4) // Digital pin 3 |
| <> | 162:e13f6fdb2ac4 | 143 | #define ARDUINO_2_PIN NRF_GPIO_PIN_MAP(1, 3) // Digital pin 2 |
| <> | 162:e13f6fdb2ac4 | 144 | #define ARDUINO_1_PIN NRF_GPIO_PIN_MAP(1, 2) // Digital pin 1 |
| <> | 162:e13f6fdb2ac4 | 145 | #define ARDUINO_0_PIN NRF_GPIO_PIN_MAP(1, 1) // Digital pin 0 |
| <> | 162:e13f6fdb2ac4 | 146 | |
| <> | 162:e13f6fdb2ac4 | 147 | #define ARDUINO_A0_PIN 3 // Analog channel 0 |
| <> | 162:e13f6fdb2ac4 | 148 | #define ARDUINO_A1_PIN 4 // Analog channel 1 |
| <> | 162:e13f6fdb2ac4 | 149 | #define ARDUINO_A2_PIN 28 // Analog channel 2 |
| <> | 162:e13f6fdb2ac4 | 150 | #define ARDUINO_A3_PIN 29 // Analog channel 3 |
| <> | 162:e13f6fdb2ac4 | 151 | #define ARDUINO_A4_PIN 30 // Analog channel 4 |
| <> | 162:e13f6fdb2ac4 | 152 | #define ARDUINO_A5_PIN 31 // Analog channel 5 |
| <> | 162:e13f6fdb2ac4 | 153 | |
| <> | 162:e13f6fdb2ac4 | 154 | // Low frequency clock source to be used by the SoftDevice |
| <> | 162:e13f6fdb2ac4 | 155 | #define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_XTAL, \ |
| <> | 162:e13f6fdb2ac4 | 156 | .rc_ctiv = 0, \ |
| <> | 162:e13f6fdb2ac4 | 157 | .rc_temp_ctiv = 0, \ |
| <> | 162:e13f6fdb2ac4 | 158 | .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM} |
| <> | 162:e13f6fdb2ac4 | 159 | |
| <> | 162:e13f6fdb2ac4 | 160 | #ifdef __cplusplus |
| <> | 162:e13f6fdb2ac4 | 161 | } |
| <> | 162:e13f6fdb2ac4 | 162 | #endif |
| <> | 162:e13f6fdb2ac4 | 163 | |
| <> | 162:e13f6fdb2ac4 | 164 | #endif // PCA10056_H |


