hw_imperator.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Lowlevel hardware access for the
  3. * Razer Imperator mouse
  4. *
  5. * Important notice:
  6. * This hardware driver is based on reverse engineering, only.
  7. *
  8. * Copyright (C) 2012 Michael Buesch <m@bues.ch>
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License
  12. * as published by the Free Software Foundation; either version 2
  13. * of the License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. */
  20. #include "hw_imperator.h"
  21. #include "synapse.h"
  22. #include "razer_private.h"
  23. int razer_imperator_init(struct razer_mouse *m,
  24. struct libusb_device *usbdev)
  25. {
  26. int err;
  27. err = razer_synapse_init(m, NULL, 0);
  28. if (err)
  29. return err;
  30. razer_generic_usb_gen_idstr(usbdev, m->usb_ctx->h, "Imperator", 1,
  31. razer_synapse_get_serial(m), m->idstr);
  32. return 0;
  33. }
  34. void razer_imperator_release(struct razer_mouse *m)
  35. {
  36. razer_synapse_exit(m);
  37. }