Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed F' C header files to be C++ compliant. #2936

Merged
merged 2 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Fw/Types/BasicTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
#ifndef FW_BASIC_TYPES_H
#define FW_BASIC_TYPES_H

#ifdef __cplusplus
extern "C" {
#endif

// Compiler checks
#if defined(__GNUC__) || defined(__llvm__) || defined(PLATFORM_OVERRIDE_GCC_CLANG_CHECK)
#else
Expand Down Expand Up @@ -79,4 +83,8 @@ typedef PlatformPointerCastType POINTER_CAST;
#define PRIVATE private //!< overridable private for unit testing
#endif

#ifdef __cplusplus
}
#endif

#endif // FW_BASIC_TYPES_H
9 changes: 9 additions & 0 deletions Fw/Types/CAssert.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

#include <FpConfig.h>

#ifdef __cplusplus
extern "C" {
#endif

#if FW_ASSERT_LEVEL == FW_NO_ASSERT

#define FW_CASSERT(...)
Expand All @@ -28,4 +32,9 @@ I32 CAssert0(FILE_NAME_ARG file, U32 lineNo); //!< C asse
I32 CAssert1(FILE_NAME_ARG file, U32 lineNo, NATIVE_INT_TYPE arg1); //!< C assert function 1

#endif // ASSERT is defined

#ifdef __cplusplus
}
#endif

#endif /* FWCASSERT_HPP_ */
7 changes: 7 additions & 0 deletions Utils/Hash/libcrc/lib_crc.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
#ifndef UTILS_HASH_LIB_CRC_HPP
#define UTILS_HASH_LIB_CRC_HPP

#ifdef __cplusplus
extern "C" {
#endif

#define CRC_VERSION "1.16"

Expand All @@ -67,4 +70,8 @@ unsigned short update_crc_dnp( unsigned short crc, char c
unsigned short update_crc_kermit( unsigned short crc, char c );
unsigned short update_crc_sick( unsigned short crc, char c, char prev_byte );

#ifdef __cplusplus
}
#endif

#endif // UTILS_HASH_LIB_CRC_HPP
9 changes: 9 additions & 0 deletions cmake/platform/types/PlatformTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
#include <inttypes.h>
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

// Define what types and checks are supported by this platform
#define FW_HAS_64_BIT 1 //!< Architecture supports 64 bit integers
#define FW_HAS_32_BIT 1 //!< Architecture supports 32 bit integers
Expand Down Expand Up @@ -86,5 +90,10 @@ typedef uint8_t PlatformPointerCastType;
#else
#error "Expected __SIZEOF_POINTER__ to be one of 8, 4, 2, or 1"
#endif
#endif // PLATFORM_POINTER_CAST_TYPE_DEFINED

#ifdef __cplusplus
}
#endif

#endif // PLATFORM_TYPES_H_
9 changes: 9 additions & 0 deletions config/FpConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@

#include <Fw/Types/BasicTypes.h>

#ifdef __cplusplus
extern "C" {
#endif

// ----------------------------------------------------------------------
// Type aliases
// ----------------------------------------------------------------------
Expand Down Expand Up @@ -428,4 +432,9 @@ typedef FwIndexType FwQueueSizeType;
// DO NOT TOUCH. These types are specified for backwards naming compatibility.
typedef FwSizeStoreType FwBuffSizeType;
#define PRI_FwBuffSizeType PRI_FwSizeStoreType

#ifdef __cplusplus
}
#endif

#endif
Loading