Use IPC:MakeHeader instead of hardcoded raw values for IPC command tables. (#6453)
* Use IPC:MakeHeader instead of hardcoded values for IPC command tables. * Use u32 instead of unsigned int in MakeHeader function Co-authored-by: SachinVin <26602104+SachinVin@users.noreply.github.com> * Fix clang format --------- Co-authored-by: SachinVin <26602104+SachinVin@users.noreply.github.com>
This commit is contained in:
@@ -12,10 +12,10 @@ namespace Service::QTM {
|
||||
|
||||
QTM_C::QTM_C() : ServiceFramework("qtm:c", 2) {
|
||||
static const FunctionInfo functions[] = {
|
||||
// clang-format off
|
||||
// qtm calibration commands
|
||||
{0x00010000, nullptr, "InitializeHardwareCheck"},
|
||||
{0x00050040, nullptr, "SetIrLedCheck"},
|
||||
// clang-format off
|
||||
{IPC::MakeHeader(0x0001, 0, 0), nullptr, "InitializeHardwareCheck"},
|
||||
{IPC::MakeHeader(0x0005, 1, 0), nullptr, "SetIrLedCheck"},
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
|
||||
@@ -12,10 +12,10 @@ namespace Service::QTM {
|
||||
|
||||
QTM_S::QTM_S() : ServiceFramework("qtm:s", 2) {
|
||||
static const FunctionInfo functions[] = {
|
||||
// clang-format off
|
||||
// qtm common commands
|
||||
{0x00010080, nullptr, "GetHeadtrackingInfoRaw"},
|
||||
{0x00020080, nullptr, "GetHeadtrackingInfo"},
|
||||
// clang-format off
|
||||
{IPC::MakeHeader(0x0001, 2, 0), nullptr, "GetHeadtrackingInfoRaw"},
|
||||
{IPC::MakeHeader(0x0002, 2, 0), nullptr, "GetHeadtrackingInfo"},
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
|
||||
@@ -12,10 +12,10 @@ namespace Service::QTM {
|
||||
|
||||
QTM_SP::QTM_SP() : ServiceFramework("qtm:sp", 2) {
|
||||
static const FunctionInfo functions[] = {
|
||||
// clang-format off
|
||||
// qtm common commands
|
||||
{0x00010080, nullptr, "GetHeadtrackingInfoRaw"},
|
||||
{0x00020080, nullptr, "GetHeadtrackingInfo"},
|
||||
// clang-format off
|
||||
{IPC::MakeHeader(0x0001, 2, 0), nullptr, "GetHeadtrackingInfoRaw"},
|
||||
{IPC::MakeHeader(0x0002, 2, 0), nullptr, "GetHeadtrackingInfo"},
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
|
||||
@@ -12,10 +12,10 @@ namespace Service::QTM {
|
||||
|
||||
QTM_U::QTM_U() : ServiceFramework("qtm:u", 2) {
|
||||
static const FunctionInfo functions[] = {
|
||||
// clang-format off
|
||||
// qtm common commands
|
||||
{0x00010080, nullptr, "GetHeadtrackingInfoRaw"},
|
||||
{0x00020080, nullptr, "GetHeadtrackingInfo"},
|
||||
// clang-format off
|
||||
{IPC::MakeHeader(0x0001, 2, 0), nullptr, "GetHeadtrackingInfoRaw"},
|
||||
{IPC::MakeHeader(0x0002, 2, 0), nullptr, "GetHeadtrackingInfo"},
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user