/ knc-transport.h
knc-transport.h
1 /* 2 * Transport layer interface for KnCminer devices 3 * 4 * Copyright 2014 KnCminer 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License as published by the Free 8 * Software Foundation; either version 3 of the License, or (at your option) 9 * any later version. See COPYING for more details. 10 */ 11 12 #define MAX_ASICS 6 13 #define NUM_DIES_IN_ASIC 4 14 #define CORES_IN_DIE 48 15 #define CORES_PER_ASIC (NUM_DIES_IN_ASIC * CORES_IN_DIE) 16 17 #define MAX_BYTES_IN_SPI_XSFER 4096 18 19 void *knc_trnsp_new(int dev_idx); 20 void knc_trnsp_free(void *opaque_ctx); 21 int knc_trnsp_transfer(void *opaque_ctx, uint8_t *txbuf, uint8_t *rxbuf, int len); 22 bool knc_trnsp_asic_detect(void *opaque_ctx, int chip_id); 23 void knc_trnsp_periodic_check(void *opaque_ctx);