added prescaler for 16 bit pwm in LPC1347 target

Fork of mbed-dev by mbed official

Committer:
<>
Date:
Fri Sep 02 15:07:44 2016 +0100
Revision:
144:ef7eb2e8f9f7
Parent:
50:a417edff4437
This updates the lib to the mbed lib v125

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 144:ef7eb2e8f9f7 1 /**************************************************************************//**
<> 144:ef7eb2e8f9f7 2 * @file em_int.c
<> 144:ef7eb2e8f9f7 3 * @brief Interrupt enable/disable unit API
<> 144:ef7eb2e8f9f7 4 * @version 4.2.1
<> 144:ef7eb2e8f9f7 5 ******************************************************************************
<> 144:ef7eb2e8f9f7 6 * @section License
<> 144:ef7eb2e8f9f7 7 * <b>(C) Copyright 2015 Silicon Labs, http://www.silabs.com</b>
<> 144:ef7eb2e8f9f7 8 *******************************************************************************
<> 144:ef7eb2e8f9f7 9 *
<> 144:ef7eb2e8f9f7 10 * Permission is granted to anyone to use this software for any purpose,
<> 144:ef7eb2e8f9f7 11 * including commercial applications, and to alter it and redistribute it
<> 144:ef7eb2e8f9f7 12 * freely, subject to the following restrictions:
<> 144:ef7eb2e8f9f7 13 *
<> 144:ef7eb2e8f9f7 14 * 1. The origin of this software must not be misrepresented; you must not
<> 144:ef7eb2e8f9f7 15 * claim that you wrote the original software.
<> 144:ef7eb2e8f9f7 16 * 2. Altered source versions must be plainly marked as such, and must not be
<> 144:ef7eb2e8f9f7 17 * misrepresented as being the original software.
<> 144:ef7eb2e8f9f7 18 * 3. This notice may not be removed or altered from any source distribution.
<> 144:ef7eb2e8f9f7 19 *
<> 144:ef7eb2e8f9f7 20 * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Labs has no
<> 144:ef7eb2e8f9f7 21 * obligation to support this Software. Silicon Labs is providing the
<> 144:ef7eb2e8f9f7 22 * Software "AS IS", with no express or implied warranties of any kind,
<> 144:ef7eb2e8f9f7 23 * including, but not limited to, any implied warranties of merchantability
<> 144:ef7eb2e8f9f7 24 * or fitness for any particular purpose or warranties against infringement
<> 144:ef7eb2e8f9f7 25 * of any proprietary rights of a third party.
<> 144:ef7eb2e8f9f7 26 *
<> 144:ef7eb2e8f9f7 27 * Silicon Labs will not be liable for any consequential, incidental, or
<> 144:ef7eb2e8f9f7 28 * special damages, or any other relief, or for any claim by any third party,
<> 144:ef7eb2e8f9f7 29 * arising from your use of this Software.
<> 144:ef7eb2e8f9f7 30 *
<> 144:ef7eb2e8f9f7 31 ******************************************************************************/
<> 144:ef7eb2e8f9f7 32
<> 144:ef7eb2e8f9f7 33 #include <stdint.h>
<> 144:ef7eb2e8f9f7 34 #include "em_int.h"
<> 144:ef7eb2e8f9f7 35
<> 144:ef7eb2e8f9f7 36 /***************************************************************************//**
<> 144:ef7eb2e8f9f7 37 * @addtogroup EM_Library
<> 144:ef7eb2e8f9f7 38 * @{
<> 144:ef7eb2e8f9f7 39 ******************************************************************************/
<> 144:ef7eb2e8f9f7 40
<> 144:ef7eb2e8f9f7 41 /***************************************************************************//**
<> 144:ef7eb2e8f9f7 42 * @addtogroup INT
<> 144:ef7eb2e8f9f7 43 * @brief Safe nesting of interrupt disable/enable API
<> 144:ef7eb2e8f9f7 44 * @{
<> 144:ef7eb2e8f9f7 45 * @details
<> 144:ef7eb2e8f9f7 46 * This module contains functions to safely disable and enable interrupts
<> 144:ef7eb2e8f9f7 47 * at CPU level. INT_Disable() disables interrupts globally and increments a lock
<> 144:ef7eb2e8f9f7 48 * level counter (counting semaphore). INT_Enable() decrements the lock level
<> 144:ef7eb2e8f9f7 49 * counter and enable interrupts if the counter reaches zero.
<> 144:ef7eb2e8f9f7 50 *
<> 144:ef7eb2e8f9f7 51 * These functions would normally be used to secure critical regions, and
<> 144:ef7eb2e8f9f7 52 * to make sure that a critical section that calls into another critical
<> 144:ef7eb2e8f9f7 53 * section does not unintentionally terminate the callee critical section.
<> 144:ef7eb2e8f9f7 54 *
<> 144:ef7eb2e8f9f7 55 * These functions should also be used inside interrupt handlers:
<> 144:ef7eb2e8f9f7 56 * @verbatim
<> 144:ef7eb2e8f9f7 57 * void SysTick_Handler(void)
<> 144:ef7eb2e8f9f7 58 * {
<> 144:ef7eb2e8f9f7 59 * INT_Disable();
<> 144:ef7eb2e8f9f7 60 * .
<> 144:ef7eb2e8f9f7 61 * .
<> 144:ef7eb2e8f9f7 62 * .
<> 144:ef7eb2e8f9f7 63 * INT_Enable();
<> 144:ef7eb2e8f9f7 64 * }
<> 144:ef7eb2e8f9f7 65 * @endverbatim
<> 144:ef7eb2e8f9f7 66 ******************************************************************************/
<> 144:ef7eb2e8f9f7 67
<> 144:ef7eb2e8f9f7 68 /** Interrupt lock level counter. Set to zero initially as we normally enter
<> 144:ef7eb2e8f9f7 69 * main with interrupts enabled */
<> 144:ef7eb2e8f9f7 70 uint32_t INT_LockCnt = 0;
<> 144:ef7eb2e8f9f7 71
<> 144:ef7eb2e8f9f7 72 /** @} (end addtogroup INT) */
<> 144:ef7eb2e8f9f7 73 /** @} (end addtogroup EM_Library) */