1.宏MR_LIMIT将直接修改变量值。

This commit is contained in:
MacRsh
2024-01-18 07:58:25 +08:00
parent bbf06b160d
commit 9df8cf9780
2 changed files with 1 additions and 4 deletions

View File

@@ -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"

View File

@@ -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.