mbed library sources

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Thu Apr 16 11:45:13 2015 +0100
Revision:
514:7668256dbe61
Synchronized with git revision 29ab478a78892415a3c721cdc20b1755b7b01ba1

Full URL: https://github.com/mbedmicro/mbed/commit/29ab478a78892415a3c721cdc20b1755b7b01ba1/

LPC824, SSCI824 - Add GCC_ARM exporter support

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 514:7668256dbe61 1 /*******************************************************************************
mbed_official 514:7668256dbe61 2 * Copyright (C) 2015 Maxim Integrated Products, Inc., All Rights Reserved.
mbed_official 514:7668256dbe61 3 *
mbed_official 514:7668256dbe61 4 * Permission is hereby granted, free of charge, to any person obtaining a
mbed_official 514:7668256dbe61 5 * copy of this software and associated documentation files (the "Software"),
mbed_official 514:7668256dbe61 6 * to deal in the Software without restriction, including without limitation
mbed_official 514:7668256dbe61 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
mbed_official 514:7668256dbe61 8 * and/or sell copies of the Software, and to permit persons to whom the
mbed_official 514:7668256dbe61 9 * Software is furnished to do so, subject to the following conditions:
mbed_official 514:7668256dbe61 10 *
mbed_official 514:7668256dbe61 11 * The above copyright notice and this permission notice shall be included
mbed_official 514:7668256dbe61 12 * in all copies or substantial portions of the Software.
mbed_official 514:7668256dbe61 13 *
mbed_official 514:7668256dbe61 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
mbed_official 514:7668256dbe61 15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
mbed_official 514:7668256dbe61 16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
mbed_official 514:7668256dbe61 17 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
mbed_official 514:7668256dbe61 18 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
mbed_official 514:7668256dbe61 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
mbed_official 514:7668256dbe61 20 * OTHER DEALINGS IN THE SOFTWARE.
mbed_official 514:7668256dbe61 21 *
mbed_official 514:7668256dbe61 22 * Except as contained in this notice, the name of Maxim Integrated
mbed_official 514:7668256dbe61 23 * Products, Inc. shall not be used except as stated in the Maxim Integrated
mbed_official 514:7668256dbe61 24 * Products, Inc. Branding Policy.
mbed_official 514:7668256dbe61 25 *
mbed_official 514:7668256dbe61 26 * The mere transfer of this software does not imply any licenses
mbed_official 514:7668256dbe61 27 * of trade secrets, proprietary technology, copyrights, patents,
mbed_official 514:7668256dbe61 28 * trademarks, maskwork rights, or any other form of intellectual
mbed_official 514:7668256dbe61 29 * property whatsoever. Maxim Integrated Products, Inc. retains all
mbed_official 514:7668256dbe61 30 * ownership rights.
mbed_official 514:7668256dbe61 31 *******************************************************************************
mbed_official 514:7668256dbe61 32 */
mbed_official 514:7668256dbe61 33
mbed_official 514:7668256dbe61 34 #ifndef _MXC_TMR_REGS_H
mbed_official 514:7668256dbe61 35 #define _MXC_TMR_REGS_H
mbed_official 514:7668256dbe61 36
mbed_official 514:7668256dbe61 37 #ifdef __cplusplus
mbed_official 514:7668256dbe61 38 extern "C" {
mbed_official 514:7668256dbe61 39 #endif
mbed_official 514:7668256dbe61 40
mbed_official 514:7668256dbe61 41 #include <stdint.h>
mbed_official 514:7668256dbe61 42
mbed_official 514:7668256dbe61 43 /**
mbed_official 514:7668256dbe61 44 * @file tmr_regs.h
mbed_official 514:7668256dbe61 45 * @addtogroup tmr TMR
mbed_official 514:7668256dbe61 46 * @{
mbed_official 514:7668256dbe61 47 */
mbed_official 514:7668256dbe61 48
mbed_official 514:7668256dbe61 49 /**
mbed_official 514:7668256dbe61 50 * @brief Defines timer modes for 16 and 32-bit timers
mbed_official 514:7668256dbe61 51 */
mbed_official 514:7668256dbe61 52 typedef enum {
mbed_official 514:7668256dbe61 53 /** 32-bit or 16-bit timer one-shot mode */
mbed_official 514:7668256dbe61 54 MXC_E_TMR_MODE_ONE_SHOT = 0,
mbed_official 514:7668256dbe61 55 /** 32-bit or 16-bit timer one-shot mode */
mbed_official 514:7668256dbe61 56 MXC_E_TMR_MODE_CONTINUOUS,
mbed_official 514:7668256dbe61 57 /** 32-bit timer counter mode */
mbed_official 514:7668256dbe61 58 MXC_E_TMR_MODE_COUNTER,
mbed_official 514:7668256dbe61 59 /** 32-bit timer pulse width modulation mode */
mbed_official 514:7668256dbe61 60 MXC_E_TMR_MODE_PWM,
mbed_official 514:7668256dbe61 61 /** 32-bit timer capture mode */
mbed_official 514:7668256dbe61 62 MXC_E_TMR_MODE_CAPTURE,
mbed_official 514:7668256dbe61 63 /** 32-bit timer compare mode */
mbed_official 514:7668256dbe61 64 MXC_E_TMR_MODE_COMPARE,
mbed_official 514:7668256dbe61 65 /** 32-bit timer gated mode */
mbed_official 514:7668256dbe61 66 MXC_E_TMR_MODE_GATED,
mbed_official 514:7668256dbe61 67 /** 32-bit timer measure mode */
mbed_official 514:7668256dbe61 68 MXC_E_TMR_MODE_MEASURE
mbed_official 514:7668256dbe61 69 } mxc_tmr_mode_t;
mbed_official 514:7668256dbe61 70
mbed_official 514:7668256dbe61 71 /* Offset Register Description
mbed_official 514:7668256dbe61 72 ====== ============================================== */
mbed_official 514:7668256dbe61 73 typedef struct {
mbed_official 514:7668256dbe61 74 __IO uint32_t ctrl; /* 0x0000 Timer Control Register */
mbed_official 514:7668256dbe61 75 __IO uint32_t count32; /* 0x0004 [32 bit] Current Count Value */
mbed_official 514:7668256dbe61 76 __IO uint32_t term_cnt32; /* 0x0008 [32 bit] Terminal Count Setting */
mbed_official 514:7668256dbe61 77 __IO uint32_t pwm_cap32; /* 0x000C [32 bit] PWM Compare Setting or Capture/Measure Value */
mbed_official 514:7668256dbe61 78 __IO uint32_t count16_0; /* 0x0010 [16 bit] Current Count Value, 16-bit Timer0 */
mbed_official 514:7668256dbe61 79 __IO uint32_t term_cnt16_0; /* 0x0014 [16 bit] Terminal Count Setting, 16-bit Timer0 */
mbed_official 514:7668256dbe61 80 __IO uint32_t count16_1; /* 0x0018 [16 bit] Current Count Value, 16-bit Timer1 */
mbed_official 514:7668256dbe61 81 __IO uint32_t term_cnt16_1; /* 0x001C [16 bit] Terminal Count Setting, 16-bit Timer1 */
mbed_official 514:7668256dbe61 82 __IO uint32_t intfl; /* 0x0020 Timer Module Interrupt Flags */
mbed_official 514:7668256dbe61 83 __IO uint32_t inten; /* 0x0024 Timer Module Interrupt Enable/Disable Settings */
mbed_official 514:7668256dbe61 84 } mxc_tmr_regs_t;
mbed_official 514:7668256dbe61 85
mbed_official 514:7668256dbe61 86 /*
mbed_official 514:7668256dbe61 87 Register offsets for module TMR.
mbed_official 514:7668256dbe61 88 */
mbed_official 514:7668256dbe61 89 #define MXC_R_TMR_OFFS_CTRL ((uint32_t)0x00000000UL)
mbed_official 514:7668256dbe61 90 #define MXC_R_TMR_OFFS_COUNT32 ((uint32_t)0x00000004UL)
mbed_official 514:7668256dbe61 91 #define MXC_R_TMR_OFFS_TERM_CNT32 ((uint32_t)0x00000008UL)
mbed_official 514:7668256dbe61 92 #define MXC_R_TMR_OFFS_PWM_CAP32 ((uint32_t)0x0000000CUL)
mbed_official 514:7668256dbe61 93 #define MXC_R_TMR_OFFS_COUNT16_0 ((uint32_t)0x00000010UL)
mbed_official 514:7668256dbe61 94 #define MXC_R_TMR_OFFS_TERM_CNT16_0 ((uint32_t)0x00000014UL)
mbed_official 514:7668256dbe61 95 #define MXC_R_TMR_OFFS_COUNT16_1 ((uint32_t)0x00000018UL)
mbed_official 514:7668256dbe61 96 #define MXC_R_TMR_OFFS_TERM_CNT16_1 ((uint32_t)0x0000001CUL)
mbed_official 514:7668256dbe61 97 #define MXC_R_TMR_OFFS_INTFL ((uint32_t)0x00000020UL)
mbed_official 514:7668256dbe61 98 #define MXC_R_TMR_OFFS_INTEN ((uint32_t)0x00000024UL)
mbed_official 514:7668256dbe61 99
mbed_official 514:7668256dbe61 100 /*
mbed_official 514:7668256dbe61 101 Field positions and masks for module TMR.
mbed_official 514:7668256dbe61 102 */
mbed_official 514:7668256dbe61 103 #define MXC_F_TMR_CTRL_MODE_POS 0
mbed_official 514:7668256dbe61 104 #define MXC_F_TMR_CTRL_MODE ((uint32_t)(0x00000007UL << MXC_F_TMR_CTRL_MODE_POS))
mbed_official 514:7668256dbe61 105 #define MXC_F_TMR_CTRL_TMR2X16_POS 3
mbed_official 514:7668256dbe61 106 #define MXC_F_TMR_CTRL_TMR2X16 ((uint32_t)(0x00000001UL << MXC_F_TMR_CTRL_TMR2X16_POS))
mbed_official 514:7668256dbe61 107 #define MXC_F_TMR_CTRL_PRESCALE_POS 4
mbed_official 514:7668256dbe61 108 #define MXC_F_TMR_CTRL_PRESCALE ((uint32_t)(0x0000000FUL << MXC_F_TMR_CTRL_PRESCALE_POS))
mbed_official 514:7668256dbe61 109 #define MXC_F_TMR_CTRL_POLARITY_POS 8
mbed_official 514:7668256dbe61 110 #define MXC_F_TMR_CTRL_POLARITY ((uint32_t)(0x00000001UL << MXC_F_TMR_CTRL_POLARITY_POS))
mbed_official 514:7668256dbe61 111 #define MXC_F_TMR_CTRL_ENABLE0_POS 12
mbed_official 514:7668256dbe61 112 #define MXC_F_TMR_CTRL_ENABLE0 ((uint32_t)(0x00000001UL << MXC_F_TMR_CTRL_ENABLE0_POS))
mbed_official 514:7668256dbe61 113 #define MXC_F_TMR_CTRL_ENABLE1_POS 13
mbed_official 514:7668256dbe61 114 #define MXC_F_TMR_CTRL_ENABLE1 ((uint32_t)(0x00000001UL << MXC_F_TMR_CTRL_ENABLE1_POS))
mbed_official 514:7668256dbe61 115
mbed_official 514:7668256dbe61 116 #define MXC_F_TMR_COUNT16_0_VALUE_POS 0
mbed_official 514:7668256dbe61 117 #define MXC_F_TMR_COUNT16_0_VALUE ((uint32_t)(0x0000FFFFUL << MXC_F_TMR_COUNT16_0_VALUE_POS))
mbed_official 514:7668256dbe61 118
mbed_official 514:7668256dbe61 119 #define MXC_F_TMR_TERM_CNT16_0_TERM_COUNT_POS 0
mbed_official 514:7668256dbe61 120 #define MXC_F_TMR_TERM_CNT16_0_TERM_COUNT ((uint32_t)(0x0000FFFFUL << MXC_F_TMR_TERM_CNT16_0_TERM_COUNT_POS))
mbed_official 514:7668256dbe61 121
mbed_official 514:7668256dbe61 122 #define MXC_F_TMR_COUNT16_1_VALUE_POS 0
mbed_official 514:7668256dbe61 123 #define MXC_F_TMR_COUNT16_1_VALUE ((uint32_t)(0x0000FFFFUL << MXC_F_TMR_COUNT16_1_VALUE_POS))
mbed_official 514:7668256dbe61 124
mbed_official 514:7668256dbe61 125 #define MXC_F_TMR_TERM_CNT16_1_TERM_COUNT_POS 0
mbed_official 514:7668256dbe61 126 #define MXC_F_TMR_TERM_CNT16_1_TERM_COUNT ((uint32_t)(0x0000FFFFUL << MXC_F_TMR_TERM_CNT16_1_TERM_COUNT_POS))
mbed_official 514:7668256dbe61 127
mbed_official 514:7668256dbe61 128 #define MXC_F_TMR_INTFL_TIMER0_POS 0
mbed_official 514:7668256dbe61 129 #define MXC_F_TMR_INTFL_TIMER0 ((uint32_t)(0x00000001UL << MXC_F_TMR_INTFL_TIMER0_POS))
mbed_official 514:7668256dbe61 130 #define MXC_F_TMR_INTFL_TIMER1_POS 1
mbed_official 514:7668256dbe61 131 #define MXC_F_TMR_INTFL_TIMER1 ((uint32_t)(0x00000001UL << MXC_F_TMR_INTFL_TIMER1_POS))
mbed_official 514:7668256dbe61 132
mbed_official 514:7668256dbe61 133 #define MXC_F_TMR_INTEN_TIMER0_POS 0
mbed_official 514:7668256dbe61 134 #define MXC_F_TMR_INTEN_TIMER0 ((uint32_t)(0x00000001UL << MXC_F_TMR_INTEN_TIMER0_POS))
mbed_official 514:7668256dbe61 135 #define MXC_F_TMR_INTEN_TIMER1_POS 1
mbed_official 514:7668256dbe61 136 #define MXC_F_TMR_INTEN_TIMER1 ((uint32_t)(0x00000001UL << MXC_F_TMR_INTEN_TIMER1_POS))
mbed_official 514:7668256dbe61 137
mbed_official 514:7668256dbe61 138 #ifdef __cplusplus
mbed_official 514:7668256dbe61 139 }
mbed_official 514:7668256dbe61 140 #endif
mbed_official 514:7668256dbe61 141
mbed_official 514:7668256dbe61 142 /**
mbed_official 514:7668256dbe61 143 * @}
mbed_official 514:7668256dbe61 144 */
mbed_official 514:7668256dbe61 145
mbed_official 514:7668256dbe61 146 #endif /* _MXC_TMR_REGS_H */