project for nrf51822 qfab
Dependencies: eddystone_URL mbed
Fork of eddystone_URL by
nRF51822/nordic/nrf-sdk/system_nrf51.h@5:267bdacf5508, 2017-11-23 (annotated)
- Committer:
- tridung141196
- Date:
- Thu Nov 23 15:38:48 2017 +0000
- Revision:
- 5:267bdacf5508
- Parent:
- 0:76dfa9657d9d
ibeacon
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jksoft | 0:76dfa9657d9d | 1 | /* Copyright (c) 2013, Nordic Semiconductor ASA |
jksoft | 0:76dfa9657d9d | 2 | * All rights reserved. |
jksoft | 0:76dfa9657d9d | 3 | * |
jksoft | 0:76dfa9657d9d | 4 | * Redistribution and use in source and binary forms, with or without |
jksoft | 0:76dfa9657d9d | 5 | * modification, are permitted provided that the following conditions are met: |
jksoft | 0:76dfa9657d9d | 6 | * |
jksoft | 0:76dfa9657d9d | 7 | * * Redistributions of source code must retain the above copyright notice, this |
jksoft | 0:76dfa9657d9d | 8 | * list of conditions and the following disclaimer. |
jksoft | 0:76dfa9657d9d | 9 | * |
jksoft | 0:76dfa9657d9d | 10 | * * Redistributions in binary form must reproduce the above copyright notice, |
jksoft | 0:76dfa9657d9d | 11 | * this list of conditions and the following disclaimer in the documentation |
jksoft | 0:76dfa9657d9d | 12 | * and/or other materials provided with the distribution. |
jksoft | 0:76dfa9657d9d | 13 | * |
jksoft | 0:76dfa9657d9d | 14 | * * Neither the name of Nordic Semiconductor ASA nor the names of its |
jksoft | 0:76dfa9657d9d | 15 | * contributors may be used to endorse or promote products derived from |
jksoft | 0:76dfa9657d9d | 16 | * this software without specific prior written permission. |
jksoft | 0:76dfa9657d9d | 17 | * |
jksoft | 0:76dfa9657d9d | 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
jksoft | 0:76dfa9657d9d | 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
jksoft | 0:76dfa9657d9d | 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
jksoft | 0:76dfa9657d9d | 21 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
jksoft | 0:76dfa9657d9d | 22 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
jksoft | 0:76dfa9657d9d | 23 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
jksoft | 0:76dfa9657d9d | 24 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
jksoft | 0:76dfa9657d9d | 25 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
jksoft | 0:76dfa9657d9d | 26 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
jksoft | 0:76dfa9657d9d | 27 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
jksoft | 0:76dfa9657d9d | 28 | * |
jksoft | 0:76dfa9657d9d | 29 | */ |
jksoft | 0:76dfa9657d9d | 30 | #ifndef SYSTEM_NRF51_H |
jksoft | 0:76dfa9657d9d | 31 | #define SYSTEM_NRF51_H |
jksoft | 0:76dfa9657d9d | 32 | |
jksoft | 0:76dfa9657d9d | 33 | #ifdef __cplusplus |
jksoft | 0:76dfa9657d9d | 34 | extern "C" { |
jksoft | 0:76dfa9657d9d | 35 | #endif |
jksoft | 0:76dfa9657d9d | 36 | |
jksoft | 0:76dfa9657d9d | 37 | #include <stdint.h> |
jksoft | 0:76dfa9657d9d | 38 | |
jksoft | 0:76dfa9657d9d | 39 | |
jksoft | 0:76dfa9657d9d | 40 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ |
jksoft | 0:76dfa9657d9d | 41 | |
jksoft | 0:76dfa9657d9d | 42 | /** |
jksoft | 0:76dfa9657d9d | 43 | * Initialize the system |
jksoft | 0:76dfa9657d9d | 44 | * |
jksoft | 0:76dfa9657d9d | 45 | * @param none |
jksoft | 0:76dfa9657d9d | 46 | * @return none |
jksoft | 0:76dfa9657d9d | 47 | * |
jksoft | 0:76dfa9657d9d | 48 | * @brief Setup the microcontroller system. |
jksoft | 0:76dfa9657d9d | 49 | * Initialize the System and update the SystemCoreClock variable. |
jksoft | 0:76dfa9657d9d | 50 | */ |
jksoft | 0:76dfa9657d9d | 51 | extern void SystemInit (void); |
jksoft | 0:76dfa9657d9d | 52 | |
jksoft | 0:76dfa9657d9d | 53 | /** |
jksoft | 0:76dfa9657d9d | 54 | * Update SystemCoreClock variable |
jksoft | 0:76dfa9657d9d | 55 | * |
jksoft | 0:76dfa9657d9d | 56 | * @param none |
jksoft | 0:76dfa9657d9d | 57 | * @return none |
jksoft | 0:76dfa9657d9d | 58 | * |
jksoft | 0:76dfa9657d9d | 59 | * @brief Updates the SystemCoreClock with current core Clock |
jksoft | 0:76dfa9657d9d | 60 | * retrieved from cpu registers. |
jksoft | 0:76dfa9657d9d | 61 | */ |
jksoft | 0:76dfa9657d9d | 62 | extern void SystemCoreClockUpdate (void); |
jksoft | 0:76dfa9657d9d | 63 | |
jksoft | 0:76dfa9657d9d | 64 | #ifdef __cplusplus |
jksoft | 0:76dfa9657d9d | 65 | } |
jksoft | 0:76dfa9657d9d | 66 | #endif |
jksoft | 0:76dfa9657d9d | 67 | |
jksoft | 0:76dfa9657d9d | 68 | #endif /* SYSTEM_NRF51_H */ |