For scoop
Fork of nRF51822 by
nordic-sdk/components/libraries/util/common.h@187:02500109ccb8, 2015-06-11 (annotated)
- Committer:
- dkester
- Date:
- Thu Jun 11 20:58:18 2015 +0000
- Revision:
- 187:02500109ccb8
- Parent:
- 103:138bdc859cc9
change to goniometer;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rgrover1 | 103:138bdc859cc9 | 1 | /* Copyright (c) 2009 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 | |
rgrover1 | 103:138bdc859cc9 | 13 | #ifndef COMMON_H |
rgrover1 | 103:138bdc859cc9 | 14 | #define COMMON_H |
rgrover1 | 103:138bdc859cc9 | 15 | |
rgrover1 | 103:138bdc859cc9 | 16 | /*lint ++flb "Enter library region" */ |
rgrover1 | 103:138bdc859cc9 | 17 | |
rgrover1 | 103:138bdc859cc9 | 18 | #include <stdbool.h> |
rgrover1 | 103:138bdc859cc9 | 19 | #include <stdint.h> |
rgrover1 | 103:138bdc859cc9 | 20 | |
rgrover1 | 103:138bdc859cc9 | 21 | /* @file |
rgrover1 | 103:138bdc859cc9 | 22 | * @brief Common header file for generic macros and definitions |
rgrover1 | 103:138bdc859cc9 | 23 | * |
rgrover1 | 103:138bdc859cc9 | 24 | */ |
rgrover1 | 103:138bdc859cc9 | 25 | |
rgrover1 | 103:138bdc859cc9 | 26 | /* |
rgrover1 | 103:138bdc859cc9 | 27 | * GPIO glue macros, this can be used to define a pin number in source/header file and use that macro for pin |
rgrover1 | 103:138bdc859cc9 | 28 | * configuration using this expansion. |
rgrover1 | 103:138bdc859cc9 | 29 | * example: |
rgrover1 | 103:138bdc859cc9 | 30 | * #define RESET_PIN 8 |
rgrover1 | 103:138bdc859cc9 | 31 | * NRF_GPIO->PINCNF(RESET_PIN) = XXX ; // Expanded NRF_GPIO->PIN_CNF[8] = XXX |
rgrover1 | 103:138bdc859cc9 | 32 | */ |
rgrover1 | 103:138bdc859cc9 | 33 | #define PINX_GLUE(x, y, z) x##y##_##z /*!< first level glue for pin macros */ |
rgrover1 | 103:138bdc859cc9 | 34 | #define PINCNF(p) PINX_GLUE(PIN,p,CNF) /*!< gpio configure pin number 'p' */ |
rgrover1 | 103:138bdc859cc9 | 35 | #define PINOUT(p) PINX_GLUE(PIN,p,OUT) /*!< gpio out pin number 'p' */ |
rgrover1 | 103:138bdc859cc9 | 36 | |
rgrover1 | 103:138bdc859cc9 | 37 | /*lint --flb "Leave library region" */ |
rgrover1 | 103:138bdc859cc9 | 38 | #endif |