gc3355.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * Copyright 2014 Nate Woolls
  3. * Copyright 2014 Dualminer Team
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of the GNU General Public License as published by the Free
  7. * Software Foundation; either version 3 of the License, or (at your option)
  8. * any later version. See COPYING for more details.
  9. */
  10. #ifndef bfgminer_gc3355_h
  11. #define bfgminer_gc3355_h
  12. #include <stdbool.h>
  13. #include "miner.h"
  14. #define SCRYPT_UNIT_OPEN 0
  15. #define SCRYPT_UNIT_CLOSE 1
  16. extern
  17. char *opt_dualminer_sha2_gating;
  18. extern
  19. int opt_pll_freq;
  20. //once this is made an option, needs to be >= 0 and <= 160
  21. //already enforced in gc3355 but no stdout yet
  22. extern
  23. int opt_sha2_number;
  24. //mining both Scrypt & SHA2 at the same time with two processes
  25. //SHA2 process must be run first, no arg requirements, first serial port will be used
  26. //Scrypt process must be launched after, --scrypt and --dual-mode args required
  27. extern
  28. bool opt_dual_mode;
  29. extern
  30. void gc3355_reset_dtr(int fd);
  31. extern
  32. void gc3355_opt_scrypt_only_init(int fd);
  33. extern
  34. void gc3355_dualminer_init(int fd);
  35. extern
  36. void gc3355_scrypt_only_reset(int fd);
  37. extern
  38. void gc3355_init(int fd, char *sha2_unit, bool is_scrypt_only);
  39. extern
  40. void gc3355_open_sha2_unit(int fd, char *opt_sha2_gating);
  41. extern
  42. void gc3355_open_scrypt_unit(int fd, int status);
  43. extern void gc3355_scrypt_prepare_work(unsigned char cmd[156], struct work *);
  44. extern void gc3355_sha2_prepare_work(unsigned char cmd[52], struct work *, bool simple);
  45. #define gc3355_get_cts_status(fd) ((get_serial_cts(fd) == BGV_LOW) ? 1 : 0)
  46. #endif