libbitfury.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright 2014 Con Kolivas
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms of the GNU General Public License as published by the Free
  6. * Software Foundation; either version 3 of the License, or (at your option)
  7. * any later version. See COPYING for more details.
  8. */
  9. #ifndef LIBBITFURY_H
  10. #define LIBBITFURY_H
  11. #include "miner.h"
  12. #include "driver-bitfury.h"
  13. void ms3steps(uint32_t *p);
  14. uint32_t decnonce(uint32_t in);
  15. void bitfury_work_to_payload(struct bitfury_payload *p, struct work *work);
  16. void spi_config_reg(struct bitfury_info *info, int cfgreg, int ena);
  17. void spi_set_freq(struct bitfury_info *info);
  18. void spi_send_conf(struct bitfury_info *info);
  19. void spi_send_init(struct bitfury_info *info);
  20. void spi_clear_buf(struct bitfury_info *info);
  21. void spi_add_buf(struct bitfury_info *info, const void *buf, const int sz);
  22. void spi_add_break(struct bitfury_info *info);
  23. void spi_add_fasync(struct bitfury_info *info, int n);
  24. void spi_add_data(struct bitfury_info *info, uint16_t addr, const void *buf, int len);
  25. bool spi_reset(struct cgpu_info *bitfury, struct bitfury_info *info);
  26. bool mcp_spi_txrx(struct cgpu_info *bitfury, struct bitfury_info *info);
  27. bool ftdi_spi_txrx(struct cgpu_info *bitfury, struct bitfury_info *info);
  28. bool bitfury_checkresults(struct thr_info *thr, struct work *work, uint32_t nonce);
  29. bool libbitfury_sendHashData(struct thr_info *thr, struct cgpu_info *bitfury,
  30. struct bitfury_info *info, int chip_n);
  31. #endif /* LIBBITFURY_H */