summaryrefslogtreecommitdiff
path: root/Modelica-Arduino-MDD_Arduino_Revised/Resources/Include/serial.h
blob: 4588f0434ba6d4de9e186fa7762b0d10d2283c82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <errno.h>
#include <termios.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h> /* memset */
#include <stdio.h>
#include <signal.h>

int set_interface_attribs (int fd, int speed, int parity);
void set_blocking (int b, int should_block);
int open_serial(int handle,int port, int baudrate);
int close_serial(int handle);
int write_serial(int handle, char str[],int size);
int status_serial(int handle,int nb[]);
int read_serial(int handle,char* buf,int size);
//int read_serial(int *handle,char buf[],int *size);

void delay(long int t);
void interrupt();



/*int set_interface_attribs (int fd, int speed, int parity);
void set_blocking (int b, int should_block);
void open_serial(int *handle,int *port, int *baudrate, int *OK);
void close_serial(int *handle, int *OK);
void write_serial(int *handle, char str[],int *size, int *OK);
void status_serial(int *handle, int *OK,int *nbread, int *nbwrite);
void read_serial(int *handle,char buf[],int *size);
*/