Back to Index

Clamps x to the lo..hi range.

Signature

CLAMP(x, lo, hi, &y);

Example

// Example pattern from analog_macros.ems
CLAMP(ain(1), 0, 10000, mv);