knc-transport.h 807 B

1234567891011121314151617181920212223
  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. #define MAX_ASICS 6
  12. #define NUM_DIES_IN_ASIC 4
  13. #define CORES_IN_DIE 48
  14. #define CORES_PER_ASIC (NUM_DIES_IN_ASIC * CORES_IN_DIE)
  15. #define MAX_BYTES_IN_SPI_XSFER 4096
  16. void *knc_trnsp_new(int dev_idx);
  17. void knc_trnsp_free(void *opaque_ctx);
  18. int knc_trnsp_transfer(void *opaque_ctx, uint8_t *txbuf, uint8_t *rxbuf, int len);
  19. bool knc_trnsp_asic_detect(void *opaque_ctx, int chip_id);
  20. void knc_trnsp_periodic_check(void *opaque_ctx);