From f1df805b17c55ae01e8e30b23cd4b8fa8cf8fc8f Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Wed, 7 Jun 2023 10:24:40 +0100 Subject: [PATCH] Added checks on XUA_I2S_N_BITS value --- lib_xua/api/xua_conf_default.h | 3 +++ lib_xua/src/core/warnings.xc | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib_xua/api/xua_conf_default.h b/lib_xua/api/xua_conf_default.h index 17379e94..dd9287dc 100644 --- a/lib_xua/api/xua_conf_default.h +++ b/lib_xua/api/xua_conf_default.h @@ -202,6 +202,9 @@ #define XUA_I2S_N_BITS (32) #endif +#if (XUA_I2S_N_BITS != 16) && (XUA_I2S_N_BITS != 24) && (XUA_I2S_N_BITS != 32) +#error Unsupported value for XUA_I2S_N_BITS (only values 16/24/32 supported) +#endif /** * @brief Max supported sample frequency for device (Hz). Default: 192000 diff --git a/lib_xua/src/core/warnings.xc b/lib_xua/src/core/warnings.xc index 16ffc49e..1a8fadd5 100644 --- a/lib_xua/src/core/warnings.xc +++ b/lib_xua/src/core/warnings.xc @@ -1,8 +1,8 @@ -// Copyright 2013-2021 XMOS LIMITED. +// Copyright 2013-2023 XMOS LIMITED. // This Software is subject to the terms of the XMOS Public Licence: Version 1. /* -Warnings relating to configuration defines located in this XC source file rather than the devicedefines.h header file in order to avoid multiple warnings being issued when the devicedefines.h header file is included in multiple files. +Warnings relating to configuration defines located in this XC source file rather than the xua_conf.h header file in order to avoid multiple warnings being issued when the xua_conf.h header file is included in multiple files. */ #include "xua_conf_full.h"