Skip to content

File lt_logger.c

FileList > base > lt_logger.c

Go to the source code of this file.

  • #include "lt_logger.h"
  • #include <stdio.h>

Public Static Attributes

Type Name
const char levels = = {'V', 'D', 'I', 'W', 'E', 'F'}
uint32_t uart_port = = 0

Public Functions

Type Name
void lt_log (const uint8_t level, const char * format, ...)
void lt_log_disable ()
Disable LT logger. Enable it back using lt_log_set_port(LT_UART_DEFAULT_LOGGER).
void lt_log_set_port (uint8_t port)
Change log output port.

Macros

Type Name
define COLOR_BLACK 0x00
define COLOR_BLUE 0x04
define COLOR_BRIGHT_BLACK 0x10
define COLOR_BRIGHT_BLUE 0x14
define COLOR_BRIGHT_CYAN 0x16
define COLOR_BRIGHT_GREEN 0x12
define COLOR_BRIGHT_MAGENTA 0x15
define COLOR_BRIGHT_RED 0x11
define COLOR_BRIGHT_WHITE 0x17
define COLOR_BRIGHT_YELLOW 0x13
define COLOR_CYAN 0x06
define COLOR_FMT "e[0;30m"
define COLOR_GREEN 0x02
define COLOR_MAGENTA 0x05
define COLOR_RED 0x01
define COLOR_WHITE 0x07
define COLOR_YELLOW 0x03

Public Static Attributes Documentation

variable levels

const char levels[];

variable uart_port

uint32_t uart_port;

Public Functions Documentation

function lt_log

void lt_log (
    const uint8_t level,
    const char * format,
    ...
) 

function lt_log_disable

void lt_log_disable () 

function lt_log_set_port

Change log output port.

void lt_log_set_port (
    uint8_t port
) 

Parameters:

  • port UART port index - can be 0, 1 or 2

Macro Definition Documentation

define COLOR_BLACK

#define COLOR_BLACK 0x00

define COLOR_BLUE

#define COLOR_BLUE 0x04

define COLOR_BRIGHT_BLACK

#define COLOR_BRIGHT_BLACK 0x10

define COLOR_BRIGHT_BLUE

#define COLOR_BRIGHT_BLUE 0x14

define COLOR_BRIGHT_CYAN

#define COLOR_BRIGHT_CYAN 0x16

define COLOR_BRIGHT_GREEN

#define COLOR_BRIGHT_GREEN 0x12

define COLOR_BRIGHT_MAGENTA

#define COLOR_BRIGHT_MAGENTA 0x15

define COLOR_BRIGHT_RED

#define COLOR_BRIGHT_RED 0x11

define COLOR_BRIGHT_WHITE

#define COLOR_BRIGHT_WHITE 0x17

define COLOR_BRIGHT_YELLOW

#define COLOR_BRIGHT_YELLOW 0x13

define COLOR_CYAN

#define COLOR_CYAN 0x06

define COLOR_FMT

#define COLOR_FMT "\e[0;30m"

define COLOR_GREEN

#define COLOR_GREEN 0x02

define COLOR_MAGENTA

#define COLOR_MAGENTA 0x05

define COLOR_RED

#define COLOR_RED 0x01

define COLOR_WHITE

#define COLOR_WHITE 0x07

define COLOR_YELLOW

#define COLOR_YELLOW 0x03

The documentation for this class was generated from the following file cores/common/base/lt_logger.c