You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#pragma once
#include <stdio.h>
#include "basic_h/basic.hpp"
//
#include "clock.hpp"
extern "C" { extern bool g_enable_log; #define ZLOG_RELEASE(TAG, fmt, ...) \
if (g_enable_log) { \ printf(TAG "" fmt "\n", ##__VA_ARGS__); \ } #define ZLOGI(TAG, fmt, ...) \
if (g_enable_log) { \ printf("%08lu INFO [%-8s] " fmt "\n", zchip_clock_get_ticket(), TAG, ##__VA_ARGS__); \ } #define ZLOGD(TAG, fmt, ...) \
if (g_enable_log) { \ printf("%08lu DEBU [%-8s] " fmt "\n", zchip_clock_get_ticket(), TAG, ##__VA_ARGS__); \ } #define ZLOGE(TAG, fmt, ...) \
if (g_enable_log) { \ printf("%08lu ERRO [%-8s] " fmt "\n", zchip_clock_get_ticket(), TAG, ##__VA_ARGS__); \ }
#define ZASSERT(cond) \
if (!(cond)) { \ while (1) { \ printf("ASSERT: %s [%s:%d]\n", #cond, __FILE__, __LINE__); \ zchip_clock_early_delayus(1000 * 1000); \ } \ }
void zchip_loggger_init(zchip_uart_t *huart); void zchip_loggger_enable(bool enable); }
|