gc3355.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. #define SCRYPT_UNIT_OPEN 0
  14. #define SCRYPT_UNIT_CLOSE 1
  15. extern
  16. char *opt_dualminer_sha2_gating;
  17. extern
  18. int opt_pll_freq;
  19. //once this is made an option, needs to be >= 0 and <= 160
  20. //already enforced in gc3355 but no stdout yet
  21. extern
  22. int opt_sha2_number;
  23. //mining both Scrypt & SHA2 at the same time with two processes
  24. //SHA2 process must be run first, no arg requirements, first serial port will be used
  25. //Scrypt process must be launched after, --scrypt and --dual-mode args required
  26. extern
  27. bool opt_dual_mode;
  28. extern
  29. bool opt_hubfans;
  30. extern
  31. void gc3355_dual_reset(int fd);
  32. extern
  33. void gc3355_opt_scrypt_only_init(int fd);
  34. extern
  35. void gc3355_dualminer_init(int fd);
  36. extern
  37. void gc3355_opt_scrypt_init(int fd);
  38. extern
  39. void gc3355_init(int fd, char *sha2_unit, bool is_scrypt_only);
  40. extern
  41. void gc3355_open_sha2_unit(int fd, char *opt_sha2_gating);
  42. extern
  43. void gc3355_open_scrypt_unit(int fd, int status);
  44. #define gc3355_get_cts_status(fd) ((get_serial_cts(fd) == BGV_LOW) ? 1 : 0)
  45. #endif