Fix the port default for the RaspberryPi.

This commit is contained in:
David Betz 2015-01-27 19:55:31 -05:00
parent 4e1dbe2bb6
commit 0173024bec
1 changed files with 5 additions and 5 deletions

View File

@ -16,7 +16,11 @@
#if defined(CYGWIN) || defined(WIN32) || defined(MINGW)
#define PORT_PREFIX ""
#elif defined(LINUX)
#define PORT_PREFIX "ttyUSB"
#ifdef RASPBERRY_PI
#define PORT_PREFIX "ttyAMA"
#else
#define PORT_PREFIX "ttyUSB"
#endif
#elif defined(MACOSX)
#define PORT_PREFIX "cu.usbserial"
#else
@ -68,11 +72,7 @@ int main(int argc, char *argv[])
/* initialize */
baudRate = baudRate2 = BAUD_RATE;
verbose = terminalMode = pstMode = FALSE;
#ifdef RASPBERRY_PI
port = "/dev/ttyAMA0";
#else
port = NULL;
#endif
/* initialize the loader */
PL_Init(&state, &serial, NULL);