Patched version of nrf51822 FOTA compatible driver, with GPTIO disabled, as it clashed with the mbed definitions...

Fork of nRF51822 by Nordic Semiconductor

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers common.h Source File

common.h

00001  /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved.
00002  *
00003  * The information contained herein is property of Nordic Semiconductor ASA.
00004  * Terms and conditions of usage are described in detail in NORDIC
00005  * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
00006  *
00007  * Licensees are granted free, non-transferable use of the information. NO
00008  * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
00009  * the file.
00010  *
00011  */
00012 
00013 #ifndef COMMON_H
00014 #define COMMON_H
00015 
00016 /*lint ++flb "Enter library region" */
00017 
00018 #include <stdbool.h>
00019 #include <stdint.h>
00020 
00021 /* @file
00022 * @brief Common header file for generic macros and definitions
00023  *
00024  */
00025 
00026 /*
00027  * GPIO glue macros, this can be used to define a pin number in source/header file and use that macro for pin
00028  * configuration using this expansion.
00029  * example:
00030  * #define RESET_PIN    8
00031  * NRF_GPIO->PINCNF(RESET_PIN) = XXX  ;  // Expanded NRF_GPIO->PIN_CNF[8] = XXX
00032  */
00033 #define PINX_GLUE(x, y, z)       x##y##_##z            /*!< first level glue for pin macros */
00034 #define PINCNF(p)                PINX_GLUE(PIN,p,CNF)  /*!< gpio configure pin number 'p' */
00035 #define PINOUT(p)                PINX_GLUE(PIN,p,OUT)  /*!< gpio out pin number 'p' */
00036 
00037 /*lint --flb "Leave library region" */
00038 #endif