mbed(SerialHalfDuplex入り)

Fork of mbed by mbed official

Committer:
bogdanm
Date:
Mon Apr 07 18:28:36 2014 +0100
Revision:
82:6473597d706e
Release 82 of the mbed library

Main changes:

- support for K64F
- Revisited Nordic code structure
- Test infrastructure improvements
- various bug fixes

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 82:6473597d706e 1 /*
bogdanm 82:6473597d706e 2 * Copyright (c) 2014, Freescale Semiconductor, Inc.
bogdanm 82:6473597d706e 3 * All rights reserved.
bogdanm 82:6473597d706e 4 *
bogdanm 82:6473597d706e 5 * THIS SOFTWARE IS PROVIDED BY FREESCALE "AS IS" AND ANY EXPRESS OR IMPLIED
bogdanm 82:6473597d706e 6 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
bogdanm 82:6473597d706e 7 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
bogdanm 82:6473597d706e 8 * SHALL FREESCALE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
bogdanm 82:6473597d706e 9 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
bogdanm 82:6473597d706e 10 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
bogdanm 82:6473597d706e 11 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
bogdanm 82:6473597d706e 12 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
bogdanm 82:6473597d706e 13 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
bogdanm 82:6473597d706e 14 * OF SUCH DAMAGE.
bogdanm 82:6473597d706e 15 */
bogdanm 82:6473597d706e 16 /*
bogdanm 82:6473597d706e 17 * WARNING! DO NOT EDIT THIS FILE DIRECTLY!
bogdanm 82:6473597d706e 18 *
bogdanm 82:6473597d706e 19 * This file was generated automatically and any changes may be lost.
bogdanm 82:6473597d706e 20 */
bogdanm 82:6473597d706e 21 #ifndef __HW_RFSYS_REGISTERS_H__
bogdanm 82:6473597d706e 22 #define __HW_RFSYS_REGISTERS_H__
bogdanm 82:6473597d706e 23
bogdanm 82:6473597d706e 24 #include "regs.h"
bogdanm 82:6473597d706e 25
bogdanm 82:6473597d706e 26 /*
bogdanm 82:6473597d706e 27 * MK64F12 RFSYS
bogdanm 82:6473597d706e 28 *
bogdanm 82:6473597d706e 29 * System register file
bogdanm 82:6473597d706e 30 *
bogdanm 82:6473597d706e 31 * Registers defined in this header file:
bogdanm 82:6473597d706e 32 * - HW_RFSYS_REGn - Register file register
bogdanm 82:6473597d706e 33 *
bogdanm 82:6473597d706e 34 * - hw_rfsys_t - Struct containing all module registers.
bogdanm 82:6473597d706e 35 */
bogdanm 82:6473597d706e 36
bogdanm 82:6473597d706e 37 //! @name Module base addresses
bogdanm 82:6473597d706e 38 //@{
bogdanm 82:6473597d706e 39 #ifndef REGS_RFSYS_BASE
bogdanm 82:6473597d706e 40 #define HW_RFSYS_INSTANCE_COUNT (1U) //!< Number of instances of the RFSYS module.
bogdanm 82:6473597d706e 41 #define REGS_RFSYS_BASE (0x40041000U) //!< Base address for RFSYS.
bogdanm 82:6473597d706e 42 #endif
bogdanm 82:6473597d706e 43 //@}
bogdanm 82:6473597d706e 44
bogdanm 82:6473597d706e 45 //-------------------------------------------------------------------------------------------
bogdanm 82:6473597d706e 46 // HW_RFSYS_REGn - Register file register
bogdanm 82:6473597d706e 47 //-------------------------------------------------------------------------------------------
bogdanm 82:6473597d706e 48
bogdanm 82:6473597d706e 49 #ifndef __LANGUAGE_ASM__
bogdanm 82:6473597d706e 50 /*!
bogdanm 82:6473597d706e 51 * @brief HW_RFSYS_REGn - Register file register (RW)
bogdanm 82:6473597d706e 52 *
bogdanm 82:6473597d706e 53 * Reset value: 0x00000000U
bogdanm 82:6473597d706e 54 *
bogdanm 82:6473597d706e 55 * Each register can be accessed as 8-, 16-, or 32-bits.
bogdanm 82:6473597d706e 56 */
bogdanm 82:6473597d706e 57 typedef union _hw_rfsys_regn
bogdanm 82:6473597d706e 58 {
bogdanm 82:6473597d706e 59 uint32_t U;
bogdanm 82:6473597d706e 60 struct _hw_rfsys_regn_bitfields
bogdanm 82:6473597d706e 61 {
bogdanm 82:6473597d706e 62 uint32_t LL : 8; //!< [7:0]
bogdanm 82:6473597d706e 63 uint32_t LH : 8; //!< [15:8]
bogdanm 82:6473597d706e 64 uint32_t HL : 8; //!< [23:16]
bogdanm 82:6473597d706e 65 uint32_t HH : 8; //!< [31:24]
bogdanm 82:6473597d706e 66 } B;
bogdanm 82:6473597d706e 67 } hw_rfsys_regn_t;
bogdanm 82:6473597d706e 68 #endif
bogdanm 82:6473597d706e 69
bogdanm 82:6473597d706e 70 /*!
bogdanm 82:6473597d706e 71 * @name Constants and macros for entire RFSYS_REGn register
bogdanm 82:6473597d706e 72 */
bogdanm 82:6473597d706e 73 //@{
bogdanm 82:6473597d706e 74 #define HW_RFSYS_REGn_COUNT (8U)
bogdanm 82:6473597d706e 75
bogdanm 82:6473597d706e 76 #define HW_RFSYS_REGn_ADDR(n) (REGS_RFSYS_BASE + 0x0U + (0x4U * n))
bogdanm 82:6473597d706e 77
bogdanm 82:6473597d706e 78 #ifndef __LANGUAGE_ASM__
bogdanm 82:6473597d706e 79 #define HW_RFSYS_REGn(n) (*(__IO hw_rfsys_regn_t *) HW_RFSYS_REGn_ADDR(n))
bogdanm 82:6473597d706e 80 #define HW_RFSYS_REGn_RD(n) (HW_RFSYS_REGn(n).U)
bogdanm 82:6473597d706e 81 #define HW_RFSYS_REGn_WR(n, v) (HW_RFSYS_REGn(n).U = (v))
bogdanm 82:6473597d706e 82 #define HW_RFSYS_REGn_SET(n, v) (HW_RFSYS_REGn_WR(n, HW_RFSYS_REGn_RD(n) | (v)))
bogdanm 82:6473597d706e 83 #define HW_RFSYS_REGn_CLR(n, v) (HW_RFSYS_REGn_WR(n, HW_RFSYS_REGn_RD(n) & ~(v)))
bogdanm 82:6473597d706e 84 #define HW_RFSYS_REGn_TOG(n, v) (HW_RFSYS_REGn_WR(n, HW_RFSYS_REGn_RD(n) ^ (v)))
bogdanm 82:6473597d706e 85 #endif
bogdanm 82:6473597d706e 86 //@}
bogdanm 82:6473597d706e 87
bogdanm 82:6473597d706e 88 /*
bogdanm 82:6473597d706e 89 * Constants & macros for individual RFSYS_REGn bitfields
bogdanm 82:6473597d706e 90 */
bogdanm 82:6473597d706e 91
bogdanm 82:6473597d706e 92 /*!
bogdanm 82:6473597d706e 93 * @name Register RFSYS_REGn, field LL[7:0] (RW)
bogdanm 82:6473597d706e 94 *
bogdanm 82:6473597d706e 95 * Low lower byte
bogdanm 82:6473597d706e 96 */
bogdanm 82:6473597d706e 97 //@{
bogdanm 82:6473597d706e 98 #define BP_RFSYS_REGn_LL (0U) //!< Bit position for RFSYS_REGn_LL.
bogdanm 82:6473597d706e 99 #define BM_RFSYS_REGn_LL (0x000000FFU) //!< Bit mask for RFSYS_REGn_LL.
bogdanm 82:6473597d706e 100 #define BS_RFSYS_REGn_LL (8U) //!< Bit field size in bits for RFSYS_REGn_LL.
bogdanm 82:6473597d706e 101
bogdanm 82:6473597d706e 102 #ifndef __LANGUAGE_ASM__
bogdanm 82:6473597d706e 103 //! @brief Read current value of the RFSYS_REGn_LL field.
bogdanm 82:6473597d706e 104 #define BR_RFSYS_REGn_LL(n) (HW_RFSYS_REGn(n).B.LL)
bogdanm 82:6473597d706e 105 #endif
bogdanm 82:6473597d706e 106
bogdanm 82:6473597d706e 107 //! @brief Format value for bitfield RFSYS_REGn_LL.
bogdanm 82:6473597d706e 108 #define BF_RFSYS_REGn_LL(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_RFSYS_REGn_LL), uint32_t) & BM_RFSYS_REGn_LL)
bogdanm 82:6473597d706e 109
bogdanm 82:6473597d706e 110 #ifndef __LANGUAGE_ASM__
bogdanm 82:6473597d706e 111 //! @brief Set the LL field to a new value.
bogdanm 82:6473597d706e 112 #define BW_RFSYS_REGn_LL(n, v) (HW_RFSYS_REGn_WR(n, (HW_RFSYS_REGn_RD(n) & ~BM_RFSYS_REGn_LL) | BF_RFSYS_REGn_LL(v)))
bogdanm 82:6473597d706e 113 #endif
bogdanm 82:6473597d706e 114 //@}
bogdanm 82:6473597d706e 115
bogdanm 82:6473597d706e 116 /*!
bogdanm 82:6473597d706e 117 * @name Register RFSYS_REGn, field LH[15:8] (RW)
bogdanm 82:6473597d706e 118 *
bogdanm 82:6473597d706e 119 * Low higher byte
bogdanm 82:6473597d706e 120 */
bogdanm 82:6473597d706e 121 //@{
bogdanm 82:6473597d706e 122 #define BP_RFSYS_REGn_LH (8U) //!< Bit position for RFSYS_REGn_LH.
bogdanm 82:6473597d706e 123 #define BM_RFSYS_REGn_LH (0x0000FF00U) //!< Bit mask for RFSYS_REGn_LH.
bogdanm 82:6473597d706e 124 #define BS_RFSYS_REGn_LH (8U) //!< Bit field size in bits for RFSYS_REGn_LH.
bogdanm 82:6473597d706e 125
bogdanm 82:6473597d706e 126 #ifndef __LANGUAGE_ASM__
bogdanm 82:6473597d706e 127 //! @brief Read current value of the RFSYS_REGn_LH field.
bogdanm 82:6473597d706e 128 #define BR_RFSYS_REGn_LH(n) (HW_RFSYS_REGn(n).B.LH)
bogdanm 82:6473597d706e 129 #endif
bogdanm 82:6473597d706e 130
bogdanm 82:6473597d706e 131 //! @brief Format value for bitfield RFSYS_REGn_LH.
bogdanm 82:6473597d706e 132 #define BF_RFSYS_REGn_LH(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_RFSYS_REGn_LH), uint32_t) & BM_RFSYS_REGn_LH)
bogdanm 82:6473597d706e 133
bogdanm 82:6473597d706e 134 #ifndef __LANGUAGE_ASM__
bogdanm 82:6473597d706e 135 //! @brief Set the LH field to a new value.
bogdanm 82:6473597d706e 136 #define BW_RFSYS_REGn_LH(n, v) (HW_RFSYS_REGn_WR(n, (HW_RFSYS_REGn_RD(n) & ~BM_RFSYS_REGn_LH) | BF_RFSYS_REGn_LH(v)))
bogdanm 82:6473597d706e 137 #endif
bogdanm 82:6473597d706e 138 //@}
bogdanm 82:6473597d706e 139
bogdanm 82:6473597d706e 140 /*!
bogdanm 82:6473597d706e 141 * @name Register RFSYS_REGn, field HL[23:16] (RW)
bogdanm 82:6473597d706e 142 *
bogdanm 82:6473597d706e 143 * High lower byte
bogdanm 82:6473597d706e 144 */
bogdanm 82:6473597d706e 145 //@{
bogdanm 82:6473597d706e 146 #define BP_RFSYS_REGn_HL (16U) //!< Bit position for RFSYS_REGn_HL.
bogdanm 82:6473597d706e 147 #define BM_RFSYS_REGn_HL (0x00FF0000U) //!< Bit mask for RFSYS_REGn_HL.
bogdanm 82:6473597d706e 148 #define BS_RFSYS_REGn_HL (8U) //!< Bit field size in bits for RFSYS_REGn_HL.
bogdanm 82:6473597d706e 149
bogdanm 82:6473597d706e 150 #ifndef __LANGUAGE_ASM__
bogdanm 82:6473597d706e 151 //! @brief Read current value of the RFSYS_REGn_HL field.
bogdanm 82:6473597d706e 152 #define BR_RFSYS_REGn_HL(n) (HW_RFSYS_REGn(n).B.HL)
bogdanm 82:6473597d706e 153 #endif
bogdanm 82:6473597d706e 154
bogdanm 82:6473597d706e 155 //! @brief Format value for bitfield RFSYS_REGn_HL.
bogdanm 82:6473597d706e 156 #define BF_RFSYS_REGn_HL(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_RFSYS_REGn_HL), uint32_t) & BM_RFSYS_REGn_HL)
bogdanm 82:6473597d706e 157
bogdanm 82:6473597d706e 158 #ifndef __LANGUAGE_ASM__
bogdanm 82:6473597d706e 159 //! @brief Set the HL field to a new value.
bogdanm 82:6473597d706e 160 #define BW_RFSYS_REGn_HL(n, v) (HW_RFSYS_REGn_WR(n, (HW_RFSYS_REGn_RD(n) & ~BM_RFSYS_REGn_HL) | BF_RFSYS_REGn_HL(v)))
bogdanm 82:6473597d706e 161 #endif
bogdanm 82:6473597d706e 162 //@}
bogdanm 82:6473597d706e 163
bogdanm 82:6473597d706e 164 /*!
bogdanm 82:6473597d706e 165 * @name Register RFSYS_REGn, field HH[31:24] (RW)
bogdanm 82:6473597d706e 166 *
bogdanm 82:6473597d706e 167 * High higher byte
bogdanm 82:6473597d706e 168 */
bogdanm 82:6473597d706e 169 //@{
bogdanm 82:6473597d706e 170 #define BP_RFSYS_REGn_HH (24U) //!< Bit position for RFSYS_REGn_HH.
bogdanm 82:6473597d706e 171 #define BM_RFSYS_REGn_HH (0xFF000000U) //!< Bit mask for RFSYS_REGn_HH.
bogdanm 82:6473597d706e 172 #define BS_RFSYS_REGn_HH (8U) //!< Bit field size in bits for RFSYS_REGn_HH.
bogdanm 82:6473597d706e 173
bogdanm 82:6473597d706e 174 #ifndef __LANGUAGE_ASM__
bogdanm 82:6473597d706e 175 //! @brief Read current value of the RFSYS_REGn_HH field.
bogdanm 82:6473597d706e 176 #define BR_RFSYS_REGn_HH(n) (HW_RFSYS_REGn(n).B.HH)
bogdanm 82:6473597d706e 177 #endif
bogdanm 82:6473597d706e 178
bogdanm 82:6473597d706e 179 //! @brief Format value for bitfield RFSYS_REGn_HH.
bogdanm 82:6473597d706e 180 #define BF_RFSYS_REGn_HH(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_RFSYS_REGn_HH), uint32_t) & BM_RFSYS_REGn_HH)
bogdanm 82:6473597d706e 181
bogdanm 82:6473597d706e 182 #ifndef __LANGUAGE_ASM__
bogdanm 82:6473597d706e 183 //! @brief Set the HH field to a new value.
bogdanm 82:6473597d706e 184 #define BW_RFSYS_REGn_HH(n, v) (HW_RFSYS_REGn_WR(n, (HW_RFSYS_REGn_RD(n) & ~BM_RFSYS_REGn_HH) | BF_RFSYS_REGn_HH(v)))
bogdanm 82:6473597d706e 185 #endif
bogdanm 82:6473597d706e 186 //@}
bogdanm 82:6473597d706e 187
bogdanm 82:6473597d706e 188 //-------------------------------------------------------------------------------------------
bogdanm 82:6473597d706e 189 // hw_rfsys_t - module struct
bogdanm 82:6473597d706e 190 //-------------------------------------------------------------------------------------------
bogdanm 82:6473597d706e 191 /*!
bogdanm 82:6473597d706e 192 * @brief All RFSYS module registers.
bogdanm 82:6473597d706e 193 */
bogdanm 82:6473597d706e 194 #ifndef __LANGUAGE_ASM__
bogdanm 82:6473597d706e 195 #pragma pack(1)
bogdanm 82:6473597d706e 196 typedef struct _hw_rfsys
bogdanm 82:6473597d706e 197 {
bogdanm 82:6473597d706e 198 __IO hw_rfsys_regn_t REGn[8]; //!< [0x0] Register file register
bogdanm 82:6473597d706e 199 } hw_rfsys_t;
bogdanm 82:6473597d706e 200 #pragma pack()
bogdanm 82:6473597d706e 201
bogdanm 82:6473597d706e 202 //! @brief Macro to access all RFSYS registers.
bogdanm 82:6473597d706e 203 //! @return Reference (not a pointer) to the registers struct. To get a pointer to the struct,
bogdanm 82:6473597d706e 204 //! use the '&' operator, like <code>&HW_RFSYS</code>.
bogdanm 82:6473597d706e 205 #define HW_RFSYS (*(hw_rfsys_t *) REGS_RFSYS_BASE)
bogdanm 82:6473597d706e 206 #endif
bogdanm 82:6473597d706e 207
bogdanm 82:6473597d706e 208 #endif // __HW_RFSYS_REGISTERS_H__
bogdanm 82:6473597d706e 209 // v22/130726/0.9
bogdanm 82:6473597d706e 210 // EOF