aboutsummaryrefslogtreecommitdiffstats
path: root/libSYS
diff options
context:
space:
mode:
Diffstat (limited to 'libSYS')
-rw-r--r--libSYS/include/machine_type.h13
-rw-r--r--libSYS/include/syslib_channelMapDescr.h6
-rw-r--r--libSYS/src/syslib_channelMapDescr.cpp31
3 files changed, 48 insertions, 2 deletions
diff --git a/libSYS/include/machine_type.h b/libSYS/include/machine_type.h
index b66d5ad..bd97669 100644
--- a/libSYS/include/machine_type.h
+++ b/libSYS/include/machine_type.h
@@ -382,13 +382,22 @@ it. Hence, a fully platform-independant way to use alignment is not supported.
/**************************************************
* Macros regarding static code analysis
**************************************************/
-#if defined(__clang__)
+#ifdef __cplusplus
+#if !defined(__has_cpp_attribute)
+#define __has_cpp_attribute(x) 0
+#endif
+#if defined(__clang__) && __has_cpp_attribute(clang::fallthrough)
#define FDK_FALLTHROUGH [[clang::fallthrough]]
-#elif defined(__GNUC__) && (__GNUC__ >= 7)
+#endif
+#endif
+
+#ifndef FDK_FALLTHROUGH
+#if defined(__GNUC__) && (__GNUC__ >= 7)
#define FDK_FALLTHROUGH __attribute__((fallthrough))
#else
#define FDK_FALLTHROUGH
#endif
+#endif
#ifdef _MSC_VER
/*
diff --git a/libSYS/include/syslib_channelMapDescr.h b/libSYS/include/syslib_channelMapDescr.h
index 1c5737a..375a24d 100644
--- a/libSYS/include/syslib_channelMapDescr.h
+++ b/libSYS/include/syslib_channelMapDescr.h
@@ -189,6 +189,12 @@ UCHAR FDK_chMapDescr_getMapValue(const FDK_channelMapDescr* const pMapDescr,
*/
int FDK_chMapDescr_isValid(const FDK_channelMapDescr* const pMapDescr);
+/**
+ * Extra variables for setting up Wg4 channel mapping.
+ */
+extern const CHANNEL_MAP_INFO FDK_mapInfoTabWg4[];
+extern const UINT FDK_mapInfoTabLenWg4;
+
#ifdef __cplusplus
}
#endif
diff --git a/libSYS/src/syslib_channelMapDescr.cpp b/libSYS/src/syslib_channelMapDescr.cpp
index e011f25..d22a30d 100644
--- a/libSYS/src/syslib_channelMapDescr.cpp
+++ b/libSYS/src/syslib_channelMapDescr.cpp
@@ -155,6 +155,37 @@ static const CHANNEL_MAP_INFO mapInfoTabDflt[DFLT_CH_MAP_TAB_LEN] =
/* 13 */ {mapCfg13, 24},
/* 14 */ {mapCfg14, 8}};
+
+static const UCHAR mapWg4Cfg1[] = {0, 1};
+static const UCHAR mapWg4Cfg2[] = {0, 1};
+static const UCHAR mapWg4Cfg3[] = {2, 0, 1};
+static const UCHAR mapWg4Cfg4[] = {3, 0, 1, 2};
+static const UCHAR mapWg4Cfg5[] = {4, 0, 1, 2, 3};
+static const UCHAR mapWg4Cfg6[] = {4, 0, 1, 2, 3, 5};
+static const UCHAR mapWg4Cfg7[] = {6, 0, 1, 2, 3, 4, 5, 7};
+static const UCHAR mapWg4Cfg14[] = {6, 0, 1, 2, 3, 4, 5, 7};
+
+const CHANNEL_MAP_INFO FDK_mapInfoTabWg4[] =
+ {/* chCfg, map, numCh */
+ /* 0 */ {mapFallback, 24},
+ /* 1 */ {mapWg4Cfg1, 2},
+ /* 2 */ {mapWg4Cfg2, 2},
+ /* 3 */ {mapWg4Cfg3, 3},
+ /* 4 */ {mapWg4Cfg4, 4},
+ /* 5 */ {mapWg4Cfg5, 5},
+ /* 6 */ {mapWg4Cfg6, 6},
+ /* 7 */ {mapWg4Cfg7, 8},
+ /* 8 */ {mapFallback, 24},
+ /* 9 */ {mapFallback, 24},
+ /* 10 */ {mapFallback, 24},
+ /* 11 */ {mapFallback, 24}, // Unhandled for Wg4 yet
+ /* 12 */ {mapFallback, 24}, // Unhandled for Wg4 yet
+ /* 13 */ {mapFallback, 24}, // Unhandled for Wg4 yet
+ /* 14 */ {mapFallback, 24}}; // Unhandled for Wg4 yet
+
+const UINT FDK_mapInfoTabLenWg4 = sizeof(FDK_mapInfoTabWg4)/sizeof(FDK_mapInfoTabWg4[0]);
+
+
/**
* Get the mapping value for a specific channel and map index.
*/