added prescaler for 16 bit pwm in LPC1347 target
Fork of mbed-dev by
targets/cmsis/TARGET_Freescale/TARGET_KL27Z/TOOLCHAIN_ARM_STD/sys.cpp@121:7f86b4238bec, 2016-05-03 (annotated)
- 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?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 121:7f86b4238bec | 1 | /* mbed Microcontroller Library - stackheap |
mbed_official | 121:7f86b4238bec | 2 | * Copyright (C) 2009-2011 ARM Limited. All rights reserved. |
mbed_official | 121:7f86b4238bec | 3 | * |
mbed_official | 121:7f86b4238bec | 4 | * Setup a fixed single stack/heap memory model, |
mbed_official | 121:7f86b4238bec | 5 | * between the top of the RW/ZI region and the stackpointer |
mbed_official | 121:7f86b4238bec | 6 | */ |
mbed_official | 121:7f86b4238bec | 7 | |
mbed_official | 121:7f86b4238bec | 8 | #ifdef __cplusplus |
mbed_official | 121:7f86b4238bec | 9 | extern "C" { |
mbed_official | 121:7f86b4238bec | 10 | #endif |
mbed_official | 121:7f86b4238bec | 11 | |
mbed_official | 121:7f86b4238bec | 12 | #include <rt_misc.h> |
mbed_official | 121:7f86b4238bec | 13 | #include <stdint.h> |
mbed_official | 121:7f86b4238bec | 14 | |
mbed_official | 121:7f86b4238bec | 15 | extern char Image$$RW_IRAM1$$ZI$$Limit[]; |
mbed_official | 121:7f86b4238bec | 16 | |
mbed_official | 121:7f86b4238bec | 17 | extern __value_in_regs struct __initial_stackheap __user_setup_stackheap(uint32_t R0, uint32_t R1, uint32_t R2, uint32_t R3) { |
mbed_official | 121:7f86b4238bec | 18 | uint32_t zi_limit = (uint32_t)Image$$RW_IRAM1$$ZI$$Limit; |
mbed_official | 121:7f86b4238bec | 19 | uint32_t sp_limit = __current_sp(); |
mbed_official | 121:7f86b4238bec | 20 | |
mbed_official | 121:7f86b4238bec | 21 | zi_limit = (zi_limit + 7) & ~0x7; // ensure zi_limit is 8-byte aligned |
mbed_official | 121:7f86b4238bec | 22 | |
mbed_official | 121:7f86b4238bec | 23 | struct __initial_stackheap r; |
mbed_official | 121:7f86b4238bec | 24 | r.heap_base = zi_limit; |
mbed_official | 121:7f86b4238bec | 25 | r.heap_limit = sp_limit; |
mbed_official | 121:7f86b4238bec | 26 | return r; |
mbed_official | 121:7f86b4238bec | 27 | } |
mbed_official | 121:7f86b4238bec | 28 | |
mbed_official | 121:7f86b4238bec | 29 | #ifdef __cplusplus |
mbed_official | 121:7f86b4238bec | 30 | } |
mbed_official | 121:7f86b4238bec | 31 | #endif |