Browse Source

knc: Expose Voltage and DCDC Current to RPC status

Luke Dashjr 12 years ago
parent
commit
82342c52cf
1 changed files with 14 additions and 0 deletions
  1. 14 0
      driver-knc.c

+ 14 - 0
driver-knc.c

@@ -678,6 +678,19 @@ out:
 	return rv;
 	return rv;
 }
 }
 
 
+static
+struct api_data *knc_api_extra_device_status(struct cgpu_info * const cgpu)
+{
+	struct api_data *root = NULL;
+	struct thr_info * const thr = cgpu->thr[0];
+	struct knc_core * const knccore = thr->cgpu_data;
+	
+	root = api_add_volts(root, "Voltage", &knccore->volt, false);
+	root = api_add_volts(root, "DCDC Current", &knccore->current, false);
+	
+	return root;
+}
+
 struct device_drv knc_drv = {
 struct device_drv knc_drv = {
 	.dname = "knc",
 	.dname = "knc",
 	.name = "KNC",
 	.name = "KNC",
@@ -693,4 +706,5 @@ struct device_drv knc_drv = {
 	.poll = knc_poll,
 	.poll = knc_poll,
 	
 	
 	.get_stats = knc_get_stats,
 	.get_stats = knc_get_stats,
+	.get_api_extra_device_status = knc_api_extra_device_status,
 };
 };