Fix serial string for FreeBSD.

I am sure we don't have /dev/ttyUSB*, and since I use /dev/cuau0 with a
cross-over cable to connect 2 machines and have a serial console, I guess
"/dev/cuau" is the SERIAL_STRING that's expected to work for me.  A quick test
would be cool however, but I don't own a serial NFC device.
This commit is contained in:
Romain Tartiere 2010-07-31 10:13:18 +00:00
parent 0afaf656fa
commit 93494aad24

View file

@ -54,8 +54,15 @@
// MacOS // MacOS
// TODO: find UART connection string for PN53X device on Mac OS X // TODO: find UART connection string for PN53X device on Mac OS X
#define SERIAL_STRING "" #define SERIAL_STRING ""
#elif defined(__FreeBSD__)
// XXX: Not tested
#define SERIAL_STRING "/dev/cuau"
#else #else
// *BSD, Linux and others POSIX systems // Linux and maybe some operating systems
// FIXME: We'd rather have an #elif defined(__linux__) or something like
// that and an #else that triggers an error at compile time instead
// of "falling-back" on a value that is likely to not be suitable
// for most operating systems.
#define SERIAL_STRING "/dev/ttyUSB" #define SERIAL_STRING "/dev/ttyUSB"
#endif #endif
#endif #endif