Ken Van Hoeylandt d551e467b8
Moved and renamed files for consistent C code style (#463)
* **Documentation**
  * Added new C coding style guide detailing naming conventions for files, directories, macros, constants, variables, functions, and type definitions with illustrative examples.
  * Updated C++ coding style documentation with clarifications on C naming conventions and header directory organization patterns.

* **Refactor**
  * Updated header include paths throughout the codebase to use lowercase naming conventions consistently.
2026-01-27 20:17:33 +01:00

38 lines
818 B
C

// SPDX-License-Identifier: Apache-2.0
#pragma once
#ifdef ESP_PLATFORM
#include <esp_log.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define LOG_TAG(x) "\033[37m"#x"\033[0m"
#ifndef ESP_PLATFORM
void log_generic(const char* tag, const char* format, ...);
#define LOG_E(x, ...) log_generic(x, ##__VA_ARGS__)
#define LOG_W(x, ...) log_generic(x, ##__VA_ARGS__)
#define LOG_I(x, ...) log_generic(x, ##__VA_ARGS__)
#define LOG_D(x, ...) log_generic(x, ##__VA_ARGS__)
#define LOG_V(x, ...) log_generic(x, ##__VA_ARGS__)
#else
#define LOG_E(x, ...) ESP_LOGE(x, ##__VA_ARGS__)
#define LOG_W(x, ...) ESP_LOGW(x, ##__VA_ARGS__)
#define LOG_I(x, ...) ESP_LOGI(x, ##__VA_ARGS__)
#define LOG_D(x, ...) ESP_LOGD(x, ##__VA_ARGS__)
#define LOG_V(x, ...) ESP_LOGV(x, ##__VA_ARGS__)
#endif
#ifdef __cplusplus
}
#endif