Skip to content

Commit

Permalink
add extern C guard
Browse files Browse the repository at this point in the history
  • Loading branch information
QuangHaiNguyen committed Oct 22, 2024
1 parent 517312b commit 37ab13c
Show file tree
Hide file tree
Showing 19 changed files with 147 additions and 9 deletions.
8 changes: 8 additions & 0 deletions easy_embedded/app/cli/ez_cli.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
#ifndef _EZ_CLI_H
#define _EZ_CLI_H

#ifdef __cplusplus
extern "C" {
#endif

/*****************************************************************************
* Includes
*****************************************************************************/
Expand Down Expand Up @@ -274,6 +278,10 @@ void ezCli_PrintMenu(void);
void ezCli_Printf(char *fmt, ...);
#endif

#ifdef __cplusplus
}
#endif

#endif /* EZ_CLI_ENABLE == 1 */
#endif /* _EZ_CLI_H */

Expand Down
10 changes: 8 additions & 2 deletions easy_embedded/app/data_model/ez_data_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
#ifndef _EZ_DATA_MODEL_H
#define _EZ_DATA_MODEL_H

#ifdef __cplusplus
extern "C" {
#endif

/*****************************************************************************
* Includes
*****************************************************************************/
Expand Down Expand Up @@ -288,8 +292,10 @@ bool DataModel_SubscribeDataPointEvent(DataPoint data_point,
bool DataModel_UnsubscribeDataPointEvent(DataPoint data_point,
ezObserver *observer);

#endif /* CONFIG_DATA_MODEL == 1U */
#ifdef __cplusplus
}
#endif

#endif /* CONFIG_DATA_MODEL == 1U */
#endif /* _EZ_DATA_MODEL_H */

/* End of file */
9 changes: 8 additions & 1 deletion easy_embedded/app/ez_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
#ifndef _EZ_APP_H
#define _EZ_APP_H

#ifdef __cplusplus
extern "C" {
#endif

/*****************************************************************************
* Includes
*****************************************************************************/
Expand Down Expand Up @@ -74,7 +78,10 @@
*****************************************************************************/
void ezApp_Initialize(void);

#endif /* _EZ_APP_H */

#ifdef __cplusplus
}
#endif

#endif /* _EZ_APP_H */
/* End of file */
7 changes: 7 additions & 0 deletions easy_embedded/app/ipc/ez_ipc.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
#ifndef _EZ_IPC_H
#define _EZ_IPC_H

#ifdef __cplusplus
extern "C" {
#endif

/*****************************************************************************
* Includes
*****************************************************************************/
Expand Down Expand Up @@ -216,6 +220,9 @@ void *ezIpc_ReceiveMessage(ezmMailBox receive_from, uint16_t *message_size);
*****************************************************************************/
bool ezIpc_ReleaseMessage(ezmMailBox receive_from, void *message);

#ifdef __cplusplus
}
#endif

#endif /* EZ_IPC_ENABLE == 1 */
#endif /* _EZ_IPC_H */
Expand Down
8 changes: 8 additions & 0 deletions easy_embedded/app/rpc/ez_rpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
#ifndef _EZ_RPC_H
#define _EZ_RPC_H

#ifdef __cplusplus
extern "C" {
#endif

/*****************************************************************************
* Includes
*****************************************************************************/
Expand Down Expand Up @@ -449,6 +453,10 @@ uint32_t ezRPC_NumOfPendingRecords(struct ezRpc *rpc_inst);
*****************************************************************************/
bool ezRpc_IsRpcInstanceReady(struct ezRpc *rpc_inst);

#ifdef __cplusplus
}
#endif

#endif /* EZ_RPC_ENABLE == 1 */
#endif /* _EZ_RPC_H */

Expand Down
10 changes: 8 additions & 2 deletions easy_embedded/ez_easy_embedded.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
#ifndef _EZ_EASY_EMBEDDED_H
#define _EZ_EASY_EMBEDDED_H

#ifdef __cplusplus
extern "C" {
#endif

/*****************************************************************************
* Includes
*****************************************************************************/
Expand Down Expand Up @@ -75,7 +79,9 @@
*****************************************************************************/
void ezEasyEmbedded_Initialize(void);

#endif /* _EZ_EASY_EMBEDDED_H */

#ifdef __cplusplus
}
#endif

#endif /* _EZ_EASY_EMBEDDED_H */
/* End of file */
7 changes: 7 additions & 0 deletions easy_embedded/service/driver/ez_driver_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
#ifndef _EZ_DRIVER_DEF_H
#define _EZ_DRIVER_DEF_H

#ifdef __cplusplus
extern "C" {
#endif

/*****************************************************************************
* Includes
*****************************************************************************/
Expand Down Expand Up @@ -223,6 +227,9 @@ static inline void ezDriver_UnlockDriver(struct ezDriverCommon *drv_common)
}
}

#ifdef __cplusplus
}
#endif

#endif /* EZ_DRIVER_ENABLE == 1 */
#endif /* _EZ_DRIVER_DEF_H */
Expand Down
8 changes: 8 additions & 0 deletions easy_embedded/service/driver/uart/ez_uart.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
#ifndef _EZ_UART_H
#define _EZ_UART_H

#ifdef __cplusplus
extern "C" {
#endif

/*****************************************************************************
* Includes
*****************************************************************************/
Expand Down Expand Up @@ -554,6 +558,10 @@ EZ_DRV_STATUS ezUart_GetConfig(ezUartDrvInstance_t *inst,
*****************************************************************************/
EZ_DRV_STATUS ezUart_UpdateConfig(ezUartDrvInstance_t *inst);

#ifdef __cplusplus
}
#endif

#endif /* EZ_UART_ENABLE == 1 */
#endif /* _EZ_UART_H */

Expand Down
7 changes: 7 additions & 0 deletions easy_embedded/service/event_notifier/ez_event_notifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
#ifndef _EZ_EVENT_NOTIFIER_H
#define _EZ_EVENT_NOTIFIER_H

#ifdef __cplusplus
extern "C" {
#endif

#if(EZ_EVENT_NOTIFIER == 1U)

/*****************************************************************************
Expand Down Expand Up @@ -263,6 +267,9 @@ void ezEventNotifier_NotifyEvent(ezSubject *subject,
void* param1,
void* param2);

#ifdef __cplusplus
}
#endif

#endif /* (EZ_EVENT_NOTIFIER == 1U) */
#endif /* _EZ_EVENT_NOTIFIER_H */
Expand Down
7 changes: 7 additions & 0 deletions easy_embedded/utilities/assert/ez_assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
#ifndef _EZ_ASSERT_H
#define _EZ_ASSERT_H

#ifdef __cplusplus
extern "C" {
#endif

/*******************************************************************************
* Includes
*******************************************************************************/
Expand Down Expand Up @@ -76,6 +80,9 @@
* Function Prototypes
*******************************************************************************/

#ifdef __cplusplus
}
#endif

#endif /* _EZ_ASSERT_H */

Expand Down
9 changes: 7 additions & 2 deletions easy_embedded/utilities/ez_utilities_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
#ifndef _EZ_UTILITIES_COMMON_H
#define _EZ_UTILITIES_COMMON_H

#ifdef __cplusplus
extern "C" {
#endif

/*****************************************************************************
* Includes
*****************************************************************************/
Expand Down Expand Up @@ -69,8 +73,9 @@ typedef enum
*****************************************************************************/
/* None */

#ifdef __cplusplus
}
#endif

#endif /* _EZ_UTILITIES_COMMON_H */


/* End of file */
9 changes: 9 additions & 0 deletions easy_embedded/utilities/hexdump/ez_hexdump.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
#ifndef _HEXDUMP_H
#define _HEXDUMP_H

#ifdef __cplusplus
extern "C" {
#endif

/*******************************************************************************
* Includes
*******************************************************************************/
Expand Down Expand Up @@ -72,6 +76,11 @@
*
*****************************************************************************/
void ezHexdump(void *address, uint16_t size);

#ifdef __cplusplus
}
#endif

#endif /* _HEXDUMP_H */

/* End of file*/
8 changes: 8 additions & 0 deletions easy_embedded/utilities/linked_list/ez_linked_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
#ifndef _LINKEDLIST_H
#define _LINKEDLIST_H

#ifdef __cplusplus
extern "C" {
#endif

/*****************************************************************************
* Includes
*****************************************************************************/
Expand Down Expand Up @@ -256,6 +260,10 @@ struct Node *ezLinkedList_UnlinkCurrentHead(struct Node *head);
*****************************************************************************/
bool ezLinkedList_IsNodeInList(struct Node *head, struct Node *searched_node);

#ifdef __cplusplus
}
#endif

#endif /* _LINKEDLIST_H */

/* End of file*/
8 changes: 8 additions & 0 deletions easy_embedded/utilities/logging/ez_logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
#ifndef _EZ_LOGGING_H
#define _EZ_LOGGING_H

#ifdef __cplusplus
extern "C" {
#endif

/*******************************************************************************
* Includes
*******************************************************************************/
Expand Down Expand Up @@ -226,6 +230,10 @@
*****************************************************************************/
void Logging_DemoFeatures(void);

#ifdef __cplusplus
}
#endif

#endif /* _EZ_LOGGING_H */

/* End of file */
Expand Down
7 changes: 7 additions & 0 deletions easy_embedded/utilities/queue/ez_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
#ifndef _EZ_QUEUE_H
#define _EZ_QUEUE_H

#ifdef __cplusplus
extern "C" {
#endif

/*****************************************************************************
* Includes
*****************************************************************************/
Expand Down Expand Up @@ -377,6 +381,9 @@ uint32_t ezQueue_GetNumOfElement(ezQueue* queue);
*****************************************************************************/
uint32_t ezQueue_IsQueueReady(ezQueue *queue);

#ifdef __cplusplus
}
#endif

#endif /* _EZ_QUEUE */
#endif /* _EZ_QUEUE_H */
Expand Down
8 changes: 8 additions & 0 deletions easy_embedded/utilities/ring_buffer/ez_ring_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
#ifndef RING_BUFFER_H
#define RING_BUFFER_H

#ifdef __cplusplus
extern "C" {
#endif

/*******************************************************************************
* Includes
*******************************************************************************/
Expand Down Expand Up @@ -250,6 +254,10 @@ void ezRingBuffer_Reset(RingBuffer *ring_buff);
*****************************************************************************/
uint16_t ezRingBuffer_GetAvailableMemory( RingBuffer *ring_buff);

#ifdef __cplusplus
}
#endif

#endif /* RING_BUFFER_H */

/* End of file */
8 changes: 8 additions & 0 deletions easy_embedded/utilities/snprintf/snprintf.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
#ifndef _PRINTF_H
#define _PRINTF_H

#ifdef __cplusplus
extern "C" {
#endif

/*******************************************************************************
* Includes
*******************************************************************************/
Expand All @@ -46,6 +50,10 @@
int ezm_snprintf(char * buff, int buff_size, char* fmt, ...);
int ezm_printf(char* fmt, ...);

#ifdef __cplusplus
}
#endif

#endif /* EZM_PRINTF */
#endif /* _PRINTF_H */

Expand Down
8 changes: 8 additions & 0 deletions easy_embedded/utilities/static_alloc/ez_static_alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
#ifndef _EZ_STATIC_ALLOC_H
#define _EZ_STATIC_ALLOC_H

#ifdef __cplusplus
extern "C" {
#endif

#if (EZ_STATIC_ALLOC == 1)

/*****************************************************************************
Expand Down Expand Up @@ -321,6 +325,10 @@ void ezStaticAlloc_PrintFreeList (ezmMemList* mem_list);
*****************************************************************************/
void ezStaticAlloc_PrintAllocList(ezmMemList* mem_list);

#ifdef __cplusplus
}
#endif

#endif /* EZ_STATIC_ALLOC == 1*/
#endif /* _EZ_STATIC_ALLOC_H */

Expand Down
Loading

0 comments on commit 37ab13c

Please sign in to comment.