Browse Source

add the result info (fan/temp etc)

Xiangfu 13 years ago
parent
commit
ce56634dcb
2 changed files with 16 additions and 1 deletions
  1. 1 0
      driver-avalon.c
  2. 15 1
      driver-avalon.h

+ 1 - 0
driver-avalon.c

@@ -678,6 +678,7 @@ static int64_t avalon_scanhash(struct thr_info *thr, struct work **bulk_work,
 			avalon_free_work(thr, bulk2);
 			continue;
 		}
+		avalon->temp = ar.temp0;
 		work_i0 = avalon_decode_nonce(thr, bulk0, &ar, &nonce);
 		work_i1 = avalon_decode_nonce(thr, bulk1, &ar, &nonce);
 		work_i2 = avalon_decode_nonce(thr, bulk2, &ar, &nonce);

+ 15 - 1
driver-avalon.h

@@ -32,7 +32,21 @@ struct avalon_result {
 	uint32_t nonce;
 	uint8_t data[12];
 	uint8_t midstate[32];
-	uint8_t reserved[16];
+
+	uint8_t fan0;
+	uint8_t fan1;
+	uint8_t fan2;
+	uint8_t temp0;
+	uint8_t temp1;
+	uint8_t temp2;
+	uint8_t pad0[2];
+
+	uint16_t fifo_wp;
+	uint16_t fifo_rp;
+	uint8_t chip_num;
+	uint8_t pwm_data;
+	uint8_t timeout;
+	uint8_t miner_num;
 } __attribute__((packed, aligned(4)));
 
 struct avalon_info {