Cefn Hoile / nRF51822

Dependencies:   nrf51-sdk

Dependents:   microbit-dal

Fork of nRF51822 by Lancaster University

Committer:
vcoubard
Date:
Mon Jan 11 10:19:10 2016 +0000
Revision:
551:ab7a8de3ff10
Parent:
541:884f95bf5351
Synchronized with git rev 6825c511
Author: Rohit Grover
Release 2.1.0
=============

Upgrading to files from v8.1 of the Nordic SDK.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vcoubard 551:ab7a8de3ff10 1 /*
vcoubard 541:884f95bf5351 2 * Copyright (c) Nordic Semiconductor ASA
vcoubard 541:884f95bf5351 3 * All rights reserved.
vcoubard 541:884f95bf5351 4 *
vcoubard 541:884f95bf5351 5 * Redistribution and use in source and binary forms, with or without modification,
vcoubard 541:884f95bf5351 6 * are permitted provided that the following conditions are met:
vcoubard 541:884f95bf5351 7 *
vcoubard 541:884f95bf5351 8 * 1. Redistributions of source code must retain the above copyright notice, this
vcoubard 541:884f95bf5351 9 * list of conditions and the following disclaimer.
vcoubard 541:884f95bf5351 10 *
vcoubard 541:884f95bf5351 11 * 2. Redistributions in binary form must reproduce the above copyright notice, this
vcoubard 541:884f95bf5351 12 * list of conditions and the following disclaimer in the documentation and/or
vcoubard 541:884f95bf5351 13 * other materials provided with the distribution.
vcoubard 541:884f95bf5351 14 *
vcoubard 541:884f95bf5351 15 * 3. Neither the name of Nordic Semiconductor ASA nor the names of other
vcoubard 541:884f95bf5351 16 * contributors to this software may be used to endorse or promote products
vcoubard 541:884f95bf5351 17 * derived from this software without specific prior written permission.
vcoubard 541:884f95bf5351 18 *
vcoubard 541:884f95bf5351 19 *
vcoubard 541:884f95bf5351 20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
vcoubard 541:884f95bf5351 21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
vcoubard 541:884f95bf5351 22 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
vcoubard 541:884f95bf5351 23 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
vcoubard 541:884f95bf5351 24 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
vcoubard 541:884f95bf5351 25 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
vcoubard 541:884f95bf5351 26 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
vcoubard 541:884f95bf5351 27 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
vcoubard 541:884f95bf5351 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
vcoubard 541:884f95bf5351 29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
vcoubard 541:884f95bf5351 30 *
vcoubard 541:884f95bf5351 31 */
vcoubard 541:884f95bf5351 32
vcoubard 541:884f95bf5351 33 #ifndef COMMON_H
vcoubard 541:884f95bf5351 34 #define COMMON_H
vcoubard 541:884f95bf5351 35
vcoubard 541:884f95bf5351 36 /*lint ++flb "Enter library region" */
vcoubard 541:884f95bf5351 37
vcoubard 541:884f95bf5351 38 #include <stdbool.h>
vcoubard 541:884f95bf5351 39 #include <stdint.h>
vcoubard 541:884f95bf5351 40
vcoubard 541:884f95bf5351 41 /* @file
vcoubard 541:884f95bf5351 42 * @brief Common header file for generic macros and definitions
vcoubard 541:884f95bf5351 43 *
vcoubard 541:884f95bf5351 44 */
vcoubard 541:884f95bf5351 45
vcoubard 541:884f95bf5351 46 /*
vcoubard 541:884f95bf5351 47 * GPIO glue macros, this can be used to define a pin number in source/header file and use that macro for pin
vcoubard 541:884f95bf5351 48 * configuration using this expansion.
vcoubard 541:884f95bf5351 49 * example:
vcoubard 541:884f95bf5351 50 * #define RESET_PIN 8
vcoubard 541:884f95bf5351 51 * NRF_GPIO->PINCNF(RESET_PIN) = XXX ; // Expanded NRF_GPIO->PIN_CNF[8] = XXX
vcoubard 541:884f95bf5351 52 */
vcoubard 541:884f95bf5351 53 #define PINX_GLUE(x, y, z) x##y##_##z /*!< first level glue for pin macros */
vcoubard 541:884f95bf5351 54 #define PINCNF(p) PINX_GLUE(PIN,p,CNF) /*!< gpio configure pin number 'p' */
vcoubard 541:884f95bf5351 55 #define PINOUT(p) PINX_GLUE(PIN,p,OUT) /*!< gpio out pin number 'p' */
vcoubard 541:884f95bf5351 56
vcoubard 541:884f95bf5351 57 /*lint --flb "Leave library region" */
rgrover1 371:8f7d2137727a 58 #endif