forked from ckolivas/cgminer
-
Notifications
You must be signed in to change notification settings - Fork 7
/
knc-transport.h
30 lines (25 loc) · 931 Bytes
/
knc-transport.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
#ifndef _CGMINER_KNC_TRANSPORT_H
#define _CGMINER_KNC_TRANSPORT_H
/*
* Transport layer interface for KnCminer devices
*
* Copyright 2014 KnCminer
*
* 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.
*/
#include <stdint.h>
#define MAX_BYTES_IN_SPI_XSFER 4096
void *knc_trnsp_new(int dev_idx);
void knc_trnsp_free(void *opaque_ctx);
int knc_trnsp_transfer(void *opaque_ctx, const uint8_t *txbuf, uint8_t *rxbuf, int len);
bool knc_trnsp_asic_detect(void *opaque_ctx, int chip_id);
void knc_trnsp_periodic_check(void *opaque_ctx);
/* API */
#ifdef USE_KNC_TRANSPORT_FTDI
struct api_data *knc_i2c_response(char *param, char *err);
struct api_data *knc_asics_response(char *err);
#endif
#endif