log: net: move log_backend_net_get() to header
This moves the declaration of log_backend_net_get() to zephyr/logging/log_backend_net.h Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
This commit is contained in:
parent
7bc4ea1e2f
commit
6e12b0210f
|
@ -61,6 +61,15 @@ static inline void log_backend_net_hostname_set(const char *hostname, size_t len
|
|||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Get the net logger backend
|
||||
*
|
||||
* @details This function returns the net logger backend.
|
||||
*
|
||||
* @return Pointer to the net logger backend.
|
||||
*/
|
||||
const struct log_backend *log_backend_net_get(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -19,10 +19,6 @@ BUILD_ASSERT(IS_ENABLED(CONFIG_LOG_BACKEND_NET), "syslog backend not enabled");
|
|||
|
||||
#define SLEEP_BETWEEN_PRINTS 3
|
||||
|
||||
#if defined(CONFIG_LOG_BACKEND_NET)
|
||||
extern const struct log_backend *log_backend_net_get(void);
|
||||
#endif
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int i, count, sleep;
|
||||
|
|
|
@ -42,8 +42,6 @@ static struct log_backend_net_ctx {
|
|||
.sock = -1,
|
||||
};
|
||||
|
||||
const struct log_backend *log_backend_net_get(void);
|
||||
|
||||
static int line_out(uint8_t *data, size_t length, void *output_ctx)
|
||||
{
|
||||
struct log_backend_net_ctx *ctx = (struct log_backend_net_ctx *)output_ctx;
|
||||
|
|
|
@ -16,6 +16,7 @@ LOG_MODULE_REGISTER(net_config, CONFIG_NET_CONFIG_LOG_LEVEL);
|
|||
#include <stdlib.h>
|
||||
|
||||
#include <zephyr/logging/log_backend.h>
|
||||
#include <zephyr/logging/log_backend_net.h>
|
||||
#include <zephyr/net/ethernet.h>
|
||||
#include <zephyr/net/net_core.h>
|
||||
#include <zephyr/net/net_ip.h>
|
||||
|
@ -30,7 +31,6 @@ LOG_MODULE_REGISTER(net_config, CONFIG_NET_CONFIG_LOG_LEVEL);
|
|||
#include "ieee802154_settings.h"
|
||||
#include "bt_settings.h"
|
||||
|
||||
extern const struct log_backend *log_backend_net_get(void);
|
||||
extern int net_init_clock_via_sntp(void);
|
||||
|
||||
static K_SEM_DEFINE(waiter, 0, 1);
|
||||
|
|
Loading…
Reference in New Issue