Support for serialdump on MacOS X. Patch by Laurent Deru.
This commit is contained in:
parent
cc863e7bd4
commit
40595ad5c7
|
@ -62,7 +62,7 @@ else
|
|||
ifeq ($(HOST_OS),Darwin)
|
||||
ifndef MOTELIST
|
||||
USBDEVPREFIX=
|
||||
SERIALDUMP = $(CONTIKI)/tools/sky/serialdump-linux
|
||||
SERIALDUMP = $(CONTIKI)/tools/sky/serialdump-macos
|
||||
MOTELIST = $(CONTIKI)/tools/sky/motelist-macos
|
||||
TMOTE_BSL_FILE = tmote-bsl-linux
|
||||
TMOTE_BSL=$(if $(wildcard $(CONTIKI)/tools/sky/$(TMOTE_BSL_FILE)),1,0)
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <sys/time.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define BAUDRATE B57600
|
||||
#define BAUDRATE_S "57600"
|
||||
|
@ -159,7 +161,11 @@ int main(int argc, char **argv)
|
|||
}
|
||||
fprintf(stderr, "connecting to %s (%s)", device, speedname);
|
||||
|
||||
#ifndef __APPLE__
|
||||
fd = open(device, O_RDWR | O_NOCTTY | O_NDELAY | O_DIRECT | O_SYNC );
|
||||
#else
|
||||
fd = open(device, O_RDWR | O_NOCTTY | O_NDELAY | O_SYNC );
|
||||
#endif
|
||||
if (fd <0) {
|
||||
fprintf(stderr, "\n");
|
||||
perror(device);
|
||||
|
|
Loading…
Reference in a new issue