Don't include _Linux files in MacOS build, add support for _MacOS files
This commit is contained in:
parent
698ae9debc
commit
d834b18a16
7 changed files with 295 additions and 20 deletions
35
serial_port/find_usb_serial_port_macos.cpp
Normal file
35
serial_port/find_usb_serial_port_macos.cpp
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
/*---------------------------------------------------------*\
|
||||
| find_usb_serial_port_macos.cpp |
|
||||
| |
|
||||
| Finds the serial port path(s) of USB serial port devices|
|
||||
| given the USB VID and PID of the device |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "find_usb_serial_port.h"
|
||||
|
||||
/*---------------------------------------------------------------------*\
|
||||
| |
|
||||
| find_usb_serial_port |
|
||||
| |
|
||||
| This function returns the name of the first USB serial port matching|
|
||||
| the given USB product and vendor ID. |
|
||||
| |
|
||||
| vid: Vendor ID code |
|
||||
| pid: Product ID code |
|
||||
| |
|
||||
| returns: std::string containing port name "COMx" or "/dev/ttyX" |
|
||||
| |
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
std::vector<std::string *> find_usb_serial_port(unsigned short /*vid*/, unsigned short /*pid*/)
|
||||
{
|
||||
std::vector<std::string *> ret_vector;
|
||||
|
||||
/*-----------------------------------------------------------------*\
|
||||
| TODO: Implement for MacOS |
|
||||
\*-----------------------------------------------------------------*/
|
||||
return(ret_vector);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue