WPILibC++ 2023.4.3
InterruptManager.h
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#pragma once
6
7#include <FRC_FPGA_ChipObject/fpgainterfacecapi/NiFpga.h>
8#include <wpi/mutex.h>
9
10#include "hal/ChipObject.h"
11#include "hal/Types.h"
12
13namespace hal {
15 public:
17 static void Initialize(tSystemInterface* baseSystem);
18
19 NiFpga_IrqContext GetContext() noexcept;
20 void ReleaseContext(NiFpga_IrqContext context) noexcept;
21
22 uint32_t WaitForInterrupt(NiFpga_IrqContext context, uint32_t mask,
23 bool ignorePrevious, uint32_t timeoutInMs,
25
26 private:
27 InterruptManager() = default;
28
29 wpi::priority_mutex currentMaskMutex;
30 uint32_t currentMask;
31 NiFpga_Session fpgaSession;
32};
33} // namespace hal
Definition: InterruptManager.h:14
NiFpga_IrqContext GetContext() noexcept
void ReleaseContext(NiFpga_IrqContext context) noexcept
uint32_t WaitForInterrupt(NiFpga_IrqContext context, uint32_t mask, bool ignorePrevious, uint32_t timeoutInMs, int32_t *status)
static void Initialize(tSystemInterface *baseSystem)
static InterruptManager & GetInstance()
::uint32_t uint32_t
Definition: Meta.h:56
::int32_t int32_t
Definition: Meta.h:57
GHC_FS_API file_status status(const path &p, std::error_code &ec) noexcept
Definition: filesystem.hpp:4892
WPILib Hardware Abstraction Layer (HAL) namespace.
Definition: ChipObject.h:40
/file This file defines the SmallVector class.
Definition: AprilTagFieldLayout.h:18