gc3355.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Copyright 2014 Nate Woolls
  3. * Copyright 2014 GridSeed Team
  4. * Copyright 2014 Dualminer Team
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License as published by the Free
  8. * Software Foundation; either version 3 of the License, or (at your option)
  9. * any later version. See COPYING for more details.
  10. */
  11. #ifndef bfgminer_gc3355_h
  12. #define bfgminer_gc3355_h
  13. #include <stdbool.h>
  14. #include "miner.h"
  15. // options configurable by the end-user
  16. extern int opt_sha2_units;
  17. // GridSeed common code begins here
  18. #define GC3355_COMMAND_DELAY_MS 20
  19. #define SCRYPT_UNIT_OPEN 0
  20. #define SCRYPT_UNIT_CLOSE 1
  21. extern
  22. int opt_pll_freq;
  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. void gc3355_reset_dtr(int fd);
  30. extern
  31. void gc3355_opt_scrypt_only_init(int fd);
  32. extern
  33. void gc3355_dualminer_init(int fd);
  34. extern
  35. void gc3355_scrypt_only_reset(int fd);
  36. extern
  37. void gc3355_init(int fd, int sha2_units, bool is_scrypt_only);
  38. extern void gc3355_scrypt_prepare_work(unsigned char cmd[156], struct work *);
  39. extern void gc3355_sha2_prepare_work(unsigned char cmd[52], struct work *, bool simple);
  40. #define gc3355_get_cts_status(fd) ((get_serial_cts(fd) == BGV_LOW) ? 1 : 0)
  41. #endif