forked from girnyau/cgminer-gc3355
-
Notifications
You must be signed in to change notification settings - Fork 9
/
driver-gridseed.h
39 lines (28 loc) · 1.12 KB
/
driver-gridseed.h
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
#ifndef INCLUDE_DRIVER_GRIDSEED_H
#define INCLUDE_DRIVER_GRIDSEED_H
#ifdef USE_GRIDSEED
#include "util.h"
#define GRIDSEED_MINER_THREADS 1
#define GRIDSEED_LATENCY 4
#define GRIDSEED_DEFAULT_BAUD 115200
#define GRIDSEED_DEFAULT_FREQUENCY 750
#define GRIDSEED_DEFAULT_CHIPS 5
#define GRIDSEED_MAX_CHIPS 256
#define GRIDSEED_COMMAND_DELAY 20
#define GRIDSEED_READ_SIZE 12
#define GRIDSEED_MCU_QUEUE_LEN 0
#define GRIDSEED_SOFT_QUEUE_LEN (GRIDSEED_MCU_QUEUE_LEN+2)
#define GRIDSEED_READBUF_SIZE 8192
#define GRIDSEED_HASH_SPEED ((double)0.0851128926) // in ms
#define GRIDSEED_F_IN 25 // input frequency
#define GRIDSEED_PROXY_PORT 3350
#define GRIDSEED_PERIPH_BASE ((uint32_t)0x40000000)
#define GRIDSEED_APB2PERIPH_BASE (GRIDSEED_PERIPH_BASE + 0x10000)
#define GRIDSEED_GPIOA_BASE (GRIDSEED_APB2PERIPH_BASE + 0x0800)
#define GRIDSEED_CRL_OFFSET 0x00
#define GRIDSEED_ODR_OFFSET 0x0c
#define transfer(gridseed, request_type, bRequest, wValue, wIndex, cmd) \
_transfer(gridseed, request_type, bRequest, wValue, wIndex, NULL, 0, cmd)
#endif
extern struct device_drv gridseed_drv;
#endif /* INCLUDE_DRIVER_GRIDSEED_H */