libbitfury.h 739 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef __LIBBITFURY_H__
  2. #define __LIBBITFURY_H__
  3. #include "miner.h"
  4. extern int libbitfury_detectChips(void);
  5. struct bitfury_payload {
  6. unsigned char midstate[32];
  7. unsigned int junk[8];
  8. unsigned m7;
  9. unsigned ntime;
  10. unsigned nbits;
  11. unsigned nnonce;
  12. };
  13. struct bitfury_device {
  14. unsigned char osc[8];
  15. unsigned newbuf[17];
  16. unsigned oldbuf[17];
  17. struct work * work;
  18. struct work * owork;
  19. int job_switched;
  20. struct bitfury_payload payload;
  21. struct bitfury_payload opayload;
  22. unsigned int results[16];
  23. int results_n;
  24. };
  25. int libbitfury_readHashData(unsigned int *res);
  26. int libbitfury_sendHashData(struct bitfury_device *bf, int chip_n);
  27. void work_to_payload(struct bitfury_payload *p, struct work *w);
  28. #endif /* __LIBBITFURY_H__ */