diff --git a/devices/viacuda.cpp b/devices/viacuda.cpp index e559f90..731316d 100644 --- a/devices/viacuda.cpp +++ b/devices/viacuda.cpp @@ -370,6 +370,16 @@ void ViaCuda::pseudo_command(int cmd, int data_count) { this->out_buf[3] = this->poll_rate; this->out_count++; break; + case CUDA_SET_DEVICE_LIST: + response_header(CUDA_PKT_PSEUDO, 0); + this->device_mask = ((uint16_t)in_buf[2]) >> 8; + this->device_mask += ((uint16_t)in_buf[3]); + break; + case CUDA_GET_DEVICE_LIST: + response_header(CUDA_PKT_PSEUDO, 0); + this->out_buf[2] = (uint8_t)((this->device_mask >> 8) & 0xFF); + this->out_buf[3] = (uint8_t)((this->device_mask) & 0xFF); + break; case CUDA_READ_WRITE_I2C: response_header(CUDA_PKT_PSEUDO, 0); i2c_simple_transaction(this->in_buf[2], &this->in_buf[3], this->in_count - 3); diff --git a/devices/viacuda.h b/devices/viacuda.h index e6d16c8..7197f95 100644 --- a/devices/viacuda.h +++ b/devices/viacuda.h @@ -102,6 +102,8 @@ enum { CUDA_FILE_SERVER_FLAG = 0x13, /* set file server flag */ CUDA_SET_AUTOPOLL_RATE = 0x14, /* set auto-polling rate */ CUDA_GET_AUTOPOLL_RATE = 0x16, /* get auto-polling rate */ + CUDA_SET_DEVICE_LIST = 0x19, /* set device list */ + CUDA_GET_DEVICE_LIST = 0x1A, /* get device list */ CUDA_READ_WRITE_I2C = 0x22, /* read/write I2C device */ CUDA_COMB_FMT_I2C = 0x25, /* combined format I2C transaction */ CUDA_OUT_PB0 = 0x26, /* output one bit to Cuda's PB0 line */ @@ -144,6 +146,7 @@ private: int32_t real_time = 0; bool file_server; uint16_t m6805_address = 0x1100; + uint16_t device_mask = 0; bool is_open_ended; uint8_t curr_i2c_addr;