-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers/gpio: specify whether driver is ISR-safe
At least one GPIO driver (SX1509B) is outside the SOC and requires I2C transactions for its basic operations. That fact could not be detected from a generic GPIO driver reference, potentially causing problems if a pin was written or reconfigured from within an ISR. Add a flag to the driver API that specifies that ISR operations are unsafe, and set the flag in the SX1509B driver API structure. Add API that allows querying the state of this flag, to be used in concert with k_is_in_isr(). Signed-off-by: Peter A. Bigot <pab@pabigot.com>
- Loading branch information
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters