diff options
author | Siddharth11235 | 2019-09-03 18:09:16 +0530 |
---|---|---|
committer | Siddharth11235 | 2019-09-03 18:09:16 +0530 |
commit | b4b6aa36e3486a3544acc52419149b5671f841e9 (patch) | |
tree | 66c1783158f23e6d21c77324156fc57e18d4ac67 /Modelica-Arduino-MDD_Arduino_Revised/Resources/Include/serial.h | |
parent | f5266f634f4fb4fd39933a83551a01cf446256b8 (diff) | |
download | OpenModelica_HIL-master.tar.gz OpenModelica_HIL-master.tar.bz2 OpenModelica_HIL-master.zip |
Diffstat (limited to 'Modelica-Arduino-MDD_Arduino_Revised/Resources/Include/serial.h')
-rwxr-xr-x | Modelica-Arduino-MDD_Arduino_Revised/Resources/Include/serial.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Modelica-Arduino-MDD_Arduino_Revised/Resources/Include/serial.h b/Modelica-Arduino-MDD_Arduino_Revised/Resources/Include/serial.h new file mode 100755 index 0000000..4588f04 --- /dev/null +++ b/Modelica-Arduino-MDD_Arduino_Revised/Resources/Include/serial.h @@ -0,0 +1,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); +*/ |