added prescaler for 16 bit pwm in LPC1347 target
Fork of mbed-dev by
targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/rtc_api_HAL.h@0:9b334a45a8ff, 2015-10-01 (annotated)
- Committer:
- bogdanm
- Date:
- Thu Oct 01 15:25:22 2015 +0300
- Revision:
- 0:9b334a45a8ff
- Child:
- 144:ef7eb2e8f9f7
Initial commit on mbed-dev
Replaces mbed-src (now inactive)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bogdanm | 0:9b334a45a8ff | 1 | /***************************************************************************//** |
bogdanm | 0:9b334a45a8ff | 2 | * @file rtc_api_HAL.h |
bogdanm | 0:9b334a45a8ff | 3 | ******************************************************************************* |
bogdanm | 0:9b334a45a8ff | 4 | * @section License |
bogdanm | 0:9b334a45a8ff | 5 | * <b>(C) Copyright 2015 Silicon Labs, http://www.silabs.com</b> |
bogdanm | 0:9b334a45a8ff | 6 | ******************************************************************************* |
bogdanm | 0:9b334a45a8ff | 7 | * |
bogdanm | 0:9b334a45a8ff | 8 | * Permission is granted to anyone to use this software for any purpose, |
bogdanm | 0:9b334a45a8ff | 9 | * including commercial applications, and to alter it and redistribute it |
bogdanm | 0:9b334a45a8ff | 10 | * freely, subject to the following restrictions: |
bogdanm | 0:9b334a45a8ff | 11 | * |
bogdanm | 0:9b334a45a8ff | 12 | * 1. The origin of this software must not be misrepresented; you must not |
bogdanm | 0:9b334a45a8ff | 13 | * claim that you wrote the original software. |
bogdanm | 0:9b334a45a8ff | 14 | * 2. Altered source versions must be plainly marked as such, and must not be |
bogdanm | 0:9b334a45a8ff | 15 | * misrepresented as being the original software. |
bogdanm | 0:9b334a45a8ff | 16 | * 3. This notice may not be removed or altered from any source distribution. |
bogdanm | 0:9b334a45a8ff | 17 | * |
bogdanm | 0:9b334a45a8ff | 18 | * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Labs has no |
bogdanm | 0:9b334a45a8ff | 19 | * obligation to support this Software. Silicon Labs is providing the |
bogdanm | 0:9b334a45a8ff | 20 | * Software "AS IS", with no express or implied warranties of any kind, |
bogdanm | 0:9b334a45a8ff | 21 | * including, but not limited to, any implied warranties of merchantability |
bogdanm | 0:9b334a45a8ff | 22 | * or fitness for any particular purpose or warranties against infringement |
bogdanm | 0:9b334a45a8ff | 23 | * of any proprietary rights of a third party. |
bogdanm | 0:9b334a45a8ff | 24 | * |
bogdanm | 0:9b334a45a8ff | 25 | * Silicon Labs will not be liable for any consequential, incidental, or |
bogdanm | 0:9b334a45a8ff | 26 | * special damages, or any other relief, or for any claim by any third party, |
bogdanm | 0:9b334a45a8ff | 27 | * arising from your use of this Software. |
bogdanm | 0:9b334a45a8ff | 28 | * |
bogdanm | 0:9b334a45a8ff | 29 | ******************************************************************************/ |
bogdanm | 0:9b334a45a8ff | 30 | |
bogdanm | 0:9b334a45a8ff | 31 | #ifndef MBED_RTC_API_HAL_H |
bogdanm | 0:9b334a45a8ff | 32 | #define MBED_RTC_API_HAL_H |
bogdanm | 0:9b334a45a8ff | 33 | |
bogdanm | 0:9b334a45a8ff | 34 | #include <stdint.h> |
bogdanm | 0:9b334a45a8ff | 35 | #include "rtc_api.h" |
bogdanm | 0:9b334a45a8ff | 36 | #include "em_rtc.h" |
bogdanm | 0:9b334a45a8ff | 37 | |
bogdanm | 0:9b334a45a8ff | 38 | #define RTC_CLOCKDIV cmuClkDiv_8 |
bogdanm | 0:9b334a45a8ff | 39 | #define RTC_CLOCKDIV_INT 8 |
bogdanm | 0:9b334a45a8ff | 40 | #define RTC_FREQ_SHIFT 12 |
bogdanm | 0:9b334a45a8ff | 41 | |
bogdanm | 0:9b334a45a8ff | 42 | |
bogdanm | 0:9b334a45a8ff | 43 | #define RTC_INIT_LPTIMER (1 << 1) |
bogdanm | 0:9b334a45a8ff | 44 | #define RTC_INIT_RTC (1 << 0) |
bogdanm | 0:9b334a45a8ff | 45 | |
bogdanm | 0:9b334a45a8ff | 46 | #ifdef __cplusplus |
bogdanm | 0:9b334a45a8ff | 47 | extern "C" { |
bogdanm | 0:9b334a45a8ff | 48 | #endif |
bogdanm | 0:9b334a45a8ff | 49 | |
bogdanm | 0:9b334a45a8ff | 50 | /* Purpose of this file: extend rtc_api.h to include EFM-specific stuff*/ |
bogdanm | 0:9b334a45a8ff | 51 | void rtc_set_comp0_handler(uint32_t handler); |
bogdanm | 0:9b334a45a8ff | 52 | |
bogdanm | 0:9b334a45a8ff | 53 | void rtc_init_real(uint32_t flags); |
bogdanm | 0:9b334a45a8ff | 54 | void rtc_free_real(uint32_t flags); |
bogdanm | 0:9b334a45a8ff | 55 | |
bogdanm | 0:9b334a45a8ff | 56 | #ifdef __cplusplus |
bogdanm | 0:9b334a45a8ff | 57 | } |
bogdanm | 0:9b334a45a8ff | 58 | #endif |
bogdanm | 0:9b334a45a8ff | 59 | |
bogdanm | 0:9b334a45a8ff | 60 | #endif |