Add a simple warning if you're using OSX with a GreaseWeazle and select a
/dev/tty file rather than a /dev/cu one (the /dev/tty files usually don't work).
This commit is contained in:
parent
c88ff973b1
commit
78a070bd99
2 changed files with 5 additions and 1 deletions
|
|
@ -45,5 +45,4 @@ private:
|
|||
std::stringstream _stream;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -108,6 +108,11 @@
|
|||
typedef int FileHandle;
|
||||
static FileHandle open_serial_port(const std::string& name)
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
if (name.find("/dev/tty.") != std::string::npos)
|
||||
std::cerr << "Warning: you probably want to be using a /dev/cu.* device\n";
|
||||
#endif
|
||||
|
||||
int fd = open(name.c_str(), O_RDWR);
|
||||
if (fd == -1)
|
||||
Error() << fmt::format("cannot open GreaseWeazle serial port '{}': {}",
|
||||
|
|
|
|||
Loading…
Reference in a new issue