Skip to content

drivers: ISR-friendly driver APIs #6184

@carlescufi

Description

@carlescufi

Statement of problem: Zephyr's driver APIs are designed to be called only from threads, and never from ISRs. There are several aspects that prevent those APIs from being called from an ISR:

  • Many APIs are blocking
  • Many APIs make use of kernel objects or primitives that are not allowed to be used from an ISR
  • All driver APIs are mappable to system calls

Therefore I suggest we extend the current driver APIs where applicable with additional, ISR-friendly API calls that:

  • Are postfixed with _isr
  • Do not block or use kernel objects/primitives that are not allowed from ISR
  • Are never mapped to system calls
  • Can take shortcuts (no device structure for example)

Metadata

Metadata

Labels

RFCRequest For Comments: want input from the communityarea: APIChanges to public APIs

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions