• Main Page
  • Modules
  • Index
  • File List
  • Globals

hal/nordic_common.h

Go to the documentation of this file.
00001 /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved.
00002  *
00003  * The information contained herein is confidential property of Nordic 
00004  * Semiconductor ASA.Terms and conditions of usage are described in detail 
00005  * in NORDIC SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 
00006  *
00007  * Licensees are granted free, non-transferable use of the information. NO
00008  * WARRENTY of ANY KIND is provided. This heading must NOT be removed from
00009  * the file.
00010  *              
00011  * $LastChangedRevision: 2513 $
00012  */
00013 
00019 #ifndef NORDIC_COMMON_H__
00020 #define NORDIC_COMMON_H__
00021 
00023 //lint -emacro((572),SWAP) // Suppress warning 572 "Excessive shift value"
00024 #define SWAP(x) ((((x)&0xFFU)<<8)|(((x)>>8)&0xFFU))
00025 
00027 #define MSB(a) (((a) & 0xFF00U) >> 8)
00028 
00029 #define LSB(a) (((a) & 0xFFU))
00030 
00032 #define MIN(a, b) ((a) < (b) ? (a) : (b))
00033 
00034 #define MAX(a, b) ((a) < (b) ? (b) : (a))
00035 
00036 #define BIT_0 0x01U 
00037 #define BIT_1 0x02U 
00038 #define BIT_2 0x04U 
00039 #define BIT_3 0x08U 
00040 #define BIT_4 0x10U 
00041 #define BIT_5 0x20U 
00042 #define BIT_6 0x40U 
00043 #define BIT_7 0x80U 
00044 #define BIT_8 0x0100U 
00045 #define BIT_9 0x0200U 
00046 #define BIT_10 0x0400U 
00047 #define BIT_11 0x0800U 
00048 #define BIT_12 0x1000U 
00049 #define BIT_13 0x2000U 
00050 #define BIT_14 0x4000U 
00051 #define BIT_15 0x8000U 
00054 #endif // NORDIC_COMMON_H__

Generated on Fri Apr 20 2012 14:11:44 for nRFGo SDK by  doxygen 1.7.2