NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
IInterruptStatus.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
13 #ifndef IINTERRUPTSTATUS_HPP
14 #define IINTERRUPTSTATUS_HPP
15 
16 #include <array>
17 
18 #include "NvSIPLInterrupts.hpp"
19 
27 namespace nvsipl
28 {
29 
43 static constexpr uint32_t MAX_DEVGRP_NTFNS_PER_INTR { 8U };
44 
49 {
50 public:
59  uint64_t data;
61  uint32_t gpioIdx;
66  uint32_t linkMask;
71  bool valid;
72  };
73 
128  uint32_t const gpioIdx,
129  std::array<InterruptNotification, MAX_DEVGRP_NTFNS_PER_INTR> &intrNtfns) const noexcept
130  {
131  static_cast<void>(gpioIdx);
132  static_cast<void>(intrNtfns);
134  }
135 
136 protected:
140  IInterruptStatus() = default;
141 
145  IInterruptStatus(IInterruptStatus const &) = delete;
146 
150  IInterruptStatus(IInterruptStatus &&) = delete;
151 
155  IInterruptStatus& operator=(IInterruptStatus const &) & = delete;
156 
161 
165  virtual ~IInterruptStatus() = default;
166 };
167 
172  { InterruptCode::INTR_STATUS_FAILURE, 0ULL, 0U, 0U, false };
173 
176 } // end of namespace nvsipl
177 
178 #endif // IINTERRUPTSTATUS_HPP
nvsipl::EMPTY_INTR_NTFN
Empty (invalid) InterruptNotification.
Definition: IInterruptStatus.hpp:171
nvsipl::IInterruptStatus::InterruptNotification::linkMask
uint32_t linkMask
The one-hot link masks indicating which Camera Module link(s) this notification describes.
Definition: IInterruptStatus.hpp:66
nvsipl::InterruptCode::INTR_STATUS_FAILURE
@ INTR_STATUS_FAILURE
Device Block or Camera Link-level event, indicates general failure.
nvsipl::NVSIPL_STATUS_NOT_SUPPORTED
@ NVSIPL_STATUS_NOT_SUPPORTED
Indicates an unsupported operation or argument was encountered.
Definition: NvSIPLCommon.hpp:164
nvsipl::IInterruptStatus
Interface defining Interrupt Status functionality.
Definition: IInterruptStatus.hpp:48
nvsipl::IInterruptStatus::InterruptNotification::gpioIdx
uint32_t gpioIdx
The interrupt CDAC GPIO index.
Definition: IInterruptStatus.hpp:61
nvsipl::IInterruptStatus::InterruptNotification::valid
bool valid
Whether this interrupt notification is valid (filled).
Definition: IInterruptStatus.hpp:71
nvsipl::SIPLStatus
SIPLStatus
Defines the status codes returned by functions in SIPL modules.
Definition: NvSIPLCommon.hpp:153
nvsipl::IInterruptStatus::InterruptNotification::data
uint64_t data
Fixed-sized storage for custom driver-defined payload.
Definition: IInterruptStatus.hpp:59
nvsipl::IInterruptStatus::operator=
IInterruptStatus & operator=(IInterruptStatus const &) &=delete
Prevent IInterruptStatus from being copy assigned.
nvsipl::IInterruptStatus::GetInterruptStatus
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,...
Definition: IInterruptStatus.hpp:127
nvsipl::MAX_DEVGRP_NTFNS_PER_INTR
static constexpr uint32_t MAX_DEVGRP_NTFNS_PER_INTR
Maximum number of error notifications to dispatch to the client per device group (i....
Definition: IInterruptStatus.hpp:43
NvSIPLInterrupts.hpp
NVIDIA SIPL: Interrupts
nvsipl::InterruptCode
InterruptCode
Interrupt Status Codes.
Definition: NvSIPLInterrupts.hpp:29
nvsipl::IInterruptStatus::IInterruptStatus
IInterruptStatus()=default
Constructor.
nvsipl::IInterruptStatus::~IInterruptStatus
virtual ~IInterruptStatus()=default
destructor
nvsipl::IInterruptStatus::InterruptNotification::code
InterruptCode code
The interrupt code to send to the client in the notification.
Definition: IInterruptStatus.hpp:57
nvsipl::IInterruptStatus::InterruptNotification
Interrupt Notification from hardware device drivers to be delivered to the client.
Definition: IInterruptStatus.hpp:55
nvsipl
Contains the classes and variables for implementation of SIPL.
Definition: NvSIPLCamera.hpp:44