Skip to content

Commit

Permalink
Merge pull request #377 from wheremyfoodat/scheduler
Browse files Browse the repository at this point in the history
clang-format and IWYU fixes
  • Loading branch information
wheremyfoodat authored Jan 23, 2024
2 parents dcdafda + ecf0416 commit 04bc7a8
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/core/services/cam.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#include "services/cam.hpp"

#include <vector>

#include "ipc.hpp"
#include "kernel.hpp"

Expand All @@ -12,7 +15,7 @@ namespace CAMCommands {
GetTransferBytes = 0x000C0040,
SetTrimming = 0x000E0080,
SetTrimmingParamsCenter = 0x00120140,
SetSize = 0x001F00C0, // Set size has different headers between cam:u and New3DS QTM module
SetSize = 0x001F00C0, // Set size has different headers between cam:u and New3DS QTM module
SetFrameRate = 0x00200080,
SetContrast = 0x00230080,
GetSuitableY2rStandardCoefficient = 0x00360000,
Expand Down Expand Up @@ -78,9 +81,7 @@ void CAMService::handleSyncRequest(u32 messagePointer) {
case CAMCommands::SetTrimmingParamsCenter: setTrimmingParamsCenter(messagePointer); break;
case CAMCommands::SetSize: setSize(messagePointer); break;

default:
Helpers::panic("Unimplemented CAM service requested. Command: %08X\n", command);
break;
default: Helpers::panic("Unimplemented CAM service requested. Command: %08X\n", command); break;
}
}

Expand Down Expand Up @@ -115,7 +116,7 @@ void CAMService::setTransferLines(u32 messagePointer) {

if (port.isValid()) {
const u32 transferBytes = lines * width * 2;

for (int i : port.getPortIndices()) {
ports[i].transferBytes = transferBytes;
}
Expand Down Expand Up @@ -145,7 +146,7 @@ void CAMService::setSize(u32 messagePointer) {
const u32 context = mem.read32(messagePointer + 12);

log("CAM::SetSize (camera select = %d, size = %d, context = %d)\n", cameraSelect, size, context);

mem.write32(messagePointer, IPC::responseHeader(0x1F, 1, 0));
mem.write32(messagePointer + 4, Result::Success);
}
Expand Down

0 comments on commit 04bc7a8

Please sign in to comment.