viacuda: Remove parameters from pseudo_command.

They are incomplete or unused (includes cmd and count but not the data and the count isn't used). Might as well get everything from the class fields in_buf and in_count.
This commit is contained in:
joevt 2024-04-21 03:27:14 -07:00 committed by dingusdev
parent 5f6b924004
commit 2b76d8a53a
2 changed files with 4 additions and 3 deletions

View File

@ -496,7 +496,7 @@ void ViaCuda::process_packet() {
for (int i = 0; i < this->in_count; i++) { for (int i = 0; i < this->in_count; i++) {
LOG_F(9, "0x%X ,", this->in_buf[i]); LOG_F(9, "0x%X ,", this->in_buf[i]);
} }
pseudo_command(this->in_buf[1], this->in_count - 2); pseudo_command();
break; break;
default: default:
LOG_F(ERROR, "Cuda: unsupported packet type = %d", this->in_buf[0]); LOG_F(ERROR, "Cuda: unsupported packet type = %d", this->in_buf[0]);
@ -573,9 +573,10 @@ void ViaCuda::autopoll_handler() {
} }
} }
void ViaCuda::pseudo_command(int cmd, int data_count) { void ViaCuda::pseudo_command() {
uint16_t addr; uint16_t addr;
int i; int i;
int cmd = this->in_buf[1];
switch (cmd) { switch (cmd) {
case CUDA_START_STOP_AUTOPOLL: case CUDA_START_STOP_AUTOPOLL:

View File

@ -250,7 +250,7 @@ private:
void error_response(uint32_t error); void error_response(uint32_t error);
void process_packet(); void process_packet();
void process_adb_command(); void process_adb_command();
void pseudo_command(int cmd, int data_count); void pseudo_command();
uint32_t calc_real_time(); uint32_t calc_real_time();
void null_out_handler(void); void null_out_handler(void);