WPILibC++ 2024.3.2
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,
24 int32_t* status);
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()
WPILib Hardware Abstraction Layer (HAL) namespace.
Definition: ChipObject.h:40
Definition: ntcore_cpp.h:26