added prescaler for 16 bit pwm in LPC1347 target
Fork of mbed-dev by
targets/cmsis/TARGET_NXP/TARGET_LPC2460/core_arm7.c@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 | /* mbed Microcontroller Library |
bogdanm | 0:9b334a45a8ff | 2 | * Copyright (C) 2008-2015 ARM Limited. All rights reserved. |
bogdanm | 0:9b334a45a8ff | 3 | * |
bogdanm | 0:9b334a45a8ff | 4 | * ARM7 version of CMSIS-like functionality - not advised for use outside mbed! |
bogdanm | 0:9b334a45a8ff | 5 | * based on core_cm3.h, V1.20 |
bogdanm | 0:9b334a45a8ff | 6 | */ |
bogdanm | 0:9b334a45a8ff | 7 | |
bogdanm | 0:9b334a45a8ff | 8 | #include <stdint.h> |
bogdanm | 0:9b334a45a8ff | 9 | |
bogdanm | 0:9b334a45a8ff | 10 | |
bogdanm | 0:9b334a45a8ff | 11 | /* define compiler specific symbols */ |
bogdanm | 0:9b334a45a8ff | 12 | #if defined ( __CC_ARM ) |
bogdanm | 0:9b334a45a8ff | 13 | #define __ASM __asm /*!< asm keyword for armcc */ |
bogdanm | 0:9b334a45a8ff | 14 | #define __INLINE __inline /*!< inline keyword for armcc */ |
bogdanm | 0:9b334a45a8ff | 15 | |
bogdanm | 0:9b334a45a8ff | 16 | #elif defined ( __ICCARM__ ) |
bogdanm | 0:9b334a45a8ff | 17 | #define __ASM __asm /*!< asm keyword for iarcc */ |
bogdanm | 0:9b334a45a8ff | 18 | #define __INLINE inline /*!< inline keyword for iarcc. Only avaiable in High optimization mode! */ |
bogdanm | 0:9b334a45a8ff | 19 | |
bogdanm | 0:9b334a45a8ff | 20 | #elif defined ( __GNUC__ ) |
bogdanm | 0:9b334a45a8ff | 21 | #define __ASM __asm /*!< asm keyword for gcc */ |
bogdanm | 0:9b334a45a8ff | 22 | #define __INLINE inline /*!< inline keyword for gcc */ |
bogdanm | 0:9b334a45a8ff | 23 | |
bogdanm | 0:9b334a45a8ff | 24 | #elif defined ( __TASKING__ ) |
bogdanm | 0:9b334a45a8ff | 25 | #define __ASM __asm /*!< asm keyword for TASKING Compiler */ |
bogdanm | 0:9b334a45a8ff | 26 | #define __INLINE inline /*!< inline keyword for TASKING Compiler */ |
bogdanm | 0:9b334a45a8ff | 27 | |
bogdanm | 0:9b334a45a8ff | 28 | #endif |
bogdanm | 0:9b334a45a8ff | 29 | |
bogdanm | 0:9b334a45a8ff | 30 | #if defined ( __CC_ARM ) |
bogdanm | 0:9b334a45a8ff | 31 | /** |
bogdanm | 0:9b334a45a8ff | 32 | * @brief Return the Main Stack Pointer (return current ARM7 stack) |
bogdanm | 0:9b334a45a8ff | 33 | * |
bogdanm | 0:9b334a45a8ff | 34 | * @param none |
bogdanm | 0:9b334a45a8ff | 35 | * @return uint32_t Main Stack Pointer |
bogdanm | 0:9b334a45a8ff | 36 | * |
bogdanm | 0:9b334a45a8ff | 37 | * Return the current value of the MSP (main stack pointer) |
bogdanm | 0:9b334a45a8ff | 38 | * Cortex processor register |
bogdanm | 0:9b334a45a8ff | 39 | */ |
bogdanm | 0:9b334a45a8ff | 40 | uint32_t __get_MSP(void) |
bogdanm | 0:9b334a45a8ff | 41 | { |
bogdanm | 0:9b334a45a8ff | 42 | return __current_sp(); |
bogdanm | 0:9b334a45a8ff | 43 | } |
bogdanm | 0:9b334a45a8ff | 44 | #endif |