-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
142 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include "io-device.hpp" | ||
#include "orbis/KernelAllocator.hpp" | ||
#include "orbis/utils/Logs.hpp" | ||
|
||
struct Hmd2CmdDevice : public IoDevice { | ||
orbis::ErrorCode open(orbis::Ref<orbis::File> *file, const char *path, | ||
std::uint32_t flags, std::uint32_t mode, | ||
orbis::Thread *thread) override; | ||
}; | ||
struct Hmd2CmdFile : public orbis::File {}; | ||
|
||
static orbis::ErrorCode hmd2_cmd_ioctl(orbis::File *file, std::uint64_t request, | ||
void *argp, orbis::Thread *thread) { | ||
ORBIS_LOG_FATAL("Unhandled hmd2_cmd ioctl", request); | ||
return {}; | ||
} | ||
|
||
static const orbis::FileOps ops = { | ||
.ioctl = hmd2_cmd_ioctl, | ||
}; | ||
|
||
orbis::ErrorCode Hmd2CmdDevice::open(orbis::Ref<orbis::File> *file, | ||
const char *path, std::uint32_t flags, | ||
std::uint32_t mode, orbis::Thread *thread) { | ||
auto newFile = orbis::knew<Hmd2CmdFile>(); | ||
newFile->device = this; | ||
newFile->ops = &ops; | ||
*file = newFile; | ||
return {}; | ||
} | ||
|
||
IoDevice *createHmd2CmdCharacterDevice() { return orbis::knew<Hmd2CmdDevice>(); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include "io-device.hpp" | ||
#include "orbis/KernelAllocator.hpp" | ||
#include "orbis/utils/Logs.hpp" | ||
|
||
struct Hmd2GazeDevice : public IoDevice { | ||
orbis::ErrorCode open(orbis::Ref<orbis::File> *file, const char *path, | ||
std::uint32_t flags, std::uint32_t mode, | ||
orbis::Thread *thread) override; | ||
}; | ||
struct Hmd2GazeFile : public orbis::File {}; | ||
|
||
static orbis::ErrorCode hmd2_gaze_ioctl(orbis::File *file, std::uint64_t request, | ||
void *argp, orbis::Thread *thread) { | ||
ORBIS_LOG_FATAL("Unhandled hmd2_gaze ioctl", request); | ||
return {}; | ||
} | ||
|
||
static const orbis::FileOps ops = { | ||
.ioctl = hmd2_gaze_ioctl, | ||
}; | ||
|
||
orbis::ErrorCode Hmd2GazeDevice::open(orbis::Ref<orbis::File> *file, | ||
const char *path, std::uint32_t flags, | ||
std::uint32_t mode, orbis::Thread *thread) { | ||
auto newFile = orbis::knew<Hmd2GazeFile>(); | ||
newFile->device = this; | ||
newFile->ops = &ops; | ||
*file = newFile; | ||
return {}; | ||
} | ||
|
||
IoDevice *createHmd2GazeCharacterDevice() { return orbis::knew<Hmd2GazeDevice>(); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include "io-device.hpp" | ||
#include "orbis/KernelAllocator.hpp" | ||
#include "orbis/utils/Logs.hpp" | ||
|
||
struct Hmd2GenDataDevice : public IoDevice { | ||
orbis::ErrorCode open(orbis::Ref<orbis::File> *file, const char *path, | ||
std::uint32_t flags, std::uint32_t mode, | ||
orbis::Thread *thread) override; | ||
}; | ||
struct Hmd2GenDataFile : public orbis::File {}; | ||
|
||
static orbis::ErrorCode hmd2_gen_data_ioctl(orbis::File *file, std::uint64_t request, | ||
void *argp, orbis::Thread *thread) { | ||
ORBIS_LOG_FATAL("Unhandled hmd2_gen_data ioctl", request); | ||
return {}; | ||
} | ||
|
||
static const orbis::FileOps ops = { | ||
.ioctl = hmd2_gen_data_ioctl, | ||
}; | ||
|
||
orbis::ErrorCode Hmd2GenDataDevice::open(orbis::Ref<orbis::File> *file, | ||
const char *path, std::uint32_t flags, | ||
std::uint32_t mode, orbis::Thread *thread) { | ||
auto newFile = orbis::knew<Hmd2GenDataFile>(); | ||
newFile->device = this; | ||
newFile->ops = &ops; | ||
*file = newFile; | ||
return {}; | ||
} | ||
|
||
IoDevice *createHmd2GenDataCharacterDevice() { return orbis::knew<Hmd2GenDataDevice>(); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include "io-device.hpp" | ||
#include "orbis/KernelAllocator.hpp" | ||
#include "orbis/utils/Logs.hpp" | ||
|
||
struct Hmd2ImuDevice : public IoDevice { | ||
orbis::ErrorCode open(orbis::Ref<orbis::File> *file, const char *path, | ||
std::uint32_t flags, std::uint32_t mode, | ||
orbis::Thread *thread) override; | ||
}; | ||
struct Hmd2ImuFile : public orbis::File {}; | ||
|
||
static orbis::ErrorCode hmd2_imu_ioctl(orbis::File *file, std::uint64_t request, | ||
void *argp, orbis::Thread *thread) { | ||
ORBIS_LOG_FATAL("Unhandled hmd2_imu ioctl", request); | ||
return {}; | ||
} | ||
|
||
static const orbis::FileOps ops = { | ||
.ioctl = hmd2_imu_ioctl, | ||
}; | ||
|
||
orbis::ErrorCode Hmd2ImuDevice::open(orbis::Ref<orbis::File> *file, | ||
const char *path, std::uint32_t flags, | ||
std::uint32_t mode, orbis::Thread *thread) { | ||
auto newFile = orbis::knew<Hmd2ImuFile>(); | ||
newFile->device = this; | ||
newFile->ops = &ops; | ||
*file = newFile; | ||
return {}; | ||
} | ||
|
||
IoDevice *createHmd2ImuCharacterDevice() { return orbis::knew<Hmd2ImuDevice>(); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters