# Macros

Source: [https://docs.qualcomm.com/doc/80-58740-4/topic/macros.html](https://docs.qualcomm.com/doc/80-58740-4/topic/macros.html)

## QCC74xLOG\_CSI

- Control sequence introducer
- For control terminal

     #define QCC74xLOG_CSI_START "\033["
     #define QCC74xLOG_CSI_CUU   "A"
     #define QCC74xLOG_CSI_CUD   "B"
     #define QCC74xLOG_CSI_CUF   "C"
     #define QCC74xLOG_CSI_CUB   "D"
     #define QCC74xLOG_CSI_CNL   "E"
     #define QCC74xLOG_CSI_CPL   "F"
     #define QCC74xLOG_CSI_CHA   "G"
     #define QCC74xLOG_CSI_CUP   "H"
     #define QCC74xLOG_CSI_ED    "J"
     #define QCC74xLOG_CSI_EL    "K"
     #define QCC74xLOG_CSI_SU    "S"
     #define QCC74xLOG_CSI_SD    "T"
     #define QCC74xLOG_CSI_SGR   "m"Copy to clipboard

## QCC74xLOG\_SGR

- Select graphic rendition
- For text graphics

    #define QCC74xLOG_SGR_RESET      "0"
     #define QCC74xLOG_SGR_BOLD       "1"
     #define QCC74xLOG_SGR_FAINT      "2"
     #define QCC74xLOG_SGR_ITALICS    "3"
     #define QCC74xLOG_SGR_UNDERLINE  "4"
     #define QCC74xLOG_SGR_BLINKS     "5"
     #define QCC74xLOG_SGR_BLINKR     "6"
     #define QCC74xLOG_SGR_REVERSE    "7"
     #define QCC74xLOG_SGR_HIDE       "8"
     #define QCC74xLOG_SGR_STRIKE     "9"
     #define QCC74xLOG_SGR_NORMAL     "22"
     #define QCC74xLOG_SGR_FG_BLACK   "30"
     #define QCC74xLOG_SGR_FG_RED     "31"
     #define QCC74xLOG_SGR_FG_GREEN   "32"
     #define QCC74xLOG_SGR_FG_YELLOW  "33"
     #define QCC74xLOG_SGR_FG_BLUE    "34"
     #define QCC74xLOG_SGR_FG_MAGENTA "35"
     #define QCC74xLOG_SGR_FG_CYAN    "36"
     #define QCC74xLOG_SGR_FG_WHITE   "37"
     #define QCC74xLOG_SGR_BG_BLACK   "40"
     #define QCC74xLOG_SGR_BG_RED     "41"
     #define QCC74xLOG_SGR_BG_GREEN   "42"
     #define QCC74xLOG_SGR_BG_YELLOW  "43"
     #define QCC74xLOG_SGR_BG_BLUE    "44"
     #define QCC74xLOG_SGR_BG_MAGENTA "45"
     #define QCC74xLOG_SGR_BG_CYAN    "46"
     #define QCC74xLOG_SGR_BG_WHITE   "47"Copy to clipboard

## QCC74xLOG\_COLOR

- A range of colors for configuration use

     #define QCC74xLOG_COLOR_START QCC74xLOG_CSI_START
     #define QCC74xLOG_COLOR_END   QCC74xLOG_CSI_SGR
     #define QCC74xLOG_CLOLR_SEP   ";"
     #define QCC74xLOG_COLOR_DEFAULT
     #define QCC74xLOG_COLOR_RESET QCC74xLOG_SGR_RESET QCC74xLOG_CLOLR_SEP
     #define QCC74xLOG_COLOR_FG_NONE
     #define QCC74xLOG_COLOR_FG_BLACK   QCC74xLOG_SGR_FG_BLACK QCC74xLOG_CLOLR_SEP
     #define QCC74xLOG_COLOR_FG_RED     QCC74xLOG_SGR_FG_RED QCC74xLOG_CLOLR_SEP
     #define QCC74xLOG_COLOR_FG_GREEN   QCC74xLOG_SGR_FG_GREEN QCC74xLOG_CLOLR_SEP
     #define QCC74xLOG_COLOR_FG_YELLOW  QCC74xLOG_SGR_FG_YELLOW QCC74xLOG_CLOLR_SEP
     #define QCC74xLOG_COLOR_FG_BLUE    QCC74xLOG_SGR_FG_BLUE QCC74xLOG_CLOLR_SEP
     #define QCC74xLOG_COLOR_FG_MAGENTA QCC74xLOG_SGR_FG_MAGENTA QCC74xLOG_CLOLR_SEP
     #define QCC74xLOG_COLOR_FG_CYAN    QCC74xLOG_SGR_FG_CYAN QCC74xLOG_CLOLR_SEP
     #define QCC74xLOG_COLOR_FG_WHITE   QCC74xLOG_SGR_FG_WHITE QCC74xLOG_CLOLR_SEP
     #define QCC74xLOG_COLOR_BG_NONE
     #define QCC74xLOG_COLOR_BG_BLACK   QCC74xLOG_SGR_BG_BLACK QCC74xLOG_CLOLR_SEP
     #define QCC74xLOG_COLOR_BG_RED     QCC74xLOG_SGR_BG_RED QCC74xLOG_CLOLR_SEP
     #define QCC74xLOG_COLOR_BG_GREEN   QCC74xLOG_SGR_BG_GREEN QCC74xLOG_CLOLR_SEP
     #define QCC74xLOG_COLOR_BG_YELLOW  QCC74xLOG_SGR_BG_YELLOW QCC74xLOG_CLOLR_SEP
     #define QCC74xLOG_COLOR_BG_BLUE    QCC74xLOG_SGR_BG_BLUE QCC74xLOG_CLOLR_SEP
     #define QCC74xLOG_COLOR_BG_MAGENTA QCC74xLOG_SGR_BG_MAGENTA QCC74xLOG_CLOLR_SEP
     #define QCC74xLOG_COLOR_BG_CYAN    QCC74xLOG_SGR_BG_CYAN QCC74xLOG_CLOLR_SEP
     #define QCC74xLOG_COLOR_BG_WHITE   QCC74xLOG_SGR_BG_WHITE QCC74xLOG_CLOLR_SEPCopy to clipboard

## QCC74xLOG\_COLOR\_CONTROL

- Default configured LOG colors for each level

     #ifndef QCC74xLOG_COLOR_FATAL
     #define QCC74xLOG_COLOR_FATAL QCC74xLOG_COLOR_FG_MAGENTA QCC74xLOG_COLOR_BG_NONE QCC74xLOG_SGR_BLINKS
     #endif
    
     #ifndef QCC74xLOG_COLOR_ERROR
     #define QCC74xLOG_COLOR_ERROR QCC74xLOG_COLOR_FG_RED QCC74xLOG_COLOR_BG_NONE QCC74xLOG_SGR_NORMAL
     #endif
    
     #ifndef QCC74xLOG_COLOR_WARN
     #define QCC74xLOG_COLOR_WARN QCC74xLOG_COLOR_FG_YELLOW QCC74xLOG_COLOR_BG_NONE QCC74xLOG_SGR_NORMAL
     #endif
    
     #ifndef QCC74xLOG_COLOR_INFO
     #define QCC74xLOG_COLOR_INFO QCC74xLOG_COLOR_FG_NONE QCC74xLOG_COLOR_BG_NONE QCC74xLOG_SGR_RESET
     #endif
    
     #ifndef QCC74xLOG_COLOR_DEBUG
     #define QCC74xLOG_COLOR_DEBUG QCC74xLOG_COLOR_FG_WHITE QCC74xLOG_COLOR_BG_NONE QCC74xLOG_SGR_NORMAL
     #endif
    
     #ifndef QCC74xLOG_COLOR_TRACE
     #define QCC74xLOG_COLOR_TRACE QCC74xLOG_COLOR_FG_WHITE QCC74xLOG_COLOR_BG_NONE QCC74xLOG_SGR_FAINT
     #endifCopy to clipboard

## QCC74xLOG\_LEVEL\_STRING

- Default configuration prompt information for each level

     #ifndef QCC74xLOG_LEVEL_FATAL_STRING
     #define QCC74xLOG_LEVEL_FATAL_STRING "FATL"
     #endif
    
     #ifndef QCC74xLOG_LEVEL_ERROR_STRING
     #define QCC74xLOG_LEVEL_ERROR_STRING "ERRO"
     #endif
    
     #ifndef QCC74xLOG_LEVEL_WARN_STRING
     #define QCC74xLOG_LEVEL_WARN_STRING "WARN"
     #endif
    
     #ifndef QCC74xLOG_LEVEL_INFO_STRING
     #define QCC74xLOG_LEVEL_INFO_STRING "INFO"
     #endif
    
     #ifndef QCC74xLOG_LEVEL_DEBUG_STRING
     #define QCC74xLOG_LEVEL_DEBUG_STRING "DBUG"
     #endif
    
     #ifndef QCC74xLOG_LEVEL_TRACE_STRING
     #define QCC74xLOG_LEVEL_TRACE_STRING "TRAC"
     #endifCopy to clipboard

## QCC74xLOG\_LEVEL

- LOG level for configuring recorder and direct

     #define QCC74xLOG_LEVEL_FATAL 0x00 /*!< level fatal, create a panic */
     #define QCC74xLOG_LEVEL_ERROR 0x01 /*!< level error                 */
     #define QCC74xLOG_LEVEL_WARN  0x02 /*!< level warning               */
     #define QCC74xLOG_LEVEL_INFO  0x03 /*!< level information           */
     #define QCC74xLOG_LEVEL_DEBUG 0x04 /*!< level debug                 */
     #define QCC74xLOG_LEVEL_TRACE 0x05 /*!< level trace information     */Copy to clipboard

## QCC74xLOG\_FLAG

- Functions for configuring recorder and direct

     #define QCC74xLOG_FLAG_LEVEL  ((uint8_t)0x01) /*!< supported print level     */
     #define QCC74xLOG_FLAG_TAG    ((uint8_t)0x02) /*!< supported record tag      */
     #define QCC74xLOG_FLAG_FUNC   ((uint8_t)0x04) /*!< supported record function */
     #define QCC74xLOG_FLAG_LINE   ((uint8_t)0x08) /*!< supported record line     */
     #define QCC74xLOG_FLAG_FILE   ((uint8_t)0x10) /*!< supported record file     */
     #define QCC74xLOG_FLAG_CLK    ((uint8_t)0x20) /*!< supported record clock    */
     #define QCC74xLOG_FLAG_TIME   ((uint8_t)0x40) /*!< supported record time     */
     #define QCC74xLOG_FLAG_THREAD ((uint8_t)0x80) /*!< supported record thread   */Copy to clipboard

## QCC74xLOG\_MODE

- Mode used to configure the recorder

     #define QCC74xLOG_MODE_SYNC  ((uint8_t)0x00)
     #define QCC74xLOG_MODE_ASYNC ((uint8_t)0x01)Copy to clipboard

## QCC74xLOG\_COMMAND

- Configuration command, used for the second parameter of qcc74xlog\_control

     #define QCC74xLOG_CMD_FLAG           ((uint32_t)0x01)
     #define QCC74xLOG_CMD_LEVEL          ((uint32_t)0x02)
     #define QCC74xLOG_CMD_QUEUE_POOL     ((uint32_t)0x03)
     #define QCC74xLOG_CMD_QUEUE_SIZE     ((uint32_t)0x04)
     #define QCC74xLOG_CMD_QUEUE_RST      ((uint32_t)0x05)
     #define QCC74xLOG_CMD_ENTER_CRITICAL ((uint32_t)0x06)
     #define QCC74xLOG_CMD_EXIT_CRITICAL  ((uint32_t)0x07)
     #define QCC74xLOG_CMD_FLUSH_NOTICE   ((uint32_t)0x08)
     #define QCC74xLOG_CMD_MODE           ((uint32_t)0x09)Copy to clipboard

## QCC74xLOG\_DIRECT\_COMMAND

- Configuration command, used for the second parameter of
                    qcc74xlog\_direct\_control

     #define QCC74xLOG_DIRECT_CMD_ILLEGAL ((uint32_t)0x00)
     #define QCC74xLOG_DIRECT_CMD_LEVEL   ((uint32_t)0x02)
     #define QCC74xLOG_DIRECT_CMD_LOCK    ((uint32_t)0x06)
     #define QCC74xLOG_DIRECT_CMD_UNLOCK  ((uint32_t)0x07)
     #define QCC74xLOG_DIRECT_CMD_COLOR   ((uint32_t)0x0A)Copy to clipboard

## QCC74xLOG\_DIRECT\_TYPE

- The direct type to be created, used in the second parameter of
                    qcc74xlog\_direct\_create

     #define QCC74xLOG_DIRECT_TYPE_BUFFER    ((uint8_t)0x01)
     #define QCC74xLOG_DIRECT_TYPE_STREAM    ((uint8_t)0x02)
     #define QCC74xLOG_DIRECT_TYPE_FILE      ((uint8_t)0x03)
     #define QCC74xLOG_DIRECT_TYPE_FILE_TIME ((uint8_t)0x04)
     #define QCC74xLOG_DIRECT_TYPE_FILE_SIZE ((uint8_t)0x05)Copy to clipboard

## QCC74xLOG\_DIRECT\_COLOR

- Whether to enable color output, used in the third parameter of
                    qcc74xlog\_direct\_create

     #define QCC74xLOG_DIRECT_COLOR_DISABLE ((uint8_t)0)
     #define QCC74xLOG_DIRECT_COLOR_ENABLE  ((uint8_t)1)Copy to clipboard

## QCC74xLOG\_LAYOUT\_TYPE

- The layout type to be created, used in the second parameter of
                    qcc74xlog\_layout\_create

     #define QCC74xLOG_LAYOUT_TYPE_SIMPLE ((uint8_t)0)
     #define QCC74xLOG_LAYOUT_TYPE_FORMAT ((uint8_t)1)
     #define QCC74xLOG_LAYOUT_TYPE_YAML   ((uint8_t)2)Copy to clipboard

**Parent Topic:** [QCC74xLOG](https://docs.qualcomm.com/doc/80-58740-4/topic/qcc74xlog_0.html)

Last Published: Feb 10, 2025

[Previous Topic
Configure QCC74xLOG functions](https://docs.qualcomm.com/bundle/publicresource/80-58740-4/topics/configure-qcc74xlog-functions.md) [Next Topic
Port functions](https://docs.qualcomm.com/bundle/publicresource/80-58740-4/topics/port-functions.md)