Hash :
7dcb4fb5
Author :
Date :
2013-10-25T13:47:44
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
/*
* Copyright 2013 Con Kolivas
*
* 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 the Free
* Software Foundation; either version 3 of the License, or (at your option)
* any later version. See COPYING for more details.
*/
#ifndef BITFURY_H
#define BITFURY_H
#include "miner.h"
#include "usbutils.h"
#define WORK_HISTORY_LEN 2
struct drillbit_chip_info;
/* drillbit_info structure applies to entire device */
struct drillbit_info {
struct cgpu_info *base_cgpu;
uint8_t version;
char product[8];
uint32_t serial;
uint8_t num_chips;
struct drillbit_chip_info *chips;
};
enum drillbit_chip_state {
IDLE, /* Has no work */
WORKING_NOQUEUED, /* Has current work but nothing queued as "next work" */
WORKING_QUEUED /* Has current work and a piece of work queued for after that */
};
struct drillbit_chip_info {
uint16_t chip_id;
struct work *current_work[WORK_HISTORY_LEN];
enum drillbit_chip_state state;
struct timeval tv_start;
};
#endif /* BITFURY_H */