|
@@ -176,6 +176,26 @@ static void metabank_shutdown(struct thr_info *thr)
|
|
|
tm_i2c_close();
|
|
tm_i2c_close();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+static struct api_data *metabank_api_extra_device_status(struct cgpu_info *cgpu)
|
|
|
|
|
+{
|
|
|
|
|
+ struct api_data *root = NULL;
|
|
|
|
|
+ float t, vc0, vc1;
|
|
|
|
|
+ struct bitfury_device * const bitfury = cgpu->device_data;
|
|
|
|
|
+
|
|
|
|
|
+ root = api_add_uint(root, "Slot", &(bitfury->slot), false);
|
|
|
|
|
+ root = api_add_int(root, "Clock Bits", (int*)&bitfury->osc6_bits, false);
|
|
|
|
|
+
|
|
|
|
|
+ t = tm_i2c_gettemp(bitfury->slot) * 0.1;
|
|
|
|
|
+ vc0 = tm_i2c_getcore0(bitfury->slot);
|
|
|
|
|
+ vc1 = tm_i2c_getcore1(bitfury->slot);
|
|
|
|
|
+
|
|
|
|
|
+ root = api_add_temp(root, "Slot Temp", &t, true);
|
|
|
|
|
+ root = api_add_temp(root, "Slot VC0", &vc0, true);
|
|
|
|
|
+ root = api_add_temp(root, "Slot VC1", &vc1, true);
|
|
|
|
|
+
|
|
|
|
|
+ return root;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
struct device_drv metabank_drv = {
|
|
struct device_drv metabank_drv = {
|
|
|
.dname = "metabank",
|
|
.dname = "metabank",
|
|
|
.name = "MBF",
|
|
.name = "MBF",
|
|
@@ -194,4 +214,5 @@ struct device_drv metabank_drv = {
|
|
|
.job_process_results = bitfury_job_process_results,
|
|
.job_process_results = bitfury_job_process_results,
|
|
|
|
|
|
|
|
.thread_shutdown = metabank_shutdown,
|
|
.thread_shutdown = metabank_shutdown,
|
|
|
|
|
+ .get_api_extra_device_status = metabank_api_extra_device_status,
|
|
|
};
|
|
};
|