aboutsummaryrefslogtreecommitdiff
path: root/AT91SAM7S256/armdebug/FantomModule/FantomModule.h
diff options
context:
space:
mode:
authorTat-Chee Wan (USM)2011-03-03 08:16:30 +0800
committerTat-Chee Wan (USM)2011-03-03 08:16:30 +0800
commit50bc64f437716fe2b1dab980bb45f51a5240a47d (patch)
tree08025ef81be5bd458ce53d8ba2c44d3bbcbf415b /AT91SAM7S256/armdebug/FantomModule/FantomModule.h
parent9c12c3b7ded2c5c3a2d7f4a8c576a5877f7e23a0 (diff)
parent6a5e828fbc95843d065fdd53c0dc4076afccc56e (diff)
Merge branch 'master' of ssh://svc.cs.usm.my/~/gitrepo-bare/armdebug
Diffstat (limited to 'AT91SAM7S256/armdebug/FantomModule/FantomModule.h')
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/FantomModule.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/AT91SAM7S256/armdebug/FantomModule/FantomModule.h b/AT91SAM7S256/armdebug/FantomModule/FantomModule.h
index ff3a1de..e2d99cb 100644
--- a/AT91SAM7S256/armdebug/FantomModule/FantomModule.h
+++ b/AT91SAM7S256/armdebug/FantomModule/FantomModule.h
@@ -19,6 +19,7 @@
#define FANTOM_USB "USB"
#define FANTOM_BT_TIMEOUTSEC 5
#define FANTOM_NXTNAME_LEN 256
+#define FANTOM_PASSKEY_LEN 256
#define FANTOM_DATA_BUFLEN 256
#define FANTOM_NXT_PASSKEY "1234"
@@ -28,7 +29,7 @@
extern "C" PyMODINIT_FUNC initfantom(void);
extern "C" PyObject *fantom_finddevices(PyObject *py_self, PyObject *py_args); // BT Discovery function
-extern "C" PyObject *fantom_find_bricks(PyObject *py_self, PyObject *py_args); // BT & USB function
+extern "C" PyObject *fantom_find_bricks(PyObject *py_self, PyObject *py_args); // USB function
extern "C" PyObject *fantom_socket(PyObject *py_self, PyObject *py_args);
extern "C" PyObject *fantom_connect(PyObject *py_self, PyObject *py_args);
extern "C" PyObject *fantom_send(PyObject *py_self, PyObject *py_args);
@@ -38,16 +39,19 @@ extern "C" PyObject *fantom_close(PyObject *py_self, PyObject *py_args);
class FantomModule
{
nFANTOM100::iNXT* nxtPtr;
+ nFANTOM100::tStatus status;
+ ViBoolean useBT;
+ ViChar passkey[FANTOM_PASSKEY_LEN];
ViChar pairedResourceName[FANTOM_NXTNAME_LEN];
public:
static PyObject *finddevices(PyObject *py_self, PyObject *py_args);
static PyObject *find_bricks(PyObject *py_self, PyObject *py_args);
- PyObject *socket(PyObject *py_self, PyObject *py_args);
- PyObject *connect(PyObject *py_self, PyObject *py_args);
- PyObject *send(PyObject *py_self, PyObject *py_args);
- PyObject *recv(PyObject *py_self, PyObject *py_args);
- PyObject *close(PyObject *py_self, PyObject *py_args);
+ ViBoolean socket(ViBoolean enableBT, ViConstString BTkey);
+ ViBoolean connect(ViConstString resourceName);
+ ViUInt32 send(const ViByte *bufferPtr, ViUInt32 numberOfBytes);
+ ViUInt32 recv(ViByte *bufferPtr, ViUInt32 numberOfBytes);
+ ViBoolean close();
~FantomModule();
void HelloWorld(const char *);
};