mbed library sources. Supersedes mbed-src.

Fork of mbed-dev by mbed official

Committer:
<>
Date:
Fri Oct 28 11:17:30 2016 +0100
Revision:
149:156823d33999
Parent:
targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32PG_STK3401/device_peripherals.h@144:ef7eb2e8f9f7
This updates the lib to the mbed lib v128

NOTE: This release includes a restructuring of the file and directory locations and thus some
include paths in your code may need updating accordingly.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 50:a417edff4437 1 /***************************************************************************//**
mbed_official 50:a417edff4437 2 * @file device_peripherals.h
mbed_official 50:a417edff4437 3 *******************************************************************************
mbed_official 50:a417edff4437 4 * @section License
mbed_official 50:a417edff4437 5 * <b>(C) Copyright 2015 Silicon Labs, http://www.silabs.com</b>
mbed_official 50:a417edff4437 6 *******************************************************************************
mbed_official 50:a417edff4437 7 *
<> 144:ef7eb2e8f9f7 8 * SPDX-License-Identifier: Apache-2.0
mbed_official 50:a417edff4437 9 *
<> 144:ef7eb2e8f9f7 10 * Licensed under the Apache License, Version 2.0 (the "License"); you may
<> 144:ef7eb2e8f9f7 11 * not use this file except in compliance with the License.
<> 144:ef7eb2e8f9f7 12 * You may obtain a copy of the License at
mbed_official 50:a417edff4437 13 *
<> 144:ef7eb2e8f9f7 14 * http://www.apache.org/licenses/LICENSE-2.0
mbed_official 50:a417edff4437 15 *
<> 144:ef7eb2e8f9f7 16 * Unless required by applicable law or agreed to in writing, software
<> 144:ef7eb2e8f9f7 17 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
<> 144:ef7eb2e8f9f7 18 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<> 144:ef7eb2e8f9f7 19 * See the License for the specific language governing permissions and
<> 144:ef7eb2e8f9f7 20 * limitations under the License.
mbed_official 50:a417edff4437 21 *
mbed_official 50:a417edff4437 22 ******************************************************************************/
mbed_official 50:a417edff4437 23 #ifndef MBED_DEVICE_PERIPHERALS_H
mbed_official 50:a417edff4437 24 #define MBED_DEVICE_PERIPHERALS_H
mbed_official 50:a417edff4437 25
mbed_official 50:a417edff4437 26 /* us ticker */
mbed_official 50:a417edff4437 27 #define US_TICKER_TIMER TIMER0
mbed_official 54:2a2065e67ef6 28 #define US_TICKER_TIMER_CLOCK cmuClock_TIMER0
mbed_official 50:a417edff4437 29 #define US_TICKER_TIMER_IRQ TIMER0_IRQn
mbed_official 50:a417edff4437 30
mbed_official 50:a417edff4437 31 /* PWM */
mbed_official 50:a417edff4437 32 #define PWM_TIMER TIMER1
mbed_official 50:a417edff4437 33 #define PWM_TIMER_CLOCK cmuClock_TIMER1
mbed_official 50:a417edff4437 34 #define PWM_ROUTE TIMER_ROUTE_LOCATION_LOC1
mbed_official 50:a417edff4437 35
mbed_official 50:a417edff4437 36 /* Clocks */
mbed_official 50:a417edff4437 37
mbed_official 50:a417edff4437 38 /* Clock definitions */
mbed_official 50:a417edff4437 39 #define LFXO 0
mbed_official 50:a417edff4437 40 #define HFXO 1
mbed_official 50:a417edff4437 41 #define LFRCO 2
mbed_official 50:a417edff4437 42 #define HFRCO 3
mbed_official 50:a417edff4437 43 #define ULFRCO 4
mbed_official 50:a417edff4437 44
mbed_official 50:a417edff4437 45
mbed_official 50:a417edff4437 46 /* Low Energy peripheral clock source.
mbed_official 50:a417edff4437 47 * Options:
mbed_official 54:2a2065e67ef6 48 * * LFXO: external crystal, please define frequency.
mbed_official 54:2a2065e67ef6 49 * * LFRCO: internal RC oscillator (32.768kHz)
mbed_official 54:2a2065e67ef6 50 * * ULFRCO: internal ultra-low power RC oscillator (available down to EM3) (1kHz)
mbed_official 50:a417edff4437 51 */
mbed_official 54:2a2065e67ef6 52 #define LOW_ENERGY_CLOCK_SOURCE LFXO
mbed_official 50:a417edff4437 53
mbed_official 50:a417edff4437 54 /** Core clock source.
mbed_official 50:a417edff4437 55 * Options:
mbed_official 54:2a2065e67ef6 56 * * HFXO: external crystal, please define frequency.
mbed_official 54:2a2065e67ef6 57 * * HFRCO: High-frequency internal RC oscillator. Please select frequency as well.
mbed_official 50:a417edff4437 58 */
mbed_official 54:2a2065e67ef6 59 #define CORE_CLOCK_SOURCE HFXO
mbed_official 50:a417edff4437 60
mbed_official 54:2a2065e67ef6 61 /** HFRCO frequency selection
mbed_official 54:2a2065e67ef6 62 * Options:
mbed_official 54:2a2065e67ef6 63 * ** HFRCO_FREQUENCY_ENUM ** HFRCO_FREQUENCY **
mbed_official 54:2a2065e67ef6 64 * * cmuHFRCOFreq_1M0Hz == 1000000 *
mbed_official 54:2a2065e67ef6 65 * * cmuHFRCOFreq_2M0Hz == 2000000 *
mbed_official 54:2a2065e67ef6 66 * * cmuHFRCOFreq_4M0Hz == 4000000 *
mbed_official 54:2a2065e67ef6 67 * * cmuHFRCOFreq_7M0Hz == 7000000 *
mbed_official 54:2a2065e67ef6 68 * * cmuHFRCOFreq_13M0Hz == 13000000 *
mbed_official 54:2a2065e67ef6 69 * * cmuHFRCOFreq_16M0Hz == 16000000 *
mbed_official 54:2a2065e67ef6 70 * * cmuHFRCOFreq_19M0Hz == 19000000 *
mbed_official 54:2a2065e67ef6 71 * * cmuHFRCOFreq_26M0Hz == 26000000 *
mbed_official 54:2a2065e67ef6 72 * * cmuHFRCOFreq_32M0Hz == 32000000 *
mbed_official 54:2a2065e67ef6 73 * * cmuHFRCOFreq_38M0Hz == 38000000 *
mbed_official 54:2a2065e67ef6 74 * *********************************************
mbed_official 54:2a2065e67ef6 75 */
mbed_official 54:2a2065e67ef6 76
mbed_official 54:2a2065e67ef6 77 /* Make sure the settings of HFRCO_FREQUENCY and HFRCO_FREQUENCY_ENUM match, or timings will be faulty! */
mbed_official 54:2a2065e67ef6 78 #define HFRCO_FREQUENCY_ENUM cmuHFRCOFreq_19M0Hz
mbed_official 54:2a2065e67ef6 79 #define HFRCO_FREQUENCY 19000000
mbed_official 50:a417edff4437 80
mbed_official 54:2a2065e67ef6 81 #define LFXO_FREQUENCY 32768
mbed_official 54:2a2065e67ef6 82 #define HFXO_FREQUENCY 40000000
mbed_official 50:a417edff4437 83
mbed_official 50:a417edff4437 84 #if (LOW_ENERGY_CLOCK_SOURCE == LFXO)
mbed_official 54:2a2065e67ef6 85 #define LOW_ENERGY_CLOCK_FREQUENCY LFXO_FREQUENCY
mbed_official 50:a417edff4437 86 #elif (LOW_ENERGY_CLOCK_SOURCE == LFRCO)
mbed_official 54:2a2065e67ef6 87 #define LOW_ENERGY_CLOCK_FREQUENCY 32768
mbed_official 50:a417edff4437 88 #elif (LOW_ENERGY_CLOCK_SOURCE == ULFRCO)
mbed_official 54:2a2065e67ef6 89 #define LOW_ENERGY_CLOCK_FREQUENCY 1000
mbed_official 50:a417edff4437 90 #else
mbed_official 50:a417edff4437 91 #error "Unknown Low Energy Clock selection"
mbed_official 50:a417edff4437 92 #endif
mbed_official 50:a417edff4437 93
mbed_official 50:a417edff4437 94 #endif