mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Committer:
mbed_official
Date:
Fri Sep 25 14:15:10 2015 +0100
Revision:
627:4fa1328d9c60
Parent:
608:14dd4108b341
Synchronized with git revision fe238a91ab7a4d1d72c4cab9da04967c619d54ad

Full URL: https://github.com/mbedmicro/mbed/commit/fe238a91ab7a4d1d72c4cab9da04967c619d54ad/

Silicon Labs - Add support for low-power async Serial

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 627:4fa1328d9c60 1 /***************************************************************************//**
mbed_official 627:4fa1328d9c60 2 * @file device_peripherals.h
mbed_official 627:4fa1328d9c60 3 *******************************************************************************
mbed_official 627:4fa1328d9c60 4 * @section License
mbed_official 627:4fa1328d9c60 5 * <b>(C) Copyright 2015 Silicon Labs, http://www.silabs.com</b>
mbed_official 627:4fa1328d9c60 6 *******************************************************************************
mbed_official 525:c320967f86b9 7 *
mbed_official 627:4fa1328d9c60 8 * Permission is granted to anyone to use this software for any purpose,
mbed_official 627:4fa1328d9c60 9 * including commercial applications, and to alter it and redistribute it
mbed_official 627:4fa1328d9c60 10 * freely, subject to the following restrictions:
mbed_official 525:c320967f86b9 11 *
mbed_official 627:4fa1328d9c60 12 * 1. The origin of this software must not be misrepresented; you must not
mbed_official 627:4fa1328d9c60 13 * claim that you wrote the original software.
mbed_official 627:4fa1328d9c60 14 * 2. Altered source versions must be plainly marked as such, and must not be
mbed_official 627:4fa1328d9c60 15 * misrepresented as being the original software.
mbed_official 627:4fa1328d9c60 16 * 3. This notice may not be removed or altered from any source distribution.
mbed_official 525:c320967f86b9 17 *
mbed_official 627:4fa1328d9c60 18 * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Labs has no
mbed_official 627:4fa1328d9c60 19 * obligation to support this Software. Silicon Labs is providing the
mbed_official 627:4fa1328d9c60 20 * Software "AS IS", with no express or implied warranties of any kind,
mbed_official 627:4fa1328d9c60 21 * including, but not limited to, any implied warranties of merchantability
mbed_official 627:4fa1328d9c60 22 * or fitness for any particular purpose or warranties against infringement
mbed_official 627:4fa1328d9c60 23 * of any proprietary rights of a third party.
mbed_official 627:4fa1328d9c60 24 *
mbed_official 627:4fa1328d9c60 25 * Silicon Labs will not be liable for any consequential, incidental, or
mbed_official 627:4fa1328d9c60 26 * special damages, or any other relief, or for any claim by any third party,
mbed_official 627:4fa1328d9c60 27 * arising from your use of this Software.
mbed_official 627:4fa1328d9c60 28 *
mbed_official 627:4fa1328d9c60 29 ******************************************************************************/
mbed_official 525:c320967f86b9 30 #ifndef MBED_DEVICE_PERIPHERALS_H
mbed_official 525:c320967f86b9 31 #define MBED_DEVICE_PERIPHERALS_H
mbed_official 525:c320967f86b9 32
mbed_official 525:c320967f86b9 33 /* us ticker */
mbed_official 525:c320967f86b9 34 #define US_TICKER_TIMER TIMER0
mbed_official 525:c320967f86b9 35 #define US_TICKER_TIMER_CLOCK cmuClock_TIMER0
mbed_official 525:c320967f86b9 36 #define US_TICKER_TIMER_IRQ TIMER0_IRQn
mbed_official 525:c320967f86b9 37
mbed_official 525:c320967f86b9 38 /* PWM */
mbed_official 525:c320967f86b9 39 #define PWM_TIMER TIMER2
mbed_official 525:c320967f86b9 40 #define PWM_TIMER_CLOCK cmuClock_TIMER2
mbed_official 525:c320967f86b9 41 #define PWM_ROUTE TIMER_ROUTE_LOCATION_LOC1
mbed_official 525:c320967f86b9 42
mbed_official 607:ae528ef7bd3d 43 /* USB */
mbed_official 607:ae528ef7bd3d 44 #define USB_TIMER USB_TIMER1
mbed_official 607:ae528ef7bd3d 45
mbed_official 525:c320967f86b9 46 /* Clocks */
mbed_official 525:c320967f86b9 47
mbed_official 525:c320967f86b9 48 /* Clock definitions */
mbed_official 627:4fa1328d9c60 49 #define LFXO 0
mbed_official 627:4fa1328d9c60 50 #define HFXO 1
mbed_official 627:4fa1328d9c60 51 #define LFRCO 2
mbed_official 627:4fa1328d9c60 52 #define HFRCO 3
mbed_official 525:c320967f86b9 53 #if !defined(_EFM32_GECKO_FAMILY)
mbed_official 627:4fa1328d9c60 54 #define ULFRCO 4
mbed_official 525:c320967f86b9 55 #endif
mbed_official 525:c320967f86b9 56
mbed_official 525:c320967f86b9 57 /* Low Energy peripheral clock source.
mbed_official 525:c320967f86b9 58 * Options:
mbed_official 525:c320967f86b9 59 * * LFXO: external crystal, please define frequency.
mbed_official 525:c320967f86b9 60 * * LFRCO: internal RC oscillator (32.768kHz)
mbed_official 525:c320967f86b9 61 * * ULFRCO: internal ultra-low power RC oscillator (available down to EM3) (1kHz)
mbed_official 525:c320967f86b9 62 */
mbed_official 525:c320967f86b9 63 #define LOW_ENERGY_CLOCK_SOURCE LFXO
mbed_official 525:c320967f86b9 64
mbed_official 525:c320967f86b9 65 /** Core clock source.
mbed_official 525:c320967f86b9 66 * Options:
mbed_official 525:c320967f86b9 67 * * HFXO: external crystal, please define frequency.
mbed_official 525:c320967f86b9 68 * * HFRCO: High-frequency internal RC oscillator. Please select band as well.
mbed_official 525:c320967f86b9 69 */
mbed_official 525:c320967f86b9 70 #define CORE_CLOCK_SOURCE HFXO
mbed_official 525:c320967f86b9 71
mbed_official 525:c320967f86b9 72 /** HFRCO frequency band
mbed_official 525:c320967f86b9 73 * Options:
mbed_official 525:c320967f86b9 74 * * CMU_HFRCOCTRL_BAND_28MHZ
mbed_official 525:c320967f86b9 75 * * CMU_HFRCOCTRL_BAND_21MHZ
mbed_official 525:c320967f86b9 76 * * CMU_HFRCOCTRL_BAND_14MHZ
mbed_official 525:c320967f86b9 77 * * CMU_HFRCOCTRL_BAND_11MHZ
mbed_official 525:c320967f86b9 78 * * CMU_HFRCOCTRL_BAND_7MHZ
mbed_official 525:c320967f86b9 79 * * CMU_HFRCOCTRL_BAND_1MHZ
mbed_official 525:c320967f86b9 80 */
mbed_official 525:c320967f86b9 81 #define HFRCO_FREQUENCY CMU_HFRCOCTRL_BAND_14MHZ
mbed_official 525:c320967f86b9 82
mbed_official 525:c320967f86b9 83 #define LFXO_FREQUENCY 32768
mbed_official 534:6cdb58309977 84 #define HFXO_FREQUENCY 48000000
mbed_official 525:c320967f86b9 85
mbed_official 525:c320967f86b9 86 #if (LOW_ENERGY_CLOCK_SOURCE == LFXO)
mbed_official 525:c320967f86b9 87 #define LOW_ENERGY_CLOCK_FREQUENCY LFXO_FREQUENCY
mbed_official 525:c320967f86b9 88 #elif (LOW_ENERGY_CLOCK_SOURCE == LFRCO)
mbed_official 525:c320967f86b9 89 #define LOW_ENERGY_CLOCK_FREQUENCY 32768
mbed_official 525:c320967f86b9 90 #elif (LOW_ENERGY_CLOCK_SOURCE == ULFRCO)
mbed_official 525:c320967f86b9 91 #define LOW_ENERGY_CLOCK_FREQUENCY 1000
mbed_official 525:c320967f86b9 92 #else
mbed_official 525:c320967f86b9 93 #error "Unknown Low Energy Clock selection"
mbed_official 525:c320967f86b9 94 #endif
mbed_official 525:c320967f86b9 95
mbed_official 525:c320967f86b9 96 #endif