SI_DeviceAMBaseboard: Add baseboard 0x70 command to SerialInterface::EBufferCommands enum to eliminate BaseBoardCommand enum.

This commit is contained in:
Jordan Woyak 2026-02-20 15:44:56 -06:00
parent cda384d40f
commit 8da0a94ab9
3 changed files with 4 additions and 9 deletions

View File

@ -59,6 +59,7 @@ enum class EBufferCommands : u8
CMD_ORIGIN = 0x41,
CMD_RECALIBRATE = 0x42,
CMD_DIRECT_KB = 0x54,
CMD_AM_BASEBOARD = 0x70,
CMD_RESET = 0xFF
};

View File

@ -221,19 +221,19 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* buffer, int request_length)
u32 buffer_position = 0;
while (buffer_position < buffer_length)
{
const auto bb_command = static_cast<BaseBoardCommand>(buffer[buffer_position]);
const auto bb_command = EBufferCommands(buffer[buffer_position]);
buffer_position++;
switch (bb_command)
{
case BaseBoardCommand::GCAM_Reset: // Returns ID and dip switches
case EBufferCommands::CMD_STATUS: // Returns ID and dip switches
{
const u32 id = Common::swap32(SI_AM_BASEBOARD | 0x100);
std::memcpy(buffer, &id, sizeof(id));
return sizeof(id);
}
break;
case BaseBoardCommand::GCAM_Command:
case EBufferCommands::CMD_AM_BASEBOARD:
{
u32 checksum = 0;
for (u32 i = 0; i < buffer_length; ++i)

View File

@ -47,12 +47,6 @@ public:
void DoState(PointerWrap&) override;
private:
enum BaseBoardCommand
{
GCAM_Reset = 0x00,
GCAM_Command = 0x70,
};
enum GCAMCommand
{
StatusSwitches = 0x10,