driver-avalon.h 899 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * This program is free software; you can redistribute it and/or modify it
  3. * under the terms of the GNU General Public License as published by the Free
  4. * Software Foundation; either version 3 of the License, or (at your option)
  5. * any later version. See COPYING for more details.
  6. */
  7. #ifndef AVALON_H
  8. #define AVALON_H
  9. struct avalon_task {
  10. uint8_t reset :1;
  11. uint8_t flush_fifo :1;
  12. uint8_t fan_eft :1;
  13. uint8_t timer_eft :1;
  14. uint8_t chip_num :4;
  15. uint8_t fan_pwm_data;
  16. uint8_t timeout_data;
  17. uint8_t miner_num; // Word[0]
  18. uint8_t nonce_elf :1;
  19. uint32_t miner_ctrl :31;
  20. uint32_t pad0; //Word[2:1]
  21. uint32_t midstate[8];
  22. uint32_t data[3];
  23. // nonce_range: Word[??:14]
  24. } __attribute__((packed));
  25. struct avalon_result {
  26. uint32_t data[3];
  27. uint32_t midstate[8];
  28. uint32_t nonce;
  29. uint32_t reserved;
  30. } __attribute__((packed));
  31. #define AVALON_MINER_THREADS 1
  32. #endif /* AVALON_H */