[hal, cscore, ntcore] Use WPI common handle type base

This commit is contained in:
Peter Johnson
2021-09-17 12:28:12 -07:00
parent 87e34967ef
commit b82d4f6e58
3 changed files with 9 additions and 3 deletions

View File

@@ -5,6 +5,8 @@
#ifndef CSCORE_HANDLE_H_
#define CSCORE_HANDLE_H_
#include <wpi/Synchronization.h>
#include "cscore_c.h"
namespace cs {
@@ -18,7 +20,7 @@ class Handle {
public:
enum Type {
kUndefined = 0,
kProperty = 0x40,
kProperty = wpi::kHandleTypeCSBase,
kSource,
kSink,
kListener,

View File

@@ -6,6 +6,8 @@
#include <stdint.h>
#include <wpi/Synchronization.h>
#include "hal/Types.h"
/* General Handle Data Layout
@@ -43,7 +45,7 @@ constexpr int16_t InvalidHandleIndex = -1;
*/
enum class HAL_HandleEnum {
Undefined = 0,
DIO = 1,
DIO = wpi::kHandleTypeHALBase,
Port = 2,
Notifier = 3,
Interrupt = 4,

View File

@@ -5,6 +5,8 @@
#ifndef NTCORE_HANDLE_H_
#define NTCORE_HANDLE_H_
#include <wpi/Synchronization.h>
#include "ntcore_c.h"
namespace nt {
@@ -17,7 +19,7 @@ namespace nt {
class Handle {
public:
enum Type {
kConnectionListener = 1,
kConnectionListener = wpi::kHandleTypeNTBase,
kConnectionListenerPoller,
kEntry,
kEntryListener,