1.宏MR_LIMIT将直接修改变量值。
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user