Interface defining Interrupt Status functionality.
Definition at line 57 of file IInterruptStatus.hpp.
Data Structures | |
| struct | InterruptNotification |
| Interrupt Notification from hardware device drivers to be delivered to the client. More... | |
Public Member Functions | |
| virtual SIPLStatus | GetInterruptStatus (uint32_t const gpioIdx, std::array< InterruptNotification, MAX_DEVGRP_NTFNS_PER_INTR > &intrNtfns) const noexcept |
| Requests the driver to query the status of a device in response to an asserted interrupt, and return a list of interrupt notifications to be propagated to the client. More... | |
| virtual SIPLStatus | ResetInterruptNotifications () const |
| Resets the interrupt notifications in the driver context. More... | |
Protected Member Functions | |
| IInterruptStatus ()=default | |
| Constructor. More... | |
| IInterruptStatus (IInterruptStatus const &)=delete | |
| Prevent IInterruptStatus from being copy constructed. More... | |
| IInterruptStatus (IInterruptStatus &&)=delete | |
| Prevent IInterruptStatus from being move constructed. More... | |
| IInterruptStatus & | operator= (IInterruptStatus const &) &=delete |
| Prevent IInterruptStatus from being copy assigned. More... | |
| IInterruptStatus & | operator= (IInterruptStatus &&) &=delete |
| Prevent IInterruptStatus from being move assigned. More... | |
| virtual | ~IInterruptStatus ()=default |
| destructor More... | |
Friends | |
| bool | operator== (InterruptNotification const &self, InterruptNotification const &other) noexcept |
| Equality comparison operator. More... | |
| bool | operator!= (InterruptNotification const &self, InterruptNotification const &other) noexcept |
| Inequality comparison operator. More... | |
|
protecteddefault |
Constructor.
|
protecteddelete |
Prevent IInterruptStatus from being copy constructed.
|
protecteddelete |
Prevent IInterruptStatus from being move constructed.
|
protectedvirtualdefault |
destructor
|
inlinevirtualnoexcept |
Requests the driver to query the status of a device in response to an asserted interrupt, and return a list of interrupt notifications to be propagated to the client.
If the device emits interrupt(s) muxed to the asserted GPIO pin, its driver is expected to perform a brief and minimal query to the hardware (e.g. to read select status registers) over the communication bus to determine whether it is in a state of error.
Locking and synchronization may be required in the driver, in order to protect the context data and communication bus.
If no error statuses or evidence of interrupt assertions were found in the device(s), NVSIPL_STATUS_OK should be returned unless there were errors in the process of querying for this information.
If neither NVSIPL_STATUS_OK nor NVSIPL_STATUS_NOT_SUPPORTED is returned, then an error notification with code InterruptCode::INTR_STATUS_FAILURE is dispatched to the client and no notifications in intrNtfns are dispatched.
| [in] | gpioIdx | CDAC error GPIO index, of type uint32_t. Valid range is [0, UINT_MAX]. |
| [out] | intrNtfns | List of interrupt notifications to propagate to the client. The valid parameter of each element must be set to true, otherwise it is considered empty. |
The list capacity is MAX_DEVGRP_NTFNS_PER_INTR.
| NVSIPL_STATUS_OK | on completion |
| NVSIPL_STATUS_NOT_SUPPORTED | on invalid configuration |
| (SIPLStatus) | other propagated error |
Usage considerations
Definition at line 164 of file IInterruptStatus.hpp.
References nvsipl::NVSIPL_STATUS_NOT_SUPPORTED.
|
protecteddelete |
Prevent IInterruptStatus from being move assigned.
|
protecteddelete |
Prevent IInterruptStatus from being copy assigned.
|
inlinevirtual |
Resets the interrupt notifications in the driver context.
This function clears all interrupt notifications stored in the device driver context. This can be used to clear stale notifications or reset the interrupt state after handling errors.
| NVSIPL_STATUS_OK | on successful reset |
| NVSIPL_STATUS_NOT_SUPPORTED | if the device does not support this operation |
Usage considerations
Definition at line 206 of file IInterruptStatus.hpp.
References nvsipl::NVSIPL_STATUS_NOT_SUPPORTED.
|
friend |
Inequality comparison operator.
Definition at line 101 of file IInterruptStatus.hpp.
|
friend |
Equality comparison operator.
Definition at line 89 of file IInterruptStatus.hpp.