mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Provide basic structure for a hashfast driver.
This commit is contained in:
parent
ece6295874
commit
78932aa1ed
@ -9,4 +9,59 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#include "usbutils.h"
|
||||||
|
#include "fpgautils.h"
|
||||||
|
|
||||||
#include "driver-hashfast.h"
|
#include "driver-hashfast.h"
|
||||||
|
|
||||||
|
static hf_info_t **hashfast_infos;
|
||||||
|
struct device_drv hashfast_drv;
|
||||||
|
|
||||||
|
static void hashfast_detect(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool hashfast_prepare(struct thr_info __maybe_unused *thr)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool hashfast_fill(struct cgpu_info __maybe_unused *hashfast)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int64_t hashfast_scanhash(struct thr_info __maybe_unused *thr)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct api_data *hashfast_api_stats(struct cgpu_info __maybe_unused *cgpu)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void hashfast_init(struct cgpu_info __maybe_unused *hashfast)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static void hashfast_shutdown(struct thr_info __maybe_unused *thr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
struct device_drv hashfast_drv = {
|
||||||
|
.drv_id = DRIVER_HASHFAST,
|
||||||
|
.dname = "Hashfast",
|
||||||
|
.name = "HFA",
|
||||||
|
.drv_detect = hashfast_detect,
|
||||||
|
.thread_prepare = hashfast_prepare,
|
||||||
|
.hash_work = hash_queued_work,
|
||||||
|
.queue_full = hashfast_fill,
|
||||||
|
.scanwork = hashfast_scanhash,
|
||||||
|
.get_api_stats = hashfast_api_stats,
|
||||||
|
.reinit_device = hashfast_init,
|
||||||
|
.thread_shutdown = hashfast_shutdown,
|
||||||
|
};
|
||||||
|
1
miner.h
1
miner.h
@ -228,6 +228,7 @@ enum drv_driver {
|
|||||||
DRIVER_ZTEX,
|
DRIVER_ZTEX,
|
||||||
DRIVER_BFLSC,
|
DRIVER_BFLSC,
|
||||||
DRIVER_AVALON,
|
DRIVER_AVALON,
|
||||||
|
DRIVER_HASHFAST,
|
||||||
DRIVER_MAX
|
DRIVER_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
|
11
usbutils.c
11
usbutils.c
@ -50,6 +50,10 @@
|
|||||||
#define DRV_AVALON 6
|
#define DRV_AVALON 6
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_HASHFAST
|
||||||
|
#define DRV_HASHFAST 7
|
||||||
|
#endif
|
||||||
|
|
||||||
#define DRV_LAST -1
|
#define DRV_LAST -1
|
||||||
|
|
||||||
#define USB_CONFIG 1
|
#define USB_CONFIG 1
|
||||||
@ -219,6 +223,13 @@ static struct usb_find_devices find_dev[] = {
|
|||||||
.epcount = ARRAY_SIZE(ava_eps),
|
.epcount = ARRAY_SIZE(ava_eps),
|
||||||
.eps = ava_eps },
|
.eps = ava_eps },
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef USE_HASHFAST
|
||||||
|
{
|
||||||
|
.drv = DRV_HASHFAST,
|
||||||
|
.name = "HFA",
|
||||||
|
.ident = IDENT_HFA,
|
||||||
|
},
|
||||||
|
#endif
|
||||||
#ifdef USE_ICARUS
|
#ifdef USE_ICARUS
|
||||||
{
|
{
|
||||||
.drv = DRV_ICARUS,
|
.drv = DRV_ICARUS,
|
||||||
|
@ -131,6 +131,7 @@ enum sub_ident {
|
|||||||
IDENT_MMQ,
|
IDENT_MMQ,
|
||||||
IDENT_AVA,
|
IDENT_AVA,
|
||||||
IDENT_BTB,
|
IDENT_BTB,
|
||||||
|
IDENT_HFA,
|
||||||
IDENT_ICA,
|
IDENT_ICA,
|
||||||
IDENT_AMU,
|
IDENT_AMU,
|
||||||
IDENT_BLT,
|
IDENT_BLT,
|
||||||
|
Loading…
Reference in New Issue
Block a user