added prescaler for 16 bit pwm in LPC1347 target

Fork of mbed-dev by mbed official

Committer:
JojoS
Date:
Sat Sep 10 15:32:04 2016 +0000
Revision:
147:ba84b7dc41a7
Parent:
121:7f86b4238bec
added prescaler for 16 bit timers (solution as in LPC11xx), default prescaler 31 for max 28 ms period time

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 121:7f86b4238bec 1 /*
mbed_official 121:7f86b4238bec 2 * Copyright (c) 2016, Freescale Semiconductor, Inc.
mbed_official 121:7f86b4238bec 3 * All rights reserved.
mbed_official 121:7f86b4238bec 4 *
mbed_official 121:7f86b4238bec 5 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 121:7f86b4238bec 6 * are permitted provided that the following conditions are met:
mbed_official 121:7f86b4238bec 7 *
mbed_official 121:7f86b4238bec 8 * o Redistributions of source code must retain the above copyright notice, this list
mbed_official 121:7f86b4238bec 9 * of conditions and the following disclaimer.
mbed_official 121:7f86b4238bec 10 *
mbed_official 121:7f86b4238bec 11 * o Redistributions in binary form must reproduce the above copyright notice, this
mbed_official 121:7f86b4238bec 12 * list of conditions and the following disclaimer in the documentation and/or
mbed_official 121:7f86b4238bec 13 * other materials provided with the distribution.
mbed_official 121:7f86b4238bec 14 *
mbed_official 121:7f86b4238bec 15 * o Neither the name of Freescale Semiconductor, Inc. nor the names of its
mbed_official 121:7f86b4238bec 16 * contributors may be used to endorse or promote products derived from this
mbed_official 121:7f86b4238bec 17 * software without specific prior written permission.
mbed_official 121:7f86b4238bec 18 *
mbed_official 121:7f86b4238bec 19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
mbed_official 121:7f86b4238bec 20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
mbed_official 121:7f86b4238bec 21 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 121:7f86b4238bec 22 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
mbed_official 121:7f86b4238bec 23 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
mbed_official 121:7f86b4238bec 24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
mbed_official 121:7f86b4238bec 25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
mbed_official 121:7f86b4238bec 26 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
mbed_official 121:7f86b4238bec 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
mbed_official 121:7f86b4238bec 28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 121:7f86b4238bec 29 */
mbed_official 121:7f86b4238bec 30
mbed_official 121:7f86b4238bec 31 #ifndef _FSL_PERIPHERAL_CLOCK_H_
mbed_official 121:7f86b4238bec 32 #define _FSL_PERIPHERAL_CLOCK_H_
mbed_official 121:7f86b4238bec 33
mbed_official 121:7f86b4238bec 34 #include "fsl_clock.h"
mbed_official 121:7f86b4238bec 35
mbed_official 121:7f86b4238bec 36 /* Array for UART module clocks */
mbed_official 121:7f86b4238bec 37 #define UART_CLOCK_FREQS \
mbed_official 121:7f86b4238bec 38 { \
mbed_official 121:7f86b4238bec 39 kCLOCK_IpInvalid, kCLOCK_IpInvalid, UART2_CLK_SRC \
mbed_official 121:7f86b4238bec 40 }
mbed_official 121:7f86b4238bec 41
mbed_official 121:7f86b4238bec 42 /* Array for LPUART module clocks */
mbed_official 121:7f86b4238bec 43 #define LPUART_CLOCK_FREQS \
mbed_official 121:7f86b4238bec 44 { \
mbed_official 121:7f86b4238bec 45 kCLOCK_McgIrc48MClk, kCLOCK_McgIrc48MClk \
mbed_official 121:7f86b4238bec 46 }
mbed_official 121:7f86b4238bec 47
mbed_official 121:7f86b4238bec 48 /* Array for I2C module clocks */
mbed_official 121:7f86b4238bec 49 #define I2C_CLOCK_FREQS \
mbed_official 121:7f86b4238bec 50 { \
mbed_official 121:7f86b4238bec 51 I2C0_CLK_SRC, I2C1_CLK_SRC \
mbed_official 121:7f86b4238bec 52 }
mbed_official 121:7f86b4238bec 53
mbed_official 121:7f86b4238bec 54 /* Array for DSPI module clocks */
mbed_official 121:7f86b4238bec 55 #define SPI_CLOCK_FREQS \
mbed_official 121:7f86b4238bec 56 { \
mbed_official 121:7f86b4238bec 57 SPI0_CLK_SRC, SPI1_CLK_SRC \
mbed_official 121:7f86b4238bec 58 }
mbed_official 121:7f86b4238bec 59
mbed_official 121:7f86b4238bec 60 #endif /* _FSL_PERIPHERAL_CLOCK_H_ */