Skip to content

gpio_emul: gpio_* functions not callable within an ISR #53964

@alexanderwachter

Description

@alexanderwachter

Describe the bug
The gpio_emul driver uses a mutex to protect the internal data.
Locking on a mutex is not allowed within an ISR.
If a user wants to check for example a pin state within an ISR, which is a common use-case, the program halts on an assert.

To Reproduce
call any gpio function, where the gpio controller is an emul, from an ISR

Expected behavior
The gpio_emul should behave like the other GPIO drivers, which are callable from an ISR

Impact
Makes testing hard if you have the situation where you trigger on both edges of a pin and the state of the pin is or relevance.
In such a case, one might want to call gpio_pin_get within the isr_callback

Fixed by #53480

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions