diff options
| author | Tero Kontkanen <tero.kontkanen@granitedevices.fi> | 2017-02-23 00:57:24 +0200 |
|---|---|---|
| committer | Tero Kontkanen <tero.kontkanen@granitedevices.fi> | 2017-02-23 01:01:09 +0200 |
| commit | 8751d83576c4529607a02193585cff26e2e9f9ce (patch) | |
| tree | caa522f151681e58deaf3a710640dbc3a8aa55ac /pcserialport.h | |
| parent | 81a6bba3d855f77b7185b99f77250d8572127d75 (diff) | |
| parent | 77972a62d6d04b3a8b1ad2def67fef06a48b4da0 (diff) | |
| download | SimpleMotionV2-feature/BufferedMotionAPI.tar.gz SimpleMotionV2-feature/BufferedMotionAPI.zip | |
Merge branch 'develop' into feature/BufferedMotionAPIfeature/BufferedMotionAPI
# Conflicts:
# SimpleMotionV2.pri
Diffstat (limited to 'pcserialport.h')
| -rw-r--r-- | pcserialport.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/pcserialport.h b/pcserialport.h new file mode 100644 index 0000000..832786d --- /dev/null +++ b/pcserialport.h @@ -0,0 +1,40 @@ +/* + * pcserialport.h + * + * Header for PC serial port access library (win/linux) + * + * Created on: 28.12.2016 + * Author: Tero + * + * Inspired by RS232 library by Teunis van Beelen + */ + + +/* Todo: + -Restore port settings at CloseComport + */ + +#ifndef PCSERAILPORT_H +#define PCSERAILPORT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "simplemotion.h" + +//return port handle or -1 if fails +smint32 serialPortOpen(const char *port_device_name, smint32 baudrate_bps); +smint32 serialPortRead(smint32 serialport_handle, unsigned char *buf, smint32 size); +smint32 serialPortWriteByte(smint32 serialport_handle, unsigned char byte); +smint32 serialPortWriteBuffer(smint32 serialport_handle, unsigned char *buf, smint32 size); +void serialPortClose(smint32 serialport_number); + + +#ifdef __cplusplus +} +#endif + +#endif + + |
