Skip to content
Commit bf845a27 authored by Jeremy Bettis's avatar Jeremy Bettis Committed by Carles Cufí
Browse files

gpio_emul: Fail at build time if ngpios is too big



Add BUILD_ASSERT to check max val of ngpios. If someone sets ngpios to
more than 32, and acts on pin 32 or higher, memory corruption will
result. This is only a problem with the emulator, real hardware
will have limits that are probably much smaller.

Signed-off-by: default avatarJeremy Bettis <jbettis@google.com>
parent 0d4ff38f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment