zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.32k stars 6.32k forks source link

GPIO emulation in Native Sim should be able to produce errors #73275

Open ClementBonnetPACotte opened 2 months ago

ClementBonnetPACotte commented 2 months ago

Is your enhancement proposal related to a problem? Please describe. GPIO emulation on native sim always return success of lot of functions. This forbid to create tests linked to GPIO errors.

Describe the solution you'd like The GPIO simulator should be able to generate error like the reals drivers. For example, the function gpio_emul_port_set_masked_raw alway return 0, it should return the error produced by gpio_emul_input_set_masked_int.

I'm not sure why this limitation was put in place. If someone can provide some insight, I may be able to code the solution myself.

Describe alternatives you've considered I try to wrap the driver functions using GCC but the usage of static and inline function blocks this option.

github-actions[bot] commented 2 months ago

Hi @ClementBonnetPACotte! We appreciate you submitting your first issue for our open-source project. 🌟

Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙