ykush2.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*******************************************************************************
  2. Copyright 2017 Yepkit Lda (www.yepkit.com)
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. *******************************************************************************/
  13. #ifndef _YKUSH2_H_
  14. #define _YKUSH2_H_
  15. #include <yk_usb_device.h>
  16. //------------------------------------
  17. //CLASSES
  18. //------------------------------------
  19. class Ykush2 : public UsbDevice
  20. {
  21. public:
  22. Ykush2(unsigned int pid)
  23. : UsbDevice(0x04D8, pid)
  24. {
  25. }
  26. int get_port_status(char *serial, char port); //get downstream port status
  27. int port_up(char *serial, char port);
  28. int port_down(char *serial, char port);
  29. private:
  30. bool is_legacy;
  31. };
  32. //---------------------------------
  33. //FUNCTIONS
  34. //---------------------------------
  35. void ykush2_cmd_parser(int argc, char** argv);
  36. void ykush2_list_attached(void);
  37. #endif