added prescaler for 16 bit pwm in LPC1347 target

Fork of mbed-dev by mbed official

Committer:
mbed_official
Date:
Tue May 03 00:15:16 2016 +0100
Revision:
121:7f86b4238bec
Synchronized with git revision 9cef243de23875778f461bbe9a8c1bc47e65212b

Full URL: https://github.com/mbedmicro/mbed/commit/9cef243de23875778f461bbe9a8c1bc47e65212b/

Switch to KSDK 2.0

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 121:7f86b4238bec 1 /* mbed Microcontroller Library
mbed_official 121:7f86b4238bec 2 * Copyright (c) 2006-2013 ARM Limited
mbed_official 121:7f86b4238bec 3 *
mbed_official 121:7f86b4238bec 4 * Licensed under the Apache License, Version 2.0 (the "License");
mbed_official 121:7f86b4238bec 5 * you may not use this file except in compliance with the License.
mbed_official 121:7f86b4238bec 6 * You may obtain a copy of the License at
mbed_official 121:7f86b4238bec 7 *
mbed_official 121:7f86b4238bec 8 * http://www.apache.org/licenses/LICENSE-2.0
mbed_official 121:7f86b4238bec 9 *
mbed_official 121:7f86b4238bec 10 * Unless required by applicable law or agreed to in writing, software
mbed_official 121:7f86b4238bec 11 * distributed under the License is distributed on an "AS IS" BASIS,
mbed_official 121:7f86b4238bec 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
mbed_official 121:7f86b4238bec 13 * See the License for the specific language governing permissions and
mbed_official 121:7f86b4238bec 14 * limitations under the License.
mbed_official 121:7f86b4238bec 15 */
mbed_official 121:7f86b4238bec 16 #include "gpio_api.h"
mbed_official 121:7f86b4238bec 17 #include "pinmap.h"
mbed_official 121:7f86b4238bec 18 #include "fsl_clock_config.h"
mbed_official 121:7f86b4238bec 19
mbed_official 121:7f86b4238bec 20 // called before main - implement here if board needs it otherwise, let
mbed_official 121:7f86b4238bec 21 // the application override this if necessary
mbed_official 121:7f86b4238bec 22 void mbed_sdk_init()
mbed_official 121:7f86b4238bec 23 {
mbed_official 121:7f86b4238bec 24 BOARD_BootClockRUN();
mbed_official 121:7f86b4238bec 25 }
mbed_official 121:7f86b4238bec 26
mbed_official 121:7f86b4238bec 27 // Enable the RTC oscillator if available on the board
mbed_official 121:7f86b4238bec 28 void rtc_setup_oscillator(RTC_Type *base)
mbed_official 121:7f86b4238bec 29 {
mbed_official 121:7f86b4238bec 30 /* Enable the RTC oscillator */
mbed_official 121:7f86b4238bec 31 RTC->CR |= RTC_CR_OSCE_MASK;
mbed_official 121:7f86b4238bec 32 }
mbed_official 121:7f86b4238bec 33
mbed_official 121:7f86b4238bec 34 // Change the NMI pin to an input. This allows NMI pin to
mbed_official 121:7f86b4238bec 35 // be used as a low power mode wakeup. The application will
mbed_official 121:7f86b4238bec 36 // need to change the pin back to NMI_b or wakeup only occurs once!
mbed_official 121:7f86b4238bec 37 void NMI_Handler(void)
mbed_official 121:7f86b4238bec 38 {
mbed_official 121:7f86b4238bec 39 gpio_t gpio;
mbed_official 121:7f86b4238bec 40 gpio_init_in(&gpio, PTA4);
mbed_official 121:7f86b4238bec 41 }