|
|
@@ -22,6 +22,7 @@
|
|
|
#include "logging.h"
|
|
|
#include "miner.h"
|
|
|
#include "fpgautils.h"
|
|
|
+#include "lowlevel.h"
|
|
|
#include "util.h"
|
|
|
|
|
|
#define BITSTREAM_FILENAME "fpgaminer_x6500-overclocker-0402.bit"
|
|
|
@@ -100,6 +101,12 @@ _bailout(int fd, struct cgpu_info*modminer, int prio, const char *fmt, ...)
|
|
|
// 45 noops sent when detecting, in case the device was left in "start job" reading
|
|
|
static const char NOOP[] = MODMINER_PING "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff";
|
|
|
|
|
|
+static
|
|
|
+bool modminer_lowl_match(const struct lowlevel_device_info * const info)
|
|
|
+{
|
|
|
+ return lowlevel_match_lowlproduct(info, &lowl_vcom, "ModMiner");
|
|
|
+}
|
|
|
+
|
|
|
static bool
|
|
|
modminer_detect_one(const char *devpath)
|
|
|
{
|
|
|
@@ -159,16 +166,10 @@ modminer_detect_one(const char *devpath)
|
|
|
|
|
|
#undef bailout
|
|
|
|
|
|
-static int
|
|
|
-modminer_detect_auto()
|
|
|
-{
|
|
|
- return serial_autodetect(modminer_detect_one, "ModMiner");
|
|
|
-}
|
|
|
-
|
|
|
-static void
|
|
|
-modminer_detect()
|
|
|
+static
|
|
|
+bool modminer_lowl_probe(const struct lowlevel_device_info * const info)
|
|
|
{
|
|
|
- serial_detect_auto(&modminer_drv, modminer_detect_one, modminer_detect_auto);
|
|
|
+ return vcom_lowl_probe_wrapper(info, modminer_detect_one);
|
|
|
}
|
|
|
|
|
|
#define bailout(...) return _bailout(-1, modminer, __VA_ARGS__);
|
|
|
@@ -846,7 +847,8 @@ void modminer_wlogprint_status(struct cgpu_info *cgpu)
|
|
|
struct device_drv modminer_drv = {
|
|
|
.dname = "modminer",
|
|
|
.name = "MMQ",
|
|
|
- .drv_detect = modminer_detect,
|
|
|
+ .lowl_match = modminer_lowl_match,
|
|
|
+ .lowl_probe = modminer_lowl_probe,
|
|
|
.override_statline_temp2 = get_modminer_upload_percent,
|
|
|
.get_stats = modminer_get_stats,
|
|
|
.get_api_extra_device_status = get_modminer_drv_extra_device_status,
|