|
L14-Click 1.0
STM32WLE5CC LoRaWAN Sensor Platform
|
Go to the source code of this file.
Macros | |
| #define | ABS(x) |
| Compute the absolute value of x without using math.h. | |
| #define | PRIf_02 "%d.%02d" |
| printf format string for printing a float/double as integer with 2 decimal places. Use together with PRIf_02D to avoid floating-point printf on embedded targets. | |
| #define | PRIf_02D(fData) |
| Expands to integer and fractional arguments for use with PRIf_02. Splits a float/double into the integer part and the two-digit fractional part. | |
| #define | CLAMP(val, minVal, maxVal) |
| Clamp val to the closed interval [minVal, maxVal]. All three arguments are evaluated exactly once via temporary variables, avoiding double-evaluation side effects. Uses a GCC statement expression. | |
| #define ABS | ( | x | ) |
| #define CLAMP | ( | val, | |
| minVal, | |||
| maxVal ) |
Clamp val to the closed interval [minVal, maxVal]. All three arguments are evaluated exactly once via temporary variables, avoiding double-evaluation side effects. Uses a GCC statement expression.
| val | The value to clamp |
| minVal | Lower bound (inclusive) |
| maxVal | Upper bound (inclusive) |
Definition at line 50 of file mydefs.h.
Referenced by systemParams_Correction().
| #define PRIf_02 "%d.%02d" |
printf format string for printing a float/double as integer with 2 decimal places. Use together with PRIf_02D to avoid floating-point printf on embedded targets.
Example:
Definition at line 30 of file mydefs.h.
Referenced by amb_tsl2591_LogData(), bar_bmp585_LogData(), bar_ils22qs_LogData(), scd41_LogData(), sps30_LogData(), and tmphm_sht45_LogData().
| #define PRIf_02D | ( | fData | ) |
Expands to integer and fractional arguments for use with PRIf_02. Splits a float/double into the integer part and the two-digit fractional part.
| fData | The float or double value to format |
Definition at line 38 of file mydefs.h.
Referenced by amb_tsl2591_LogData(), bar_bmp585_LogData(), bar_ils22qs_LogData(), scd41_LogData(), sps30_LogData(), and tmphm_sht45_LogData().