author | korovkin <korovkin> | 2006-04-14 19:22:37 (UTC) |
---|---|---|
committer | korovkin <korovkin> | 2006-04-14 19:22:37 (UTC) |
commit | a1bcbe41d45924713c4ead9b25ac5518473c9ca9 (patch) (side-by-side diff) | |
tree | 3683eb401dd2d7cde4a7af15e72ecf7463b7208e /noncore/net/opietooth/lib/bt-serial.h | |
parent | bca53498f37ade8101611fecde82202e9ee1a55c (diff) | |
download | opie-a1bcbe41d45924713c4ead9b25ac5518473c9ca9.zip opie-a1bcbe41d45924713c4ead9b25ac5518473c9ca9.tar.gz opie-a1bcbe41d45924713c4ead9b25ac5518473c9ca9.tar.bz2 |
Added RFCOMM <-> serial line forwarding functionality.
Diffstat (limited to 'noncore/net/opietooth/lib/bt-serial.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/lib/bt-serial.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/noncore/net/opietooth/lib/bt-serial.h b/noncore/net/opietooth/lib/bt-serial.h new file mode 100644 index 0000000..737e2a0 --- a/dev/null +++ b/noncore/net/opietooth/lib/bt-serial.h @@ -0,0 +1,57 @@ +/* $Id$ + * Bluetooth serial forwarder functions declaration + * + * (c) Copyright 2006 GPL + * + * This software is provided under the GNU public license, incorporated + * herein by reference. The software is provided without warranty or + * support. + */ +#ifndef _BT_SERIAL_H_ +#define _BT_SERIAL_H_ +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct //bt-serial connection handler +{ + int bt_handler; //Bluetooth connection handler + int ser_handler; //serial port handler +} BTSerialConn; + +/* + * bt_serialStart + * Function starts bt-serial service + * return 0 success -1 on error + */ +int bt_serialStart(void); + +/* + * bt_serialForward + * Function forwards data received from bt-connection to serial and backward + * conn - connection handler + * portName - name of the port to connect + * return 0 success -1 on error + */ +int bt_serialForward(BTSerialConn* conn, const char* portName); + +/* + * bt_serialStop + * Function stops bt-serial service + * return device handler on success -1 on error + */ +int bt_serialStop(void); + +/* + * Function opens and configures serial port + * portName - name of the serial port + * return 0 on success, -1 on error + */ +int openSerial(const char* portName); + +#ifdef __cplusplus +} +#endif + +#endif +//eof |