Skip to content

Commit

Permalink
Improve in serverl source and header file
Browse files Browse the repository at this point in the history
  • Loading branch information
QuangHaiNguyen committed Oct 26, 2024
1 parent 29f430a commit f02cc0f
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 9 deletions.
2 changes: 2 additions & 0 deletions easy_embedded/app/cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ target_sources(ez_cli_lib
target_compile_definitions(ez_cli_lib
PUBLIC
EZ_CLI_ENABLE=$<BOOL:${ENABLE_EZ_CLI}>
PRIVATE
EZ_BUILD_WITH_CMAKE=$<BOOL:${BUILD_WITH_CMAKE}>
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ extern "C" {
/*****************************************************************************
* Includes
*****************************************************************************/
#include "ez_task_worker.h"

#if (EZ_THREADX_PORT_ENABLE == 1)
#include "ez_task_worker.h"

/*****************************************************************************
* Component Preprocessor Macros
Expand Down
7 changes: 3 additions & 4 deletions easy_embedded/utilities/hexdump/ez_hexdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
/******************************************************************************
* Includes
*******************************************************************************/
#if(EZ_HEXDUMP == 1U)

#include "ez_hexdump.h"

#if(EZ_HEXDUMP == 1U)
#include "ez_logging.h"
#include "stdio.h"

Expand Down Expand Up @@ -128,6 +128,5 @@ static void PrintAscii(char c)
}
}


#endif /* CONFIG_HELPER_HEXDUMP */
#endif /* (EZ_HEXDUMP == 1U) */
/* End of file*/
7 changes: 7 additions & 0 deletions easy_embedded/utilities/hexdump/ez_hexdump.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ extern "C" {
/*******************************************************************************
* Includes
*******************************************************************************/
#if (EZ_BUILD_WITH_CMAKE == 0U)
#include "ez_target_config.h"
#endif

#if(EZ_HEXDUMP == 1U)
#include "stdint.h"


Expand Down Expand Up @@ -77,6 +82,8 @@ extern "C" {
*****************************************************************************/
void ezHexdump(void *address, uint16_t size);

#endif /* CONFIG_HELPER_HEXDUMP */

#ifdef __cplusplus
}
#endif
Expand Down
5 changes: 4 additions & 1 deletion easy_embedded/utilities/linked_list/ez_linked_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
*****************************************************************************/
#include "ez_linked_list.h"

#if (EZ_LINKEDLIST == 1U)

/*****************************************************************************
* Component Preprocessor Macros
*****************************************************************************/
Expand Down Expand Up @@ -177,4 +179,5 @@ void ezmLL_ResetNode(Node * node)
}
#endif

/* End of file*/
#endif /* (EZ_LINKEDLIST == 1U) */
/* End of file*/
8 changes: 6 additions & 2 deletions easy_embedded/utilities/logging/ez_logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ extern "C" {
/*******************************************************************************
* Includes
*******************************************************************************/
#if (EZ_BUILD_WITH_CMAKE == 0U)
#include "ez_target_config.h"
#endif

#include <stdio.h>
#include "../hexdump/ez_hexdump.h"
#include "ez_hexdump.h"

/******************************************************************************
* Module Preprocessor Macros
Expand All @@ -54,7 +58,7 @@ extern "C" {
#define PRINT_FUNCTION_NAME 0U /**< logging shows function name */

/* Print data on stdout by default */
#ifndef dbg_print(fmt, ...)
#ifndef dbg_print
#define dbg_print(fmt, ...) printf(fmt, ##__VA_ARGS__)
#endif

Expand Down

0 comments on commit f02cc0f

Please sign in to comment.