1 //<MStar Software> 2 //****************************************************************************** 3 // MStar Software 4 // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved. 5 // All software, firmware and related documentation herein ("MStar Software") are 6 // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by 7 // law, including, but not limited to, copyright law and international treaties. 8 // Any use, modification, reproduction, retransmission, or republication of all 9 // or part of MStar Software is expressly prohibited, unless prior written 10 // permission has been granted by MStar. 11 // 12 // By accessing, browsing and/or using MStar Software, you acknowledge that you 13 // have read, understood, and agree, to be bound by below terms ("Terms") and to 14 // comply with all applicable laws and regulations: 15 // 16 // 1. MStar shall retain any and all right, ownership and interest to MStar 17 // Software and any modification/derivatives thereof. 18 // No right, ownership, or interest to MStar Software and any 19 // modification/derivatives thereof is transferred to you under Terms. 20 // 21 // 2. You understand that MStar Software might include, incorporate or be 22 // supplied together with third party`s software and the use of MStar 23 // Software may require additional licenses from third parties. 24 // Therefore, you hereby agree it is your sole responsibility to separately 25 // obtain any and all third party right and license necessary for your use of 26 // such third party`s software. 27 // 28 // 3. MStar Software and any modification/derivatives thereof shall be deemed as 29 // MStar`s confidential information and you agree to keep MStar`s 30 // confidential information in strictest confidence and not disclose to any 31 // third party. 32 // 33 // 4. MStar Software is provided on an "AS IS" basis without warranties of any 34 // kind. Any warranties are hereby expressly disclaimed by MStar, including 35 // without limitation, any warranties of merchantability, non-infringement of 36 // intellectual property rights, fitness for a particular purpose, error free 37 // and in conformity with any international standard. You agree to waive any 38 // claim against MStar for any loss, damage, cost or expense that you may 39 // incur related to your use of MStar Software. 40 // In no event shall MStar be liable for any direct, indirect, incidental or 41 // consequential damages, including without limitation, lost of profit or 42 // revenues, lost or damage of data, and unauthorized system use. 43 // You agree that this Section 4 shall still apply without being affected 44 // even if MStar Software has been modified by MStar in accordance with your 45 // request or instruction for your use, except otherwise agreed by both 46 // parties in writing. 47 // 48 // 5. If requested, MStar may from time to time provide technical supports or 49 // services in relation with MStar Software to you for your use of 50 // MStar Software in conjunction with your or your customer`s product 51 // ("Services"). 52 // You understand and agree that, except otherwise agreed by both parties in 53 // writing, Services are provided on an "AS IS" basis and the warranty 54 // disclaimer set forth in Section 4 above shall apply. 55 // 56 // 6. Nothing contained herein shall be construed as by implication, estoppels 57 // or otherwise: 58 // (a) conferring any license or right to use MStar name, trademark, service 59 // mark, symbol or any other identification; 60 // (b) obligating MStar or any of its affiliates to furnish any person, 61 // including without limitation, you and your customers, any assistance 62 // of any kind whatsoever, or any information; or 63 // (c) conferring any license or right under any intellectual property right. 64 // 65 // 7. These terms shall be governed by and construed in accordance with the laws 66 // of Taiwan, R.O.C., excluding its conflict of law rules. 67 // Any and all dispute arising out hereof or related hereto shall be finally 68 // settled by arbitration referred to the Chinese Arbitration Association, 69 // Taipei in accordance with the ROC Arbitration Law and the Arbitration 70 // Rules of the Association by three (3) arbitrators appointed in accordance 71 // with the said Rules. 72 // The place of arbitration shall be in Taipei, Taiwan and the language shall 73 // be English. 74 // The arbitration award shall be final and binding to both parties. 75 // 76 //****************************************************************************** 77 //<MStar Software> 78 //////////////////////////////////////////////////////////////////////////////// 79 // 80 // Copyright (c) 2006-2007 MStar Semiconductor, Inc. 81 // All rights reserved. 82 // 83 // Unless otherwise stipulated in writing, any and all information contained 84 // herein regardless in any format shall remain the sole proprietary of 85 // MStar Semiconductor Inc. and be kept in strict confidence 86 // ("MStar Confidential Information") by the recipient. 87 // Any unauthorized act including without limitation unauthorized disclosure, 88 // copying, use, reproduction, sale, distribution, modification, disassembling, 89 // reverse engineering and compiling of the contents of MStar Confidential 90 // Information is unlawful and strictly prohibited. MStar hereby reserves the 91 // rights to any and all damages, losses, costs and expenses resulting therefrom. 92 // 93 //////////////////////////////////////////////////////////////////////////////// 94 95 //////////////////////////////////////////////////////////////////////////////////////////////////// 96 // 97 // File name: regURDMA.h 98 // Description: FAST UART DMA Register Definition 99 // 100 //////////////////////////////////////////////////////////////////////////////////////////////////// 101 102 #ifndef __FAST_UART_DMA_H__ 103 #define __FAST_UART_DMA_H__ 104 105 //#if FAST_UART_DMA_ENABLE 106 107 //#include "fast_uart_dma_param.h" //halURDMA.h 108 #include "halURDMA.h" 109 110 111 #define Struct_Register __attribute__((packed)) 112 113 114 /* Warning: Little Endian */ 115 typedef struct dma_interface 116 { 117 union 118 { 119 volatile MS_U16 reg00; /* 00h */ 120 struct 121 { 122 volatile MS_U16 sw_rst : 1; /* BIT0 */ 123 volatile MS_U16 urdma_mode : 1; /* BIT1 */ 124 volatile MS_U16 tx_urdma_en : 1; /* BIT2 */ 125 volatile MS_U16 rx_urdma_en : 1; /* BIT3 */ 126 volatile MS_U16 tx_endian : 1; /* BIT4 */ 127 volatile MS_U16 rx_endian : 1; /* BIT5 */ 128 volatile MS_U16 tx_sw_rst : 1; /* BIT6 */ 129 volatile MS_U16 rx_sw_rst : 1; /* BIT7 */ 130 volatile MS_U16 reserve00 : 3; /* BIT8 ~ BIT10 */ 131 volatile MS_U16 rx_op_mode : 1; /* BIT11 */ 132 volatile MS_U16 tx_busy : 1; /* BIT12 */ 133 volatile MS_U16 rx_busy : 1; /* BIT13 */ 134 volatile MS_U16 reserve01 : 2; /* BIT14 ~ BIT15 */ 135 } Struct_Register; 136 } Struct_Register; 137 #if TWO_BYTE_SPACE 138 MS_U16 space00; 139 #endif 140 union 141 { 142 volatile MS_U16 reg01; /* 02h */ 143 struct 144 { 145 volatile MS_U16 intr_threshold : 12; /* BIT0 ~ BIT11 */ 146 volatile MS_U16 reserve02 : 4; /* BIT12 ~ BIT15 */ 147 } Struct_Register; 148 } Struct_Register; 149 #if TWO_BYTE_SPACE 150 MS_U16 space01; 151 #endif 152 union 153 { 154 volatile MS_U16 reg02; /* 04h */ 155 struct 156 { 157 volatile MS_U16 tx_buf_base_h : 8; /* BIT0 ~ BIT7 */ 158 volatile MS_U16 reserve03 : 8; /* BIT8 ~ BIT15 */ 159 } Struct_Register; 160 } Struct_Register; 161 #if TWO_BYTE_SPACE 162 MS_U16 space02; 163 #endif 164 union 165 { 166 volatile MS_U16 reg03; /* 06h */ 167 struct 168 { 169 volatile MS_U16 tx_buf_base_l : 16; /* BIT0 ~ BIT15 */ 170 } Struct_Register; 171 } Struct_Register; 172 #if TWO_BYTE_SPACE 173 MS_U16 space03; 174 #endif 175 union 176 { 177 volatile MS_U16 reg04; /* 08h */ 178 struct 179 { 180 volatile MS_U16 tx_buf_size : 13; /* BIT0 ~ BIT12 */ 181 volatile MS_U16 reserve04 : 3; /* BIT13 ~ BIT15 */ 182 } Struct_Register; 183 } Struct_Register; 184 #if TWO_BYTE_SPACE 185 MS_U16 space04; 186 #endif 187 union 188 { 189 volatile MS_U16 reg05; /* 0Ah */ 190 struct 191 { 192 volatile MS_U16 tx_buf_rptr : 16; /* BIT0 ~ BIT15 */ 193 } Struct_Register; 194 } Struct_Register; 195 #if TWO_BYTE_SPACE 196 MS_U16 space05; 197 #endif 198 union 199 { 200 volatile MS_U16 reg06; /* 0Ch */ 201 struct 202 { 203 volatile MS_VIRT tx_buf_wptr : 16; /* BIT0 ~ BIT15 */ 204 } Struct_Register; 205 } Struct_Register; 206 #if TWO_BYTE_SPACE 207 MS_U16 space06; 208 #endif 209 union 210 { 211 volatile MS_U16 reg07; /* 0Eh */ 212 struct 213 { 214 volatile MS_U16 tx_timeout : 4; /* BIT0 ~ BIT3 */ 215 volatile MS_U16 reserve05 : 12; /* BIT4 ~ BIT15 */ 216 } Struct_Register; 217 } Struct_Register; 218 #if TWO_BYTE_SPACE 219 MS_U16 space07; 220 #endif 221 union 222 { 223 volatile MS_U16 reg08; /* 10h */ 224 struct 225 { 226 volatile MS_U16 rx_buf_base_h : 8; /* BIT0 ~ BIT7 */ 227 volatile MS_U16 reserve06 : 8; /* BIT8 ~ BIT15 */ 228 } Struct_Register; 229 } Struct_Register; 230 #if TWO_BYTE_SPACE 231 MS_U16 space08; 232 #endif 233 union 234 { 235 volatile MS_U16 reg09; /* 12h */ 236 struct 237 { 238 volatile MS_U16 rx_buf_base_l : 16; /* BIT0 ~ BIT15 */ 239 } Struct_Register; 240 } Struct_Register; 241 #if TWO_BYTE_SPACE 242 MS_U16 space09; 243 #endif 244 union 245 { 246 volatile MS_U16 reg0a; /* 14h */ 247 struct 248 { 249 volatile MS_U16 rx_buf_size : 13; /* BIT0 ~ BIT12 */ 250 volatile MS_U16 reserve07 : 3; /* BIT13 ~ BIT15 */ 251 } Struct_Register; 252 } Struct_Register; 253 #if TWO_BYTE_SPACE 254 MS_U16 space0a; 255 #endif 256 union 257 { 258 volatile MS_U16 reg0b; /* 16h */ 259 struct 260 { 261 volatile MS_U16 rx_buf_wptr : 16; /* BIT0 ~ BIT15 */ 262 } Struct_Register; 263 } Struct_Register; 264 #if TWO_BYTE_SPACE 265 MS_U16 space0b; 266 #endif 267 union 268 { 269 volatile MS_U16 reg0c; /* 18h */ 270 struct 271 { 272 volatile MS_U16 rx_timeout : 4; /* BIT0 ~ BIT3 */ 273 volatile MS_U16 reserve08 : 12; /* BIT4 ~ BIT15 */ 274 } Struct_Register; 275 } Struct_Register; 276 #if TWO_BYTE_SPACE 277 MS_U16 space0c; 278 #endif 279 union 280 { 281 volatile MS_U16 reg0d; /* 1Ah */ 282 struct 283 { 284 volatile MS_U16 rx_intr_clr : 1; /* BIT0 */ 285 volatile MS_U16 rx_intr1_en : 1; /* BIT1 */ 286 volatile MS_U16 rx_intr2_en : 1; /* BIT2 */ 287 volatile MS_U16 reserve09 : 1; /* BIT3 */ 288 volatile MS_U16 rx_intr1 : 1; /* BIT4 */ 289 volatile MS_U16 rx_intr2 : 1; /* BIT5 */ 290 volatile MS_U16 reserve0a : 1; /* BIT6 */ 291 volatile MS_U16 rx_mcu_intr : 1; /* BIT7 */ 292 volatile MS_U16 tx_intr_clr : 1; /* BIT8 */ 293 volatile MS_U16 tx_intr_en : 1; /* BIT9 */ 294 volatile MS_U16 reserve0b : 5; /* BIT10 ~ BIT14 */ 295 volatile MS_U16 tx_mcu_intr : 1; /* BIT15 */ 296 } Struct_Register; 297 } Struct_Register; 298 } Struct_Register dma_interface_t; 299 300 //#endif /* #if FAST_UART_DMA_ENABLE */ 301 302 #endif /* __FAST_UART_DMA_H__ */ 303