Panda3DS/include/ipc.hpp
wheremyfoodat dc80828397
Fix typo (#680)
Co-authored-by: Noumi <139501014+noumidev@users.noreply.github.com>
2024-12-10 18:52:53 +02:00

20 lines
No EOL
589 B
C++

#pragma once
#include <cstdint>
namespace IPC {
namespace BufferType {
enum : std::uint32_t {
Send = 1,
Receive = 2,
};
}
constexpr std::uint32_t responseHeader(std::uint32_t commandID, std::uint32_t normalResponses, std::uint32_t translateResponses) {
// TODO: Maybe validate the response count stuff fits in 6 bits
return (commandID << 16) | (normalResponses << 6) | translateResponses;
}
constexpr std::uint32_t pointerHeader(std::uint32_t index, std::uint32_t size, std::uint32_t type) {
return (size << 14) | (index << 10) | (type << 1);
}
} // namespace IPC