bugfix for duplicate symbol

Fork of nRF51822 by Nordic Semiconductor

Committer:
rgrover1
Date:
Wed Apr 15 08:59:11 2015 +0100
Revision:
103:138bdc859cc9
Synchronized with git rev fa183c40
Author: Rohit Grover
updating to v7.1 of the Nordic SDK.
Re-organized file layout to match that from the SDK.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rgrover1 103:138bdc859cc9 1 /* Copyright (c) 2008 Nordic Semiconductor. All Rights Reserved.
rgrover1 103:138bdc859cc9 2 *
rgrover1 103:138bdc859cc9 3 * The information contained herein is property of Nordic Semiconductor ASA.
rgrover1 103:138bdc859cc9 4 * Terms and conditions of usage are described in detail in NORDIC
rgrover1 103:138bdc859cc9 5 * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
rgrover1 103:138bdc859cc9 6 *
rgrover1 103:138bdc859cc9 7 * Licensees are granted free, non-transferable use of the information. NO
rgrover1 103:138bdc859cc9 8 * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
rgrover1 103:138bdc859cc9 9 * the file.
rgrover1 103:138bdc859cc9 10 */
rgrover1 103:138bdc859cc9 11
rgrover1 103:138bdc859cc9 12 /** @file
rgrover1 103:138bdc859cc9 13 * @brief Common defines and macros for firmware developed by Nordic Semiconductor.
rgrover1 103:138bdc859cc9 14 */
rgrover1 103:138bdc859cc9 15
rgrover1 103:138bdc859cc9 16 #ifndef NORDIC_COMMON_H__
rgrover1 103:138bdc859cc9 17 #define NORDIC_COMMON_H__
rgrover1 103:138bdc859cc9 18
rgrover1 103:138bdc859cc9 19 /** Swaps the upper byte with the lower byte in a 16 bit variable */
rgrover1 103:138bdc859cc9 20 //lint -emacro((572),SWAP) // Suppress warning 572 "Excessive shift value"
rgrover1 103:138bdc859cc9 21 #define SWAP(x) ((((x)&0xFF)<<8)|(((x)>>8)&0xFF))
rgrover1 103:138bdc859cc9 22
rgrover1 103:138bdc859cc9 23 /** The upper 8 bits of a 16 bit value */
rgrover1 103:138bdc859cc9 24 //lint -emacro(572,MSB) // Suppress warning 572 "Excessive shift value"
rgrover1 103:138bdc859cc9 25 #define MSB(a) (((a) & 0xFF00) >> 8)
rgrover1 103:138bdc859cc9 26 /** The lower 8 bits (of a 16 bit value) */
rgrover1 103:138bdc859cc9 27 #define LSB(a) ((a) & 0xFF)
rgrover1 103:138bdc859cc9 28
rgrover1 103:138bdc859cc9 29 /** Leaves the minimum of the two arguments */
rgrover1 103:138bdc859cc9 30 /*lint -emacro(506, MIN) */ /* Suppress "Constant value Boolean */
rgrover1 103:138bdc859cc9 31 #define MIN(a, b) ((a) < (b) ? (a) : (b))
rgrover1 103:138bdc859cc9 32 /** Leaves the maximum of the two arguments */
rgrover1 103:138bdc859cc9 33 /*lint -emacro(506, MAX) */ /* Suppress "Constant value Boolean */
rgrover1 103:138bdc859cc9 34 #define MAX(a, b) ((a) < (b) ? (b) : (a))
rgrover1 103:138bdc859cc9 35
rgrover1 103:138bdc859cc9 36 #define BIT_0 0x01 /**< The value of bit 0 */
rgrover1 103:138bdc859cc9 37 #define BIT_1 0x02 /**< The value of bit 1 */
rgrover1 103:138bdc859cc9 38 #define BIT_2 0x04 /**< The value of bit 2 */
rgrover1 103:138bdc859cc9 39 #define BIT_3 0x08 /**< The value of bit 3 */
rgrover1 103:138bdc859cc9 40 #define BIT_4 0x10 /**< The value of bit 4 */
rgrover1 103:138bdc859cc9 41 #define BIT_5 0x20 /**< The value of bit 5 */
rgrover1 103:138bdc859cc9 42 #define BIT_6 0x40 /**< The value of bit 6 */
rgrover1 103:138bdc859cc9 43 #define BIT_7 0x80 /**< The value of bit 7 */
rgrover1 103:138bdc859cc9 44 #define BIT_8 0x0100 /**< The value of bit 8 */
rgrover1 103:138bdc859cc9 45 #define BIT_9 0x0200 /**< The value of bit 9 */
rgrover1 103:138bdc859cc9 46 #define BIT_10 0x0400 /**< The value of bit 10 */
rgrover1 103:138bdc859cc9 47 #define BIT_11 0x0800 /**< The value of bit 11 */
rgrover1 103:138bdc859cc9 48 #define BIT_12 0x1000 /**< The value of bit 12 */
rgrover1 103:138bdc859cc9 49 #define BIT_13 0x2000 /**< The value of bit 13 */
rgrover1 103:138bdc859cc9 50 #define BIT_14 0x4000 /**< The value of bit 14 */
rgrover1 103:138bdc859cc9 51 #define BIT_15 0x8000 /**< The value of bit 15 */
rgrover1 103:138bdc859cc9 52 #define BIT_16 0x00010000 /**< The value of bit 16 */
rgrover1 103:138bdc859cc9 53 #define BIT_17 0x00020000 /**< The value of bit 17 */
rgrover1 103:138bdc859cc9 54 #define BIT_18 0x00040000 /**< The value of bit 18 */
rgrover1 103:138bdc859cc9 55 #define BIT_19 0x00080000 /**< The value of bit 19 */
rgrover1 103:138bdc859cc9 56 #define BIT_20 0x00100000 /**< The value of bit 20 */
rgrover1 103:138bdc859cc9 57 #define BIT_21 0x00200000 /**< The value of bit 21 */
rgrover1 103:138bdc859cc9 58 #define BIT_22 0x00400000 /**< The value of bit 22 */
rgrover1 103:138bdc859cc9 59 #define BIT_23 0x00800000 /**< The value of bit 23 */
rgrover1 103:138bdc859cc9 60 #define BIT_24 0x01000000 /**< The value of bit 24 */
rgrover1 103:138bdc859cc9 61 #define BIT_25 0x02000000 /**< The value of bit 25 */
rgrover1 103:138bdc859cc9 62 #define BIT_26 0x04000000 /**< The value of bit 26 */
rgrover1 103:138bdc859cc9 63 #define BIT_27 0x08000000 /**< The value of bit 27 */
rgrover1 103:138bdc859cc9 64 #define BIT_28 0x10000000 /**< The value of bit 28 */
rgrover1 103:138bdc859cc9 65 #define BIT_29 0x20000000 /**< The value of bit 29 */
rgrover1 103:138bdc859cc9 66 #define BIT_30 0x40000000 /**< The value of bit 30 */
rgrover1 103:138bdc859cc9 67 #define BIT_31 0x80000000 /**< The value of bit 31 */
rgrover1 103:138bdc859cc9 68
rgrover1 103:138bdc859cc9 69 #define UNUSED_VARIABLE(X) ((void)(X))
rgrover1 103:138bdc859cc9 70 #define UNUSED_PARAMETER(X) UNUSED_VARIABLE(X)
rgrover1 103:138bdc859cc9 71
rgrover1 103:138bdc859cc9 72 #endif // NORDIC_COMMON_H__