COSMOS core  1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
arduino_lib.h
Go to the documentation of this file.
1 /********************************************************************
2 * Copyright (C) 2015 by Interstel Technologies, Inc.
3 * and Hawaii Space Flight Laboratory.
4 *
5 * This file is part of the COSMOS/core that is the central
6 * module for COSMOS. For more information on COSMOS go to
7 * <http://cosmos-project.com>
8 *
9 * The COSMOS/core software is licenced under the
10 * GNU Lesser General Public License (LGPL) version 3 licence.
11 *
12 * You should have received a copy of the
13 * GNU Lesser General Public License
14 * If not, go to <http://www.gnu.org/licenses/>
15 *
16 * COSMOS/core is free software: you can redistribute it and/or
17 * modify it under the terms of the GNU Lesser General Public License
18 * as published by the Free Software Foundation, either version 3 of
19 * the License, or (at your option) any later version.
20 *
21 * COSMOS/core is distributed in the hope that it will be useful, but
22 * WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 * Lesser General Public License for more details.
25 *
26 * Refer to the "licences" folder for further information on the
27 * condititons and terms to use this software.
28 ********************************************************************/
29 
30 #include "support/configCosmos.h"
31 
32 //#include <stdio.h> /* Standard input/output definitions */
33 //#include <stdlib.h>
34 //#include <stdint.h> /* Standard types */
35 //#include <cstring> /* String function definitions */
37 //#include <fcntl.h> /* File control definitions */
38 //#include <errno.h> /* Error number definitions */
39 #ifndef COSMOS_WIN_OS
40 #include <termios.h> /* POSIX terminal control definitions */
41 #include <sys/ioctl.h>
42 #endif
43 //#include <getopt.h>
44 
45 int arduino_init(char* port, int baud);
46 int arduino_printstring(char* str);
47 int arduino_printnum(int num);
48 int arduino_delay(int delay);
49 char* arduino_setport(char* port);
50 int arduino_setbaud(int baud);
51 char* arduino_read(char* str);
52 int arduino_closeport();
53 int serialport_init(const char* serialport, int baud);
54 int serialport_writebyte(int fd, uint8_t b);
55 int serialport_write(int fd, const char* str);
56 int serialport_read_until(int fd, char* buf, char until);
57 
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
int arduino_init(char *port, int baud)
Definition: arduino_lib.cpp:65
int arduino_printnum(int num)
Definition: arduino_lib.cpp:79
uint16_t delay
Definition: netperf_send.cpp:38
char * arduino_read(char *str)
Definition: arduino_lib.cpp:97
long b
Definition: jpegint.h:371
const string & str
Definition: json11.cpp:360
int serialport_init(const char *serialport, int baud)
Definition: arduino_lib.cpp:150
int serialport_write(int fd, const char *str)
Definition: arduino_lib.cpp:119
char serialport[256]
Definition: arduino_lib.cpp:58
int serialport_writebyte(int fd, uint8_t b)
Definition: arduino_lib.cpp:111
Headers and definitions common to all COSMOS.
int arduino_delay(int delay)
Definition: arduino_lib.cpp:85
int arduino_printstring(char *str)
Definition: arduino_lib.cpp:72
char * arduino_setport(char *port)
Definition: arduino_lib.cpp:89
int serialport_read_until(int fd, char *buf, char until)
Definition: arduino_lib.cpp:128
char buf[128]
Definition: rw_test.cpp:40
int arduino_closeport()
Definition: arduino_lib.cpp:104