From 9df8cf9780f3a9982dd8298d796d4620014a0b0c Mon Sep 17 00:00:00 2001 From: MacRsh Date: Thu, 18 Jan 2024 07:58:25 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=AE=8FMR=5FLIMIT=E5=B0=86=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E4=BF=AE=E6=94=B9=E5=8F=98=E9=87=8F=E5=80=BC=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/mr_lib.h | 1 - include/mr_service.h | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/include/mr_lib.h b/include/mr_lib.h index 75bfadd..085a690 100644 --- a/include/mr_lib.h +++ b/include/mr_lib.h @@ -8,7 +8,6 @@ extern "C" { #include "mr_api.h" #include "mr_config.h" #include "mr_def.h" -#include "mr_lib.h" #include "mr_service.h" #include "components/mr_msh.h" #include "device/mr_adc.h" diff --git a/include/mr_service.h b/include/mr_service.h index a930acd..057e9af 100644 --- a/include/mr_service.h +++ b/include/mr_service.h @@ -144,10 +144,8 @@ extern "C" { * @param value The value. * @param min The minimum value. * @param max The maximum value. - * - * @return The value within the specified range. */ -#define MR_LIMIT(value, min, max) MR_BOUND(value, min, max) +#define MR_LIMIT(value, min, max) (value) = MR_BOUND(value, min, max) /** * @brief This macro function swaps two values.