* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "protocol.h"
-
+#include <config.h>
#include <string.h>
#include <math.h>
+#include "protocol.h"
extern struct sr_dev_driver uni_t_ut32x_driver_info;
{
struct dev_context *devc;
struct sr_datafeed_packet packet;
- struct sr_datafeed_analog analog;
+ struct sr_datafeed_analog_old analog;
GString *spew;
float temp;
int i;
is_valid = FALSE;
if (is_valid) {
- memset(&analog, 0, sizeof(struct sr_datafeed_analog));
+ memset(&analog, 0, sizeof(struct sr_datafeed_analog_old));
analog.mq = SR_MQ_TEMPERATURE;
analog.mqflags = 0;
switch (devc->packet[5] - 0x30) {
if (is_valid) {
analog.num_samples = 1;
analog.data = &temp;
- packet.type = SR_DF_ANALOG;
+ packet.type = SR_DF_ANALOG_OLD;
packet.payload = &analog;
sr_session_send(devc->cb_data, &packet);
g_slist_free(analog.channels);
}
-SR_PRIV void uni_t_ut32x_receive_transfer(struct libusb_transfer *transfer)
+SR_PRIV void LIBUSB_CALL uni_t_ut32x_receive_transfer(struct libusb_transfer *transfer)
{
struct dev_context *devc;
struct sr_dev_inst *sdi;
return TRUE;
di = sdi->driver;
- drvc = di->priv;
+ drvc = di->context;
if (!(devc = sdi->priv))
return TRUE;