* This file is part of the libsigrok project.
*
* Copyright (C) 2018 James Churchill <pelrun@gmail.com>
+ * Copyright (C) 2019 Frank Stettner <frank-stettner@gmx.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
struct dev_context {
const struct rdtech_dps_model *model;
struct sr_sw_limits limits;
- int expecting_registers;
+ GMutex rw_mutex;
};
enum rdtech_dps_register {
MODE_CC = 1,
};
-SR_PRIV int rdtech_dps_get_reg(struct sr_modbus_dev_inst *modbus, uint16_t address, uint16_t *value);
-SR_PRIV int rdtech_dps_set_reg(struct sr_modbus_dev_inst *modbus, uint16_t address, uint16_t value);
+SR_PRIV int rdtech_dps_get_reg(const struct sr_dev_inst *sdi, uint16_t address, uint16_t *value);
+SR_PRIV int rdtech_dps_set_reg(const struct sr_dev_inst *sdi, uint16_t address, uint16_t value);
SR_PRIV int rdtech_dps_get_model_version(struct sr_modbus_dev_inst *modbus,
uint16_t *model, uint16_t *version);
-SR_PRIV int rdtech_dps_capture_start(const struct sr_dev_inst *sdi);
SR_PRIV int rdtech_dps_receive_data(int fd, int revents, void *cb_data);
#endif