#include "support/configCosmos.h"
#include <termios.h>
#include <sys/ioctl.h>
Go to the source code of this file.
int arduino_init |
( |
char * |
port, |
|
|
int |
baud |
|
) |
| |
static string port
Definition: add_radio.cpp:16
int fd
Definition: arduino_lib.cpp:61
int arduino_setbaud(int baud)
Definition: arduino_lib.cpp:93
char serialport[256]
Definition: arduino_lib.cpp:58
char * arduino_setport(char *port)
Definition: arduino_lib.cpp:89
int baudrate
Definition: arduino_lib.cpp:60
int serialport_init(const char *serialport, int baud)
Definition: arduino_lib.cpp:150
int arduino_printstring |
( |
char * |
str | ) |
|
char buf[256]
Definition: arduino_lib.cpp:62
int fd
Definition: arduino_lib.cpp:61
int iretn
Definition: rw_test.cpp:37
const string & str
Definition: json11.cpp:360
int serialport_write(int fd, const char *str)
Definition: arduino_lib.cpp:119
int arduino_printnum |
( |
int |
num | ) |
|
int fd
Definition: arduino_lib.cpp:61
int iretn
Definition: rw_test.cpp:37
int serialport_writebyte(int fd, uint8_t b)
Definition: arduino_lib.cpp:111
int arduino_delay |
( |
int |
delay | ) |
|
86 COSMOS_USLEEP(
delay * 1000);
uint16_t delay
Definition: netperf_send.cpp:38
char* arduino_setport |
( |
char * |
port | ) |
|
static string port
Definition: add_radio.cpp:16
char serialport[256]
Definition: arduino_lib.cpp:58
int arduino_setbaud |
( |
int |
baud | ) |
|
int baudrate
Definition: arduino_lib.cpp:60
char* arduino_read |
( |
char * |
str | ) |
|
int fd
Definition: arduino_lib.cpp:61
int serialport_read_until(int fd, char *buf, char until)
Definition: arduino_lib.cpp:128
const string & str
Definition: json11.cpp:360
int arduino_closeport |
( |
| ) |
|
int fd
Definition: arduino_lib.cpp:61
int serialport_init |
( |
const char * |
serialport, |
|
|
int |
baud |
|
) |
| |
int fd
Definition: cssl_lib.h:38
char serialport[256]
Definition: arduino_lib.cpp:58
int32_t cssl_setflowcontrol(cssl_t *serial, int rtscts, int xonxoff)
Definition: cssl_lib.cpp:389
cssl_t * cssl_open(const char *fname, int baud, int bits, int parity, int stop)
Definition: cssl_lib.cpp:108
int32_t cssl_settimeout(cssl_t *serial, int, double timeout)
Set read timeout.
Definition: cssl_lib.cpp:469
cssl_t * serial
Definition: arduino_lib.cpp:63
int serialport_writebyte |
( |
int |
fd, |
|
|
uint8_t |
b |
|
) |
| |
113 int n = write(
fd,&
b,1);
int fd
Definition: arduino_lib.cpp:61
long b
Definition: jpegint.h:371
int serialport_write |
( |
int |
fd, |
|
|
const char * |
str |
|
) |
| |
121 int len = strlen(
str);
122 int n = write(
fd,
str, len);
int fd
Definition: arduino_lib.cpp:61
const string & str
Definition: json11.cpp:360
int serialport_read_until |
( |
int |
fd, |
|
|
char * |
buf, |
|
|
char |
until |
|
) |
| |
133 int n = read(
fd, b, 1);
134 if( n==-1)
return -1;
136 COSMOS_USLEEP( 10 * 1000 );
140 }
while( b[0] != until );
char buf[256]
Definition: arduino_lib.cpp:62
int fd
Definition: arduino_lib.cpp:61
int i
Definition: rw_test.cpp:37
long b
Definition: jpegint.h:371