lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | /*******************************************************************************
|
| 2 | * Copyright (C) 2009, ZTE Corporation.
|
| 3 | *
|
| 4 | * File Name: drvs_ramlog.h
|
| 5 | * File Mark:
|
| 6 | * Description:
|
| 7 | * Others:
|
| 8 | * Version: V1.0
|
| 9 | * Author: yuxiang
|
| 10 | * Date: 2009-11-06
|
| 11 | * History 1:
|
| 12 | * Date:
|
| 13 | * Version:
|
| 14 | * Author:
|
| 15 | * Modification:
|
| 16 | ********************************************************************************/
|
| 17 | #ifndef DRVS_RAMLOG_H
|
| 18 | #define DRVS_RAMLOG_H
|
| 19 |
|
| 20 | #ifdef __cplusplus
|
| 21 | extern "C"
|
| 22 | {
|
| 23 | #endif
|
| 24 |
|
| 25 | /****************************************************************************
|
| 26 | * Include files
|
| 27 | ****************************************************************************/
|
| 28 |
|
| 29 | /****************************************************************************
|
| 30 | * Macros
|
| 31 | ****************************************************************************/
|
| 32 | /*LOG»º³åÇø´óС¶¨Òå,ÒÔ×Ö½ÚΪµ¥Î»,Çë¸ù¾ÝÄ£¿éÒª´òÓ¡µÄLOGÊýÉèÖÃ*/
|
| 33 | #define RAMLOG_BUF_SIZE_8K (8*1024)
|
| 34 | #define RAMLOG_BUF_SIZE_16K (16*1024)
|
| 35 | #define RAMLOG_BUF_SIZE_32K (32*1024)
|
| 36 | #define RAMLOG_BUF_SIZE_64K (64*1024)
|
| 37 | #define RAMLOG_BUF_SIZE_128K (128*1024)
|
| 38 | #define RAMLOG_BUF_SIZE_256K (256*1024)
|
| 39 |
|
| 40 |
|
| 41 | /*´òÓ¡Ä£¿éºÅ*/
|
| 42 | #define RAMLOG_MOD_CHIP_BASE 1
|
| 43 |
|
| 44 | #define RAMLOG_MOD_AUDIO (RAMLOG_MOD_CHIP_BASE + 0)
|
| 45 | #define RAMLOG_MOD_BACKLIGHT (RAMLOG_MOD_CHIP_BASE + 1)
|
| 46 | #define RAMLOG_MOD_BSP (RAMLOG_MOD_CHIP_BASE + 2)
|
| 47 | #define RAMLOG_MOD_CAM (RAMLOG_MOD_CHIP_BASE + 3)
|
| 48 | #define RAMLOG_MOD_CIPHER (RAMLOG_MOD_CHIP_BASE + 4)
|
| 49 | #define RAMLOG_MOD_DMA (RAMLOG_MOD_CHIP_BASE + 5)
|
| 50 | #define RAMLOG_MOD_DPRAM (RAMLOG_MOD_CHIP_BASE + 6)
|
| 51 | #define RAMLOG_MOD_DSP (RAMLOG_MOD_CHIP_BASE + 7)
|
| 52 | #define RAMLOG_MOD_EARPIECE (RAMLOG_MOD_CHIP_BASE + 8)
|
| 53 | #define RAMLOG_MOD_GPIO (RAMLOG_MOD_CHIP_BASE + 9)
|
| 54 | #define RAMLOG_MOD_I2C (RAMLOG_MOD_CHIP_BASE + 10)
|
| 55 | #define RAMLOG_MOD_I2S (RAMLOG_MOD_CHIP_BASE + 11)
|
| 56 | #define RAMLOG_MOD_INT (RAMLOG_MOD_CHIP_BASE + 12)
|
| 57 | #define RAMLOG_MOD_ICP (RAMLOG_MOD_CHIP_BASE + 13)
|
| 58 | #define RAMLOG_MOD_KPDBL (RAMLOG_MOD_CHIP_BASE + 14)
|
| 59 | #define RAMLOG_MOD_MIDI (RAMLOG_MOD_CHIP_BASE + 15)
|
| 60 | #define RAMLOG_MOD_POW (RAMLOG_MOD_CHIP_BASE + 16)
|
| 61 | #define RAMLOG_MOD_RF (RAMLOG_MOD_CHIP_BASE + 17)
|
| 62 | #define RAMLOG_MOD_RTC (RAMLOG_MOD_CHIP_BASE + 18)
|
| 63 | #define RAMLOG_MOD_RTT (RAMLOG_MOD_CHIP_BASE + 19)
|
| 64 | #define RAMLOG_MOD_SD (RAMLOG_MOD_CHIP_BASE + 20)
|
| 65 | #define RAMLOG_MOD_SPI (RAMLOG_MOD_CHIP_BASE + 21)
|
| 66 | #define RAMLOG_MOD_TIMER (RAMLOG_MOD_CHIP_BASE + 22)
|
| 67 | #define RAMLOG_MOD_TONE (RAMLOG_MOD_CHIP_BASE + 23)
|
| 68 | #define RAMLOG_MOD_UART (RAMLOG_MOD_CHIP_BASE + 24)
|
| 69 | #define RAMLOG_MOD_UICC (RAMLOG_MOD_CHIP_BASE + 25)
|
| 70 | #define RAMLOG_MOD_USB (RAMLOG_MOD_CHIP_BASE + 26)
|
| 71 | #define RAMLOG_MOD_VIDEO (RAMLOG_MOD_CHIP_BASE + 27)
|
| 72 | #define RAMLOG_MOD_VOICE (RAMLOG_MOD_CHIP_BASE + 28)
|
| 73 | #define RAMLOG_MOD_VOU (RAMLOG_MOD_CHIP_BASE + 29)
|
| 74 | #define RAMLOG_MOD_SPIFC (RAMLOG_MOD_CHIP_BASE + 30)
|
| 75 |
|
| 76 | #define RAMLOG_MOD_ASSERT (RAMLOG_MOD_CHIP_BASE + 126)
|
| 77 |
|
| 78 | #define RAMLOG_MOD_PERI_BASE 128
|
| 79 |
|
| 80 | #define RAMLOG_MOD_BATTERY (RAMLOG_MOD_PERI_BASE + 0)
|
| 81 | #define RAMLOG_MOD_CHARGER (RAMLOG_MOD_PERI_BASE + 1)
|
| 82 | #define RAMLOG_MOD_FLASH (RAMLOG_MOD_PERI_BASE + 2)
|
| 83 | #define RAMLOG_MOD_FM (RAMLOG_MOD_PERI_BASE + 3)
|
| 84 | #define RAMLOG_MOD_LCD (RAMLOG_MOD_PERI_BASE + 4)
|
| 85 | #define RAMLOG_MOD_NAND (RAMLOG_MOD_PERI_BASE + 5)
|
| 86 | #define RAMLOG_MOD_PMIC (RAMLOG_MOD_PERI_BASE + 6)
|
| 87 | #define RAMLOG_MOD_PMMANAGER (RAMLOG_MOD_PERI_BASE + 7)
|
| 88 | #define RAMLOG_MOD_RTCPERI (RAMLOG_MOD_PERI_BASE + 8)
|
| 89 | #define RAMLOG_MOD_SENSOR (RAMLOG_MOD_PERI_BASE + 9)
|
| 90 | #define RAMLOG_MOD_TOUCH (RAMLOG_MOD_PERI_BASE + 10)
|
| 91 | #define RAMLOG_MOD_VIBRATOR (RAMLOG_MOD_PERI_BASE + 11)
|
| 92 | #define RAMLOG_MOD_LED (RAMLOG_MOD_PERI_BASE + 12)
|
| 93 |
|
| 94 | #define RAMLOG_MOD_MAX 255
|
| 95 |
|
| 96 |
|
| 97 | #define RAMLOG_MOD_NO1 RAMLOG_MOD_AUDIO /*Ä£¿éºÅ*/
|
| 98 | #define RAMLOG_MOD_NO1_SHELL "audio" /*shellÃüÁî²ÎÊý,ÎÞ¿Õ¸ñ,×32Byte*/
|
| 99 | #define RAMLOG_MOD_NO1_BUF_SIZE RAMLOG_BUF_SIZE_32K /*LOG»º³åÇø´óС*/
|
| 100 | #define RAMLOG_MOD_NO1_LOOP_ON TRUE /*ÊÇ·ñÑ»·´òÓ¡*/
|
| 101 | #define RAMLOG_MOD_NO1_REG TRUE /*ÊÇ·ñ×¢²á,FALSEʱ´ËÄ£¿é²»»á±»×¢²á*/
|
| 102 |
|
| 103 | #define RAMLOG_MOD_NO2 RAMLOG_MOD_KPDBL
|
| 104 | #define RAMLOG_MOD_NO2_SHELL "kpd"
|
| 105 | #define RAMLOG_MOD_NO2_BUF_SIZE RAMLOG_BUF_SIZE_32K
|
| 106 | #define RAMLOG_MOD_NO2_LOOP_ON TRUE
|
| 107 | #define RAMLOG_MOD_NO2_REG FALSE
|
| 108 |
|
| 109 | #define RAMLOG_MOD_NO3 RAMLOG_MOD_LCD /* YinWenguan 2015-2-4 */
|
| 110 | #define RAMLOG_MOD_NO3_SHELL "lcd"
|
| 111 | #define RAMLOG_MOD_NO3_BUF_SIZE RAMLOG_BUF_SIZE_32K
|
| 112 | #define RAMLOG_MOD_NO3_LOOP_ON TRUE
|
| 113 | #define RAMLOG_MOD_NO3_REG FALSE
|
| 114 |
|
| 115 | #define RAMLOG_MOD_NO4 RAMLOG_MOD_POW//RAMLOG_MOD_TOUCH
|
| 116 | #define RAMLOG_MOD_NO4_SHELL "pow"//"touch"
|
| 117 | #define RAMLOG_MOD_NO4_BUF_SIZE RAMLOG_BUF_SIZE_32K
|
| 118 | #define RAMLOG_MOD_NO4_LOOP_ON TRUE
|
| 119 | #define RAMLOG_MOD_NO4_REG FALSE
|
| 120 |
|
| 121 | #define RAMLOG_MOD_NO5 RAMLOG_MOD_CHARGER
|
| 122 | #define RAMLOG_MOD_NO5_SHELL "charger"
|
| 123 | #define RAMLOG_MOD_NO5_BUF_SIZE RAMLOG_BUF_SIZE_32K
|
| 124 | #define RAMLOG_MOD_NO5_LOOP_ON TRUE
|
| 125 | #define RAMLOG_MOD_NO5_REG FALSE
|
| 126 |
|
| 127 | #define RAMLOG_MOD_NO6 RAMLOG_MOD_DMA
|
| 128 | #define RAMLOG_MOD_NO6_SHELL "dma"
|
| 129 | #define RAMLOG_MOD_NO6_BUF_SIZE RAMLOG_BUF_SIZE_32K
|
| 130 | #define RAMLOG_MOD_NO6_LOOP_ON TRUE
|
| 131 | #define RAMLOG_MOD_NO6_REG FALSE
|
| 132 |
|
| 133 | #define RAMLOG_MOD_NO7 RAMLOG_MOD_ICP
|
| 134 | #define RAMLOG_MOD_NO7_SHELL "icp"
|
| 135 | #define RAMLOG_MOD_NO7_BUF_SIZE RAMLOG_BUF_SIZE_8K
|
| 136 | #define RAMLOG_MOD_NO7_LOOP_ON TRUE
|
| 137 | #define RAMLOG_MOD_NO7_REG TRUE
|
| 138 |
|
| 139 | #define RAMLOG_MOD_NO8 RAMLOG_MOD_UICC
|
| 140 | #define RAMLOG_MOD_NO8_SHELL "UICC"
|
| 141 | #define RAMLOG_MOD_NO8_BUF_SIZE RAMLOG_BUF_SIZE_8K
|
| 142 | #define RAMLOG_MOD_NO8_LOOP_ON TRUE
|
| 143 | #define RAMLOG_MOD_NO8_REG TRUE
|
| 144 |
|
| 145 | #define RAMLOG_MOD_NO9 RAMLOG_MOD_LED
|
| 146 | #define RAMLOG_MOD_NO9_SHELL "led"
|
| 147 | #define RAMLOG_MOD_NO9_BUF_SIZE RAMLOG_BUF_SIZE_32K
|
| 148 | #define RAMLOG_MOD_NO9_LOOP_ON TRUE
|
| 149 | #define RAMLOG_MOD_NO9_REG FALSE
|
| 150 |
|
| 151 | #define RAMLOG_MOD_NO10 RAMLOG_MOD_ASSERT
|
| 152 | #define RAMLOG_MOD_NO10_SHELL "assert"
|
| 153 | #define RAMLOG_MOD_NO10_BUF_SIZE RAMLOG_BUF_SIZE_32K
|
| 154 | #define RAMLOG_MOD_NO10_LOOP_ON TRUE
|
| 155 | #define RAMLOG_MOD_NO10_REG FALSE
|
| 156 |
|
| 157 | #define RAMLOG_MOD_NO11 RAMLOG_MOD_SD
|
| 158 | #define RAMLOG_MOD_NO11_SHELL "sd"
|
| 159 | #define RAMLOG_MOD_NO11_BUF_SIZE RAMLOG_BUF_SIZE_256K
|
| 160 | #define RAMLOG_MOD_NO11_LOOP_ON TRUE
|
| 161 | #define RAMLOG_MOD_NO11_REG FALSE
|
| 162 |
|
| 163 | #define RAMLOG_MOD_NO12 RAMLOG_MOD_CAM
|
| 164 | #define RAMLOG_MOD_NO12_SHELL "camera"
|
| 165 | #define RAMLOG_MOD_NO12_BUF_SIZE RAMLOG_BUF_SIZE_32K
|
| 166 | #define RAMLOG_MOD_NO12_LOOP_ON TRUE
|
| 167 | #define RAMLOG_MOD_NO12_REG FALSE
|
| 168 |
|
| 169 | #define RAMLOG_MOD_NO13 RAMLOG_MOD_VOU
|
| 170 | #define RAMLOG_MOD_NO13_SHELL "vou"
|
| 171 | #define RAMLOG_MOD_NO13_BUF_SIZE RAMLOG_BUF_SIZE_32K
|
| 172 | #define RAMLOG_MOD_NO13_LOOP_ON TRUE
|
| 173 | #define RAMLOG_MOD_NO13_REG FALSE
|
| 174 |
|
| 175 | #define RAMLOG_MOD_NO14 RAMLOG_MOD_PMIC
|
| 176 | #define RAMLOG_MOD_NO14_SHELL "pmic"
|
| 177 | #define RAMLOG_MOD_NO14_BUF_SIZE RAMLOG_BUF_SIZE_32K
|
| 178 | #define RAMLOG_MOD_NO14_LOOP_ON TRUE
|
| 179 | #define RAMLOG_MOD_NO14_REG FALSE
|
| 180 |
|
| 181 |
|
| 182 | #define RAMLOG_MOD_NO15 RAMLOG_MOD_I2C
|
| 183 | #define RAMLOG_MOD_NO15_SHELL "i2c"
|
| 184 | #define RAMLOG_MOD_NO15_BUF_SIZE RAMLOG_BUF_SIZE_32K
|
| 185 | #define RAMLOG_MOD_NO15_LOOP_ON TRUE
|
| 186 | #define RAMLOG_MOD_NO15_REG FALSE
|
| 187 |
|
| 188 | #define RAMLOG_MOD_NO16 RAMLOG_MOD_SPI
|
| 189 | #define RAMLOG_MOD_NO16_SHELL "spi"
|
| 190 | #define RAMLOG_MOD_NO16_BUF_SIZE RAMLOG_BUF_SIZE_32K
|
| 191 | #define RAMLOG_MOD_NO16_LOOP_ON TRUE
|
| 192 | #define RAMLOG_MOD_NO16_REG FALSE
|
| 193 |
|
| 194 | #define RAMLOG_MOD_NO17 RAMLOG_MOD_SPIFC
|
| 195 | #define RAMLOG_MOD_NO17_SHELL "spifc"
|
| 196 | #define RAMLOG_MOD_NO17_BUF_SIZE RAMLOG_BUF_SIZE_32K
|
| 197 | #define RAMLOG_MOD_NO17_LOOP_ON TRUE
|
| 198 | #define RAMLOG_MOD_NO17_REG FALSE
|
| 199 | /****************************************************************************
|
| 200 | * Types
|
| 201 | ****************************************************************************/
|
| 202 |
|
| 203 |
|
| 204 | /****************************************************************************
|
| 205 | * Constants
|
| 206 | ****************************************************************************/
|
| 207 |
|
| 208 | /****************************************************************************
|
| 209 | * Global Variables
|
| 210 | ****************************************************************************/
|
| 211 |
|
| 212 | /****************************************************************************
|
| 213 | * Function Prototypes
|
| 214 | ****************************************************************************/
|
| 215 |
|
| 216 | SINT32 zDrvRamLog_Initiate(VOID);
|
| 217 | SINT32 ramlog_Printf(UINT16 nModNo, const VOID *pFormat, ...);
|
| 218 |
|
| 219 | #ifdef _OS_WIN
|
| 220 | #define zDrvRamlog_PRINTF(nModNo, s)
|
| 221 | #else
|
| 222 |
|
| 223 | #ifdef _USE_RAMLOG
|
| 224 | #define zDrvRamlog_PRINTF(nModNo, s...) ramlog_Printf(nModNo, s)
|
| 225 | #else
|
| 226 | #define zDrvRamlog_PRINTF(nModNo, s...)
|
| 227 | #endif
|
| 228 |
|
| 229 | #endif
|
| 230 |
|
| 231 | #ifdef __cplusplus
|
| 232 | }
|
| 233 | #endif
|
| 234 |
|
| 235 | #endif
|
| 236 |
|