Fix the port default for the RaspberryPi.
This commit is contained in:
parent
4e1dbe2bb6
commit
0173024bec
10
p1load.c
10
p1load.c
@ -16,7 +16,11 @@
|
|||||||
#if defined(CYGWIN) || defined(WIN32) || defined(MINGW)
|
#if defined(CYGWIN) || defined(WIN32) || defined(MINGW)
|
||||||
#define PORT_PREFIX ""
|
#define PORT_PREFIX ""
|
||||||
#elif defined(LINUX)
|
#elif defined(LINUX)
|
||||||
#define PORT_PREFIX "ttyUSB"
|
#ifdef RASPBERRY_PI
|
||||||
|
#define PORT_PREFIX "ttyAMA"
|
||||||
|
#else
|
||||||
|
#define PORT_PREFIX "ttyUSB"
|
||||||
|
#endif
|
||||||
#elif defined(MACOSX)
|
#elif defined(MACOSX)
|
||||||
#define PORT_PREFIX "cu.usbserial"
|
#define PORT_PREFIX "cu.usbserial"
|
||||||
#else
|
#else
|
||||||
@ -68,11 +72,7 @@ int main(int argc, char *argv[])
|
|||||||
/* initialize */
|
/* initialize */
|
||||||
baudRate = baudRate2 = BAUD_RATE;
|
baudRate = baudRate2 = BAUD_RATE;
|
||||||
verbose = terminalMode = pstMode = FALSE;
|
verbose = terminalMode = pstMode = FALSE;
|
||||||
#ifdef RASPBERRY_PI
|
|
||||||
port = "/dev/ttyAMA0";
|
|
||||||
#else
|
|
||||||
port = NULL;
|
port = NULL;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* initialize the loader */
|
/* initialize the loader */
|
||||||
PL_Init(&state, &serial, NULL);
|
PL_Init(&state, &serial, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user