aboutsummaryrefslogtreecommitdiff
path: root/AT91SAM7S256/armdebug/FantomModule
diff options
context:
space:
mode:
Diffstat (limited to 'AT91SAM7S256/armdebug/FantomModule')
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/FantomModule.cpp305
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/FantomModule.h60
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/FantomModule.xcodeproj/project.pbxproj295
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/FantomModulePriv.h19
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/FantomModuleProj.xcconfig6
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/FantomModuleTarget.xcconfig11
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/FantomModule_Prefix.pch6
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/fantom/iFile.h280
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/fantom/iFileIterator.h133
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/fantom/iModule.h154
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/fantom/iModuleIterator.h123
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/fantom/iNXT.h666
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/fantom/iNXTIterator.h120
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/fantom/platform.h94
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/fantom/tStatus.h458
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/advanceFileIterator.vibin0 -> 52507 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/advanceModuleIterator.vibin0 -> 49641 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/advanceNXTIterator.vibin0 -> 49658 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/bluetoothFactoryReset.vibin0 -> 44169 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/bootSamba.vibin0 -> 30013 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/closeFile.vibin0 -> 42973 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/createFile.vibin0 -> 53398 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/createFileIterator.vibin0 -> 59566 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/createModule.vibin0 -> 60580 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/createModuleIterator.vibin0 -> 59588 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/createNXT.vibin0 -> 77937 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/createNXTIterator.vibin0 -> 61697 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/destroyFile.vibin0 -> 44491 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/destroyFileIterator.vibin0 -> 44715 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/destroyModule.vibin0 -> 44733 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/destroyModuleIterator.vibin0 -> 44657 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/destroyNXT.vibin0 -> 54226 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/destroyNXTIterator.vibin0 -> 44090 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/downloadFirmware.vibin0 -> 51788 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/eraseUserFlash.vibin0 -> 53218 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/findDeviceInFirmwareDownloadMode.vibin0 -> 33424 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/findNXT.vibin0 -> 57487 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getAvailableSize.vibin0 -> 46052 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getDeviceInfo.vibin0 -> 77397 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getFile.vibin0 -> 46879 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getFileName.vibin0 -> 57503 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getFileSize.vibin0 -> 49827 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getFileSizeFromIterator.vibin0 -> 46119 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getFilenameFromIterator.vibin0 -> 50359 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getFirmwareVersion.vibin0 -> 54438 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getIOMapSize.vibin0 -> 47320 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getModule.vibin0 -> 45677 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getModuleID.vibin0 -> 47455 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getModuleName.vibin0 -> 51125 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getModuleNameFromIterator.vibin0 -> 50373 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getModuleSize.vibin0 -> 47365 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getNXTFromIterator.vibin0 -> 45554 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getResourceString.vibin0 -> 50629 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getStringFromNXTIterator.vibin0 -> 50832 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/isPaired.vibin0 -> 33180 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/nakedRead.vibin0 -> 56833 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/nakedWrite.vibin0 -> 53942 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/nxt.ctlbin0 -> 12924 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/openForRead.vibin0 -> 46847 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/openForWrite.vibin0 -> 61344 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/pairBluetooth.vibin0 -> 37997 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/pollAvailableLength.vibin0 -> 48927 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/read.vibin0 -> 57324 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/readBufferData.vibin0 -> 60250 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/readIOMap.vibin0 -> 56653 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/remove.vibin0 -> 46762 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/sendDirectCommand.vibin0 -> 62289 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/setNXTName.vibin0 -> 46126 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/unpairBluetooth.vibin0 -> 28927 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/write.vibin0 -> 53525 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/writeIOMap.vibin0 -> 54282 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/advanceFileIterator.vibin0 -> 50807 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/advanceModuleIterator.vibin0 -> 47697 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/advanceNXTIterator.vibin0 -> 47430 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/bluetoothFactoryReset.vibin0 -> 42289 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/bootSamba.vibin0 -> 28245 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/closeFile.vibin0 -> 41293 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/createFile.vibin0 -> 51566 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/createFileIterator.vibin0 -> 57766 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/createModule.vibin0 -> 58556 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/createModuleIterator.vibin0 -> 57524 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/createNXT.vibin0 -> 75773 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/createNXTIterator.vibin0 -> 59605 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/destroyFile.vibin0 -> 42775 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/destroyFileIterator.vibin0 -> 43063 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/destroyModule.vibin0 -> 43017 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/destroyModuleIterator.vibin0 -> 42989 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/destroyNXT.vibin0 -> 52394 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/destroyNXTIterator.vibin0 -> 42110 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/downloadFirmware.vibin0 -> 49704 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/eraseUserFlash.vibin0 -> 50750 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/findDeviceInFirmwareDownloadMode.vibin0 -> 31524 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/findNXT.vibin0 -> 55779 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getAvailableSize.vibin0 -> 43996 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getDeviceInfo.vibin0 -> 73869 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getFile.vibin0 -> 45059 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getFileName.vibin0 -> 55387 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getFileSize.vibin0 -> 47899 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getFileSizeFromIterator.vibin0 -> 44047 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getFilenameFromIterator.vibin0 -> 48447 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getFirmwareVersion.vibin0 -> 52298 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getIOMapSize.vibin0 -> 45256 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getModule.vibin0 -> 43873 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getModuleID.vibin0 -> 45675 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getModuleName.vibin0 -> 49113 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getModuleNameFromIterator.vibin0 -> 48477 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getModuleSize.vibin0 -> 45533 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getNXTFromIterator.vibin0 -> 43762 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getResourceString.vibin0 -> 48689 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getStringFromNXTIterator.vibin0 -> 48664 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/isPaired.vibin0 -> 31428 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/nakedRead.vibin0 -> 55097 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/nakedWrite.vibin0 -> 51866 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/nxt.ctlbin0 -> 12692 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/openForRead.vibin0 -> 44755 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/openForWrite.vibin0 -> 58108 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/pairBluetooth.vibin0 -> 35997 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/pollAvailableLength.vibin0 -> 46951 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/read.vibin0 -> 55444 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/readBufferData.vibin0 -> 58354 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/readIOMap.vibin0 -> 54409 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/remove.vibin0 -> 45010 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/sendDirectCommand.vibin0 -> 60249 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/setNXTName.vibin0 -> 44182 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/unpairBluetooth.vibin0 -> 27139 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/write.vibin0 -> 51589 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/include/labview/win32/writeIOMap.vibin0 -> 52014 bytes
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/pyfantom/__init__.py0
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/setup.py40
-rw-r--r--AT91SAM7S256/armdebug/FantomModule/visatype.h155
130 files changed, 2925 insertions, 0 deletions
diff --git a/AT91SAM7S256/armdebug/FantomModule/FantomModule.cpp b/AT91SAM7S256/armdebug/FantomModule/FantomModule.cpp
new file mode 100644
index 0000000..b3380f1
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/FantomModule.cpp
@@ -0,0 +1,305 @@
+/*
+ * FantomModule.cp
+ * FantomModule
+ *
+ * Created by tcmac on 01/03/2011.
+ * Copyright 2011 TC Wan. All rights reserved.
+ *
+ * Based on code from Fantom Driver 1.0.2f0 Example
+ * Copyright 2006, National Instruments Corporation.
+ * All rights reserved. Originated: 10 March 2006
+ *
+ */
+
+#include <iostream>
+#include <string.h>
+#include "FantomModule.h"
+#include "FantomModulePriv.h"
+
+static PyMethodDef FantomMethods[] = {
+ {"finddevices", fantom_finddevices, METH_VARARGS,
+ "Discover NXT Devices (BT Discovery)"},
+ {"find_bricks", fantom_find_bricks, METH_VARARGS,
+ "Find and Create NXT Devices (USB)"},
+ {"socket", fantom_socket, METH_VARARGS,
+ "Create a Socket for a NXT Brick"},
+ {"connect", fantom_connect, METH_VARARGS,
+ "Connect the Socket to a NXT Brick"},
+ {"send", fantom_send, METH_VARARGS,
+ "Send Data via the Socket to a NXT Brick"},
+ {"recv", fantom_recv, METH_VARARGS,
+ "Receive Data via the Socket from a NXT Brick"},
+ {"close", fantom_close, METH_VARARGS,
+ "Close the Socket to a NXT Brick"},
+ {NULL, NULL, 0, NULL} /* Sentinel */
+};
+
+extern "C" PyMODINIT_FUNC
+initfantom(void)
+{
+ (void) Py_InitModule("fantom", FantomMethods);
+}
+
+extern "C" PyObject *fantom_finddevices(PyObject *py_self, PyObject *py_args)
+{
+
+ PyObject *list = FantomModule::finddevices(py_self,py_args);
+
+ return list; // of resource names
+}
+
+extern "C" PyObject *fantom_find_bricks(PyObject *py_self, PyObject *py_args)
+{
+
+ PyObject *list = FantomModule::find_bricks(py_self,py_args);
+
+ return list; // of FantomModule objects
+}
+
+extern "C" PyObject *fantom_socket(PyObject *py_self, PyObject *py_args)
+{
+
+ ViChar newPasskey[FANTOM_PASSKEY_LEN] = FANTOM_NXT_PASSKEY; // Default Passkey
+
+ // FIXME: Retrieve PyObject's proto setting
+ const char *proto;
+ if (!PyArg_ParseTuple(py_args, "s", &proto))
+ return NULL;
+ ViBoolean enableBT = strcmp(proto, FANTOM_BT) ? true : false;
+
+ // Get new passkey from Python args if specified
+
+ // Create a FantomModule object, which has not been connected to an actual NXT yet
+ FantomModule *fantomObject;
+ fantomObject = new FantomModule;
+
+ fantomObject->socket(enableBT, newPasskey); // Internal object setup
+
+ // FIXME: Convert fantomObject to PyObject and return.
+
+}
+
+extern "C" PyObject *fantom_connect(PyObject *py_self, PyObject *py_args)
+{
+ FantomModule *fantomObject;
+ // FIXME: Retrieve FantomObject from PyObject variable
+ ViChar resourceName[FANTOM_NXTNAME_LEN];
+ ViBoolean success;
+
+ success = fantomObject->connect(resourceName);
+}
+
+extern "C" PyObject *fantom_send(PyObject *py_self, PyObject *py_args)
+{
+ FantomModule *fantomObject;
+ // FIXME: Retrieve FantomObject from PyObject variable
+
+ ViByte bufferPtr[FANTOM_DATA_BUFLEN];
+ ViUInt32 numberOfBytes;
+ ViUInt32 bytesSent;
+
+ bytesSent = fantomObject->send(bufferPtr,numberOfBytes);
+}
+
+extern "C" PyObject *fantom_recv(PyObject *py_self, PyObject *py_args)
+{
+ FantomModule *fantomObject;
+ // FIXME: Retrieve FantomObject from PyObject variable
+
+ ViByte bufferPtr[FANTOM_DATA_BUFLEN];
+ ViUInt32 numberOfBytes;
+ ViUInt32 bytesReceived;
+
+ bytesReceived = fantomObject->recv(bufferPtr,numberOfBytes);
+}
+
+extern "C" PyObject *fantom_close(PyObject *py_self, PyObject *py_args)
+{
+ FantomModule *fantomObject;
+ // FIXME: Retrieve FantomObject from PyObject variable
+
+ ViBoolean success = fantomObject->close();
+ delete fantomObject;
+
+ // Return success/failure
+}
+
+
+// Static method called directly from C
+PyObject *FantomModule::finddevices(PyObject *py_self, PyObject *py_args)
+{
+ const char *proto;
+ if (!PyArg_ParseTuple(py_args, "s", &proto))
+ return NULL;
+
+ ViBoolean useBT = strcmp(proto, FANTOM_BT) ? true : false;
+
+ PyObject *list = NULL;
+
+ nFANTOM100::iNXTIterator* nxtIteratorPtr;
+ nFANTOM100::tStatus status;
+
+ // Create an NXT iterator object which is used to find all accessible NXT devices.
+ nxtIteratorPtr = nFANTOM100::iNXT::createNXTIterator(useBT, (useBT ? FANTOM_BT_TIMEOUTSEC : 0), status);
+
+ // Creating the NXT iterator object could fail, better check status before dereferencing a
+ // potentially NULL pointer.
+ while (status.isNotFatal())
+ {
+ ViChar nxtName[FANTOM_NXTNAME_LEN];
+ nxtIteratorPtr->getName(nxtName, status);
+
+ std::cout << "Found: " << nxtName << std::endl;
+
+ if (status.isNotFatal())
+ {
+ // Split nxtName into NXT ID (h) and NXT Name (n)
+ // return as [(h,n),...]
+ // FIXME: Append to Python list
+ /*
+ return Py_BuildValue("i", sts);
+ */
+ }
+ nxtIteratorPtr->advance(status);
+
+ }
+ // Destroy the NXT iterator object which we no longer need
+ nFANTOM100::iNXT::destroyNXTIterator( nxtIteratorPtr );
+ return list;
+
+}
+
+// Static method called directly from C
+PyObject *FantomModule::find_bricks(PyObject *py_self, PyObject *py_args)
+{
+ const char *host, *name;
+ if (!PyArg_ParseTuple(py_args, "ss", &host, &name))
+ return NULL;
+
+ ViBoolean useBT = false;
+
+ PyObject *list = NULL;
+
+
+ nFANTOM100::iNXTIterator* nxtIteratorPtr;
+ nFANTOM100::tStatus status;
+
+ // Create an NXT iterator object which is used to find all accessible NXT devices.
+ nxtIteratorPtr = nFANTOM100::iNXT::createNXTIterator(useBT, (useBT ? FANTOM_BT_TIMEOUTSEC : 0), status);
+
+ // Creating the NXT iterator object could fail, better check status before dereferencing a
+ // potentially NULL pointer.
+ while (status.isNotFatal())
+ {
+ ViChar nxtName[FANTOM_NXTNAME_LEN];
+ nFANTOM100::iNXT* aNXT = NULL;
+
+ nxtIteratorPtr->getName(nxtName, status);
+ std::cout << "Found: " << nxtName << std::endl;
+ aNXT = nxtIteratorPtr->getNXT(status);
+ if (status.isNotFatal())
+ {
+ FantomModule *aFantomObject = new FantomModule;
+ aFantomObject->nxtPtr = aNXT;
+ aFantomObject->status.assign(status);
+ if (strlcpy(aFantomObject->pairedResourceName, nxtName, FANTOM_NXTNAME_LEN) >= FANTOM_NXTNAME_LEN)
+ {
+ // Exceeded Name Length
+ std::cout << "NXTName Length Exceeded: " << nxtName << std::endl;
+ delete aFantomObject;
+ }
+ else
+ {
+ // FIXME: Append to Python list
+ /*
+ return Py_BuildValue("i", sts);
+ */
+ }
+
+ }
+ nxtIteratorPtr->advance(status);
+
+ }
+ // Destroy the NXT iterator object which we no longer need
+ nFANTOM100::iNXT::destroyNXTIterator( nxtIteratorPtr );
+ return list;
+
+}
+
+ViBoolean FantomModule::socket(ViBoolean enableBT, ViConstString BTkey)
+{
+ // Internal class object setup
+ nxtPtr = NULL;
+ useBT = enableBT;
+ if (strlcpy(passkey, BTkey, FANTOM_PASSKEY_LEN) >= FANTOM_PASSKEY_LEN)
+ return false;
+ return true;
+
+}
+
+ViBoolean FantomModule::connect(ViConstString resourceName)
+{
+ // If a NXT is found over BT, the computer and the NXT must be paired before an NXT object can be
+ // created. This can be done programatically using the iNXT::pairBluetooth method.
+ // FIXME: Retrieve resource String
+
+
+ if (useBT and !nFANTOM100::iNXT::isPaired((ViConstString)resourceName,status))
+ nFANTOM100::iNXT::pairBluetooth((ViConstString) resourceName, (ViConstString) passkey, (ViChar *) pairedResourceName, status);
+
+ if (status.isNotFatal())
+ {
+ nxtPtr = nFANTOM100::iNXT::createNXT((ViConstString) resourceName, status, false);
+ }
+}
+
+ViUInt32 FantomModule::send(const ViByte *bufferPtr, ViUInt32 numberOfBytes)
+{
+ nFANTOM100::tStatus status;
+
+ return nxtPtr->write(bufferPtr, numberOfBytes, status);
+}
+
+ViUInt32 FantomModule::recv(ViByte *bufferPtr, ViUInt32 numberOfBytes)
+{
+ nFANTOM100::tStatus status;
+
+ return nxtPtr->read(bufferPtr, numberOfBytes, status);
+}
+
+ViBoolean FantomModule::close()
+{
+
+ const char *proto;
+ useBT = strcmp(proto, FANTOM_BT) ? true : false;
+ if (useBT and nFANTOM100::iNXT::isPaired((ViConstString)pairedResourceName,status))
+ nFANTOM100::iNXT::unpairBluetooth((ViConstString) pairedResourceName, status); // No Effect on Mac OSX
+
+ if (nxtPtr)
+ nFANTOM100::iNXT::destroyNXT(nxtPtr);
+ nxtPtr = NULL;
+
+ return true;
+}
+
+FantomModule::~FantomModule()
+{
+ if (nxtPtr)
+ nFANTOM100::iNXT::destroyNXT(nxtPtr);
+ nxtPtr = NULL;
+
+}
+
+// Skeleton functions from Xcode
+void FantomModule::HelloWorld(const char * s)
+{
+ FantomModulePriv *theObj = new FantomModulePriv;
+ theObj->HelloWorldPriv(s);
+ delete theObj;
+};
+
+void FantomModulePriv::HelloWorldPriv(const char * s)
+{
+ std::cout << s << std::endl;
+};
+
diff --git a/AT91SAM7S256/armdebug/FantomModule/FantomModule.h b/AT91SAM7S256/armdebug/FantomModule/FantomModule.h
new file mode 100644
index 0000000..e2d99cb
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/FantomModule.h
@@ -0,0 +1,60 @@
+/*
+ * FantomModule.h
+ * FantomModule
+ *
+ * Created by tcmac on 01/03/2011.
+ * Copyright 2011 __MyCompanyName__. All rights reserved.
+ *
+ */
+
+#ifndef FantomModule_
+#define FantomModule_
+
+#include "Python.h"
+#include "fantom/iNXT.h"
+#include "fantom/iNXTIterator.h"
+#include "fantom/tStatus.h"
+
+#define FANTOM_BT "BT"
+#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"
+
+/* The classes below are exported */
+#pragma GCC visibility push(default)
+
+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); // 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);
+extern "C" PyObject *fantom_recv(PyObject *py_self, PyObject *py_args);
+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);
+ 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 *);
+};
+
+#pragma GCC visibility pop
+#endif
diff --git a/AT91SAM7S256/armdebug/FantomModule/FantomModule.xcodeproj/project.pbxproj b/AT91SAM7S256/armdebug/FantomModule/FantomModule.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..f4a5ec8
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/FantomModule.xcodeproj/project.pbxproj
@@ -0,0 +1,295 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 45;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 43B531D2131C92690016BF14 /* Python in Frameworks */ = {isa = PBXBuildFile; fileRef = 43B531D1131C92690016BF14 /* Python */; };
+ 43B531F2131C962E0016BF14 /* iFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 43B531EA131C962E0016BF14 /* iFile.h */; };
+ 43B531F3131C962E0016BF14 /* iFileIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = 43B531EB131C962E0016BF14 /* iFileIterator.h */; };
+ 43B531F4131C962E0016BF14 /* iModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 43B531EC131C962E0016BF14 /* iModule.h */; };
+ 43B531F5131C962E0016BF14 /* iModuleIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = 43B531ED131C962E0016BF14 /* iModuleIterator.h */; };
+ 43B531F6131C962E0016BF14 /* iNXT.h in Headers */ = {isa = PBXBuildFile; fileRef = 43B531EE131C962E0016BF14 /* iNXT.h */; };
+ 43B531F7131C962E0016BF14 /* iNXTIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = 43B531EF131C962E0016BF14 /* iNXTIterator.h */; };
+ 43B531F8131C962E0016BF14 /* platform.h in Headers */ = {isa = PBXBuildFile; fileRef = 43B531F0131C962E0016BF14 /* platform.h */; };
+ 43B531F9131C962E0016BF14 /* tStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 43B531F1131C962E0016BF14 /* tStatus.h */; };
+ 43B531FB131C963A0016BF14 /* visatype.h in Headers */ = {isa = PBXBuildFile; fileRef = 43B531FA131C963A0016BF14 /* visatype.h */; };
+ 43B5320A131C975B0016BF14 /* Fantom in Frameworks */ = {isa = PBXBuildFile; fileRef = 43B53209131C975B0016BF14 /* Fantom */; };
+ 50149BDA09E781A5002DEE6A /* FantomModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 50149BD909E781A5002DEE6A /* FantomModule.h */; };
+ 5073E0CB09E734E500EC74B6 /* FantomModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5073E0C409E734A800EC74B6 /* FantomModule.cpp */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 32BAE0B70371A74B00C91783 /* FantomModule_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FantomModule_Prefix.pch; sourceTree = "<group>"; };
+ 43B531D1131C92690016BF14 /* Python */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = Python; path = /System/Library/Frameworks/Python.framework/Python; sourceTree = "<absolute>"; };
+ 43B531EA131C962E0016BF14 /* iFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iFile.h; sourceTree = "<group>"; };
+ 43B531EB131C962E0016BF14 /* iFileIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iFileIterator.h; sourceTree = "<group>"; };
+ 43B531EC131C962E0016BF14 /* iModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iModule.h; sourceTree = "<group>"; };
+ 43B531ED131C962E0016BF14 /* iModuleIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iModuleIterator.h; sourceTree = "<group>"; };
+ 43B531EE131C962E0016BF14 /* iNXT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iNXT.h; sourceTree = "<group>"; };
+ 43B531EF131C962E0016BF14 /* iNXTIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iNXTIterator.h; sourceTree = "<group>"; };
+ 43B531F0131C962E0016BF14 /* platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = platform.h; sourceTree = "<group>"; };
+ 43B531F1131C962E0016BF14 /* tStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tStatus.h; sourceTree = "<group>"; };
+ 43B531FA131C963A0016BF14 /* visatype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = visatype.h; sourceTree = "<group>"; };
+ 43B53209131C975B0016BF14 /* Fantom */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = Fantom; path = /Library/Frameworks/Fantom.framework/Fantom; sourceTree = "<absolute>"; };
+ 43DB2163131CBF18001443AF /* setup.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = setup.py; sourceTree = "<group>"; };
+ 50149BD909E781A5002DEE6A /* FantomModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FantomModule.h; sourceTree = "<group>"; };
+ 5073E0C409E734A800EC74B6 /* FantomModule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FantomModule.cpp; sourceTree = "<group>"; };
+ 5073E0C609E734A800EC74B6 /* FantomModuleProj.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; path = FantomModuleProj.xcconfig; sourceTree = "<group>"; };
+ 5073E0C709E734A800EC74B6 /* FantomModuleTarget.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; path = FantomModuleTarget.xcconfig; sourceTree = "<group>"; };
+ 50B2938909F016FC00694E55 /* FantomModulePriv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FantomModulePriv.h; sourceTree = "<group>"; };
+ D2AAC09D05546B4700DB518D /* libFantomModule.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libFantomModule.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ D2AAC09B05546B4700DB518D /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 43B531D2131C92690016BF14 /* Python in Frameworks */,
+ 43B5320A131C975B0016BF14 /* Fantom in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 034768DDFF38A45A11DB9C8B /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ D2AAC09D05546B4700DB518D /* libFantomModule.dylib */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 0867D691FE84028FC02AAC07 /* FantomModule */ = {
+ isa = PBXGroup;
+ children = (
+ 43B531FA131C963A0016BF14 /* visatype.h */,
+ 43B531E9131C962E0016BF14 /* fantom */,
+ 5073E0CA09E734BC00EC74B6 /* Configuration Files */,
+ 08FB77ACFE841707C02AAC07 /* Source */,
+ 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */,
+ 034768DDFF38A45A11DB9C8B /* Products */,
+ 43DB2163131CBF18001443AF /* setup.py */,
+ );
+ name = FantomModule;
+ sourceTree = "<group>";
+ };
+ 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = {
+ isa = PBXGroup;
+ children = (
+ 43B53209131C975B0016BF14 /* Fantom */,
+ 43B531D1131C92690016BF14 /* Python */,
+ );
+ name = "External Frameworks and Libraries";
+ sourceTree = "<group>";
+ };
+ 08FB77ACFE841707C02AAC07 /* Source */ = {
+ isa = PBXGroup;
+ children = (
+ 32BAE0B70371A74B00C91783 /* FantomModule_Prefix.pch */,
+ 50149BD909E781A5002DEE6A /* FantomModule.h */,
+ 50B2938909F016FC00694E55 /* FantomModulePriv.h */,
+ 5073E0C409E734A800EC74B6 /* FantomModule.cpp */,
+ );
+ name = Source;
+ sourceTree = "<group>";
+ };
+ 43B531E9131C962E0016BF14 /* fantom */ = {
+ isa = PBXGroup;
+ children = (
+ 43B531EA131C962E0016BF14 /* iFile.h */,
+ 43B531EB131C962E0016BF14 /* iFileIterator.h */,
+ 43B531EC131C962E0016BF14 /* iModule.h */,
+ 43B531ED131C962E0016BF14 /* iModuleIterator.h */,
+ 43B531EE131C962E0016BF14 /* iNXT.h */,
+ 43B531EF131C962E0016BF14 /* iNXTIterator.h */,
+ 43B531F0131C962E0016BF14 /* platform.h */,
+ 43B531F1131C962E0016BF14 /* tStatus.h */,
+ );
+ path = fantom;
+ sourceTree = "<group>";
+ };
+ 5073E0CA09E734BC00EC74B6 /* Configuration Files */ = {
+ isa = PBXGroup;
+ children = (
+ 5073E0C609E734A800EC74B6 /* FantomModuleProj.xcconfig */,
+ 5073E0C709E734A800EC74B6 /* FantomModuleTarget.xcconfig */,
+ );
+ name = "Configuration Files";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ D2AAC09905546B4700DB518D /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 50149BDA09E781A5002DEE6A /* FantomModule.h in Headers */,
+ 43B531F2131C962E0016BF14 /* iFile.h in Headers */,
+ 43B531F3131C962E0016BF14 /* iFileIterator.h in Headers */,
+ 43B531F4131C962E0016BF14 /* iModule.h in Headers */,
+ 43B531F5131C962E0016BF14 /* iModuleIterator.h in Headers */,
+ 43B531F6131C962E0016BF14 /* iNXT.h in Headers */,
+ 43B531F7131C962E0016BF14 /* iNXTIterator.h in Headers */,
+ 43B531F8131C962E0016BF14 /* platform.h in Headers */,
+ 43B531F9131C962E0016BF14 /* tStatus.h in Headers */,
+ 43B531FB131C963A0016BF14 /* visatype.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ D2AAC09C05546B4700DB518D /* FantomModule */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 1DEB916008733D950010E9CD /* Build configuration list for PBXNativeTarget "FantomModule" */;
+ buildPhases = (
+ D2AAC09905546B4700DB518D /* Headers */,
+ D2AAC09B05546B4700DB518D /* Frameworks */,
+ D2AAC09A05546B4700DB518D /* Sources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = FantomModule;
+ productName = libFantomModule;
+ productReference = D2AAC09D05546B4700DB518D /* libFantomModule.dylib */;
+ productType = "com.apple.product-type.library.dynamic";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 0867D690FE84028FC02AAC07 /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = 1DEB916408733D950010E9CD /* Build configuration list for PBXProject "FantomModule" */;
+ compatibilityVersion = "Xcode 3.1";
+ developmentRegion = English;
+ hasScannedForEncodings = 1;
+ knownRegions = (
+ English,
+ Japanese,
+ French,
+ German,
+ );
+ mainGroup = 0867D691FE84028FC02AAC07 /* FantomModule */;
+ productRefGroup = 034768DDFF38A45A11DB9C8B /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ D2AAC09C05546B4700DB518D /* FantomModule */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+ D2AAC09A05546B4700DB518D /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 5073E0CB09E734E500EC74B6 /* FantomModule.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ 1DEB916108733D950010E9CD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 5073E0C709E734A800EC74B6 /* FantomModuleTarget.xcconfig */;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = FantomModule_Prefix.pch;
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/Python.framework\"",
+ "\"$(LOCAL_LIBRARY_DIR)/Frameworks/Fantom.framework\"",
+ );
+ };
+ name = Debug;
+ };
+ 1DEB916208733D950010E9CD /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 5073E0C709E734A800EC74B6 /* FantomModuleTarget.xcconfig */;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = FantomModule_Prefix.pch;
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/Python.framework\"",
+ "\"$(LOCAL_LIBRARY_DIR)/Frameworks/Fantom.framework\"",
+ );
+ STRIP_INSTALLED_PRODUCT = YES;
+ STRIP_STYLE = "non-global";
+ };
+ name = Release;
+ };
+ 1DEB916508733D950010E9CD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 5073E0C609E734A800EC74B6 /* FantomModuleProj.xcconfig */;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = /usr/include/python2.6/;
+ ONLY_ACTIVE_ARCH = YES;
+ PREBINDING = NO;
+ SDKROOT = macosx10.6;
+ };
+ name = Debug;
+ };
+ 1DEB916608733D950010E9CD /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 5073E0C609E734A800EC74B6 /* FantomModuleProj.xcconfig */;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ PREBINDING = NO;
+ SDKROOT = macosx10.6;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 1DEB916008733D950010E9CD /* Build configuration list for PBXNativeTarget "FantomModule" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1DEB916108733D950010E9CD /* Debug */,
+ 1DEB916208733D950010E9CD /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 1DEB916408733D950010E9CD /* Build configuration list for PBXProject "FantomModule" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1DEB916508733D950010E9CD /* Debug */,
+ 1DEB916608733D950010E9CD /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
+}
diff --git a/AT91SAM7S256/armdebug/FantomModule/FantomModulePriv.h b/AT91SAM7S256/armdebug/FantomModule/FantomModulePriv.h
new file mode 100644
index 0000000..54e0775
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/FantomModulePriv.h
@@ -0,0 +1,19 @@
+/*
+ * FantomModulePriv.h
+ * FantomModule
+ *
+ * Created by tcmac on 01/03/2011.
+ * Copyright 2011 __MyCompanyName__. All rights reserved.
+ *
+ */
+
+/* The classes below are not exported */
+#pragma GCC visibility push(hidden)
+
+class FantomModulePriv
+{
+ public:
+ void HelloWorldPriv(const char *);
+};
+
+#pragma GCC visibility pop
diff --git a/AT91SAM7S256/armdebug/FantomModule/FantomModuleProj.xcconfig b/AT91SAM7S256/armdebug/FantomModule/FantomModuleProj.xcconfig
new file mode 100644
index 0000000..363b2d1
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/FantomModuleProj.xcconfig
@@ -0,0 +1,6 @@
+ PREBINDING = NO;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
diff --git a/AT91SAM7S256/armdebug/FantomModule/FantomModuleTarget.xcconfig b/AT91SAM7S256/armdebug/FantomModule/FantomModuleTarget.xcconfig
new file mode 100644
index 0000000..63f1a7e
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/FantomModuleTarget.xcconfig
@@ -0,0 +1,11 @@
+ PRODUCT_NAME = libFantomModule;
+ INSTALL_PATH = /usr/local/lib;
+ MACH_O_TYPE = mh_dylib;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = FantomModule_Prefix.pch;
+ GCC_ENABLE_CPP_EXCEPTIONS = YES;
+ GCC_ENABLE_CPP_RTTI = YES;
+ STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = Dynamic;
+ GCC_SYMBOLS_PRIVATE_EXTERN = YES;
diff --git a/AT91SAM7S256/armdebug/FantomModule/FantomModule_Prefix.pch b/AT91SAM7S256/armdebug/FantomModule/FantomModule_Prefix.pch
new file mode 100644
index 0000000..031204e
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/FantomModule_Prefix.pch
@@ -0,0 +1,6 @@
+//
+// Prefix header for all source files of the 'FantomModule' target in the 'FantomModule' project.
+//
+
+
+#include <iostream>
diff --git a/AT91SAM7S256/armdebug/FantomModule/fantom/iFile.h b/AT91SAM7S256/armdebug/FantomModule/fantom/iFile.h
new file mode 100644
index 0000000..d9884f9
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/fantom/iFile.h
@@ -0,0 +1,280 @@
+/*!
+ \file iFile.h
+ \brief Interface for a file on a LEGO MINDSTORMS NXT.
+*/
+/*
+ Copyright 2005-2006,
+ National Instruments Corporation.
+ All rights reserved.
+
+ File: iFile.h
+ Originated: 12 May 2005
+*/
+
+#ifndef ___fantom_iFile_h___
+#define ___fantom_iFile_h___
+
+// includes...
+
+#ifndef ___fantom_platform_h___
+ #include "platform.h"
+#endif
+
+#ifndef ___fantom_tStatus_h___
+ #include "tStatus.h"
+#endif
+
+
+// defines...
+
+
+namespace nFANTOM100
+{
+ // forward declarations...
+
+ // typedefs...
+
+ // classes...
+
+ /*!
+ \class iFile
+ \brief Interface to a file on a LEGO MINDSTORMS NXT.
+ */
+ class iFile
+ {
+ friend class tNXT;
+
+ // methods
+ protected:
+
+ //! Destructor
+ virtual ~iFile() = 0;
+
+ public:
+
+ //! Retrieves the name of this file.
+ /*!
+ \param fileName Populated with the name of this file. The file name character array
+ must be able to accomodate a NULL-terminated, 15.3 formatted module name. That
+ is, it must have a capacity of 20 bytes.
+ */
+ virtual void getName( ViChar fileName[] ) const = 0;
+
+ //! Retrieves the total size of this file in bytes.
+ /*!
+ The returned size is undefined if the specified status is fatal.
+
+ \param status Status chaining object.
+ \return The total size of this file in bytes.
+ */
+ virtual ViUInt32 getSize( tStatus& status ) = 0;
+
+ //! Retrieves the remaining available size, in bytes, in this file.
+ /*!
+ This number is only helpful for data logging files, which can contain variable
+ amounts of data.
+ The returned size is undefined if the specified status is fatal.
+
+ \param status Status chaining object.
+ \return The remaining available size, in bytes, in this file.
+ */
+ virtual ViUInt32 getAvailableSize( tStatus& status ) = 0;
+
+
+ //! Opens this file for reading.
+ /*!
+ Opens, for reading, the file that corresponds to this object on the associated NXT.
+ The file is not opened if the specified status is fatal.
+
+ \param status Status chaining object.
+ */
+ virtual void openForRead( tStatus& status ) = 0;
+
+
+ //! Open this file for writing.
+ /*!
+ Opens, for writing, the file that corresponds to this object on the associated NXT.
+ If this file doesn't exist on the NXT, it is created. If this file does exist on
+ the NXT, an error is generated.
+ The file is not opened if the specified status is fatal.
+
+ \param sizeInBytes Size of the data, in bytes, that will be written to this file.
+ \param status Status chaining object.
+ */
+ virtual void openForWrite( ViUInt32 sizeInBytes, tStatus& status ) = 0;
+
+
+ //! Open this file for linear (contiguous) writing.
+ /*!
+ Opens, for linear (contiguous) writing, the file that corresponds to this object on
+ the associated NXT. If this file doesn't exist on the NXT, it is created. If this
+ file does exist on the NXT, an error is generated.
+ The file is not opened if the specified status is fatal.
+
+ \param sizeInBytes Size of the data, in bytes, that will be written to the file.
+ \param status Status chaining object.
+ */
+ virtual void openForLinearWrite( ViUInt32 sizeInBytes, tStatus& status ) = 0;
+
+
+ //! Open this data file for writing.
+ /*!
+ Opens, for writing, the data file that corresponds to this object on the associated
+ NXT. This data file differs from normal files in that a data file can be closed
+ before the entire file has been written. If this file doesn't exist on the NXT,
+ it is created. If this file does exist on the NXT, an error is generated.
+ The file is not opened if the specified status is fatal.
+
+ \param sizeInBytes Size of the data, in bytes, that may be written to the file.
+ \param status Status chaining object.
+ */
+ virtual void openForDataWrite( ViUInt32 sizeInBytes, tStatus& status ) = 0;
+
+
+ //! Open this data file for appending additional data.
+ /*!
+ Opens, for appending additional data, the data file that corresponds to this object
+ on the associated NXT. If this file doesn't exist on the NXT, the behavior is
+ undefined. If this file does exist on the NXT, the data that is written is
+ appended to the end of the exiting data.
+ The file is not opened if the specified status is fatal.
+
+ \param status Status chaining object.
+ */
+ virtual void openForDataAppend( tStatus& status ) = 0;
+
+
+ //! Closes this file.
+ /*!
+ Closes the file that corresponds to this object on the associated NXT.
+ The file is not closed if the specified status is fatal.
+
+ \param status Status chaining object.
+ */
+ virtual void close( tStatus& status ) = 0;
+
+
+ //! Reads from this file
+ /*!
+ Reads the specified number of bytes from this file into the specified buffer. No data
+ is read if the specified status is fatal. The ownership of the buffer is not
+ transferred to this file object.
+
+ \param bufferPtr A pointer to the buffer that will be populated with the data that is
+ read. The capacity of the specified buffer must be at least the specified number
+ of bytes.
+ \param numberOfBytes Number of bytes to read.
+ \param status Status chaining object.
+ \return The number of bytes actually read from this file.
+
+ \pre This file must have been opened for reading with the iFile::openForRead method.
+ \post The specified buffer may be deallocated.
+ */
+ virtual ViUInt32 read( ViPBuf bufferPtr, ViUInt32 numberOfBytes, tStatus& status ) = 0;
+
+
+ //! Writes to this file
+ /*!
+ Writes the specified number of bytes from the specified buffer to this file. No data
+ is written if the specified status is fatal. The ownership of the buffer is not
+ transferred to this file object.
+
+ \param bufferPtr A pointer to the buffer that contains the data that will be written.
+ The capacity of the specified buffer must be at least the specified number of
+ bytes.
+ \param numberOfBytes Number of bytes to write to this file.
+ \param status Status chaining object.
+ \return The number of bytes actually written to this file.
+
+ \pre This file must have previously been opened for writing.
+ \post The specified buffer may be deallocated.
+ */
+ virtual ViUInt32 write( const ViByte bufferPtr[], ViUInt32 numberOfBytes,
+ tStatus& status ) = 0;
+
+
+ //! Removes this file
+ /*!
+ Removes the file that corresponds to this object on the associated NXT.
+ The file is not removed if the specified status is fatal.
+
+ \param status Status chaining object.
+ */
+ virtual void remove( tStatus& status ) = 0;
+
+ };
+
+
+ // constants...
+ const ViUInt8 kProtocolFilenameLength = 19; // 15 basename + 1 dot + 3 extension = 19
+
+} // namespace nFANTOM100
+
+
+ // declarations for globally-scoped globals...
+
+ // typedefs...
+ typedef ViObject nFANTOM100_iFile;
+
+ // prototypes...
+ extern "C"
+ {
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_getName(
+ nFANTOM100_iFile filePtr,
+ ViChar fileName[],
+ ViStatus* status );
+
+ nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iFile_getSize(
+ nFANTOM100_iFile filePtr,
+ ViStatus* status );
+
+ nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iFile_getAvailableSize(
+ nFANTOM100_iFile filePtr,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_openForRead(
+ nFANTOM100_iFile filePtr,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_openForWrite(
+ nFANTOM100_iFile filePtr,
+ ViUInt32 sizeInBytes,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_openForLinearWrite(
+ nFANTOM100_iFile filePtr,
+ ViUInt32 sizeInBytes,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_openForDataWrite(
+ nFANTOM100_iFile filePtr,
+ ViUInt32 sizeInBytes,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_openForDataAppend(
+ nFANTOM100_iFile filePtr,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_close(
+ nFANTOM100_iFile filePtr,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_read(
+ nFANTOM100_iFile filePtr,
+ ViPBuf bufferPtr,
+ ViUInt32 numberOfBytes,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_write(
+ nFANTOM100_iFile filePtr,
+ const ViByte bufferPtr[],
+ ViUInt32 numberOfBytes,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_remove(
+ nFANTOM100_iFile filePtr,
+ ViStatus* status );
+
+ }
+
+#endif // ___fantom_iFile_h___
diff --git a/AT91SAM7S256/armdebug/FantomModule/fantom/iFileIterator.h b/AT91SAM7S256/armdebug/FantomModule/fantom/iFileIterator.h
new file mode 100644
index 0000000..5803be8
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/fantom/iFileIterator.h
@@ -0,0 +1,133 @@
+/*!
+ \file iFileIterator.h
+ \brief Interface for an iterator for files on a LEGO MINDSTORMS NXT.
+*/
+/*
+ Copyright 2005-2006,
+ National Instruments Corporation.
+ All rights reserved.
+
+ File: iFileIterator.h
+ Originated: 12 May 2005
+*/
+
+#ifndef ___fantom_iFileIterator_h___
+#define ___fantom_iFileIterator_h___
+
+
+// includes...
+
+#ifndef ___fantom_platform_h___
+ #include "platform.h"
+#endif
+
+#ifndef ___fantom_iFile_h___
+ #include "iFile.h"
+#endif
+
+#ifndef ___fantom_tStatus_h___
+ #include "tStatus.h"
+#endif
+
+
+// defines...
+
+
+namespace nFANTOM100
+{
+ // forward declarations...
+
+ // typedefs...
+
+ // classes...
+
+ /*!
+ \class iFileIterator
+ \brief Interface to an iterator for files on a LEGO MINDSTORMS NXT.
+ */
+ class iFileIterator
+ {
+ friend class tNXT;
+
+ // methods
+ protected:
+
+ //! Destructor
+ virtual ~iFileIterator() = 0;
+
+ public:
+
+ //! Creates a file object for the file referenced by this iterator.
+ /*!
+ Creates file object for the file referenced by this iterator. An object is not
+ created if the specified status is fatal or if this iterator refers to the end of
+ the list. The returned file object should be destroyed using the
+ iNXT::destroyFile method.
+
+ \param status Status chaining object.
+ \return A pointer to the iFile object that was created.
+ */
+ virtual iFile* getFile( tStatus& status ) = 0;
+
+ //! Advances this iterator.
+ /*!
+ Advances this iterator to the next file that matches the previously specified file
+ name pattern. If no more files match, this iterator is advanced to the end of the
+ list.
+ The iterator is not advanced if the specified status is fatal.
+ If this iterator is already at the end of the list, a fatal status will be generated.
+
+ \param status Status chaining object.
+ */
+ virtual void advance( tStatus& status ) = 0;
+
+ //! Retrieves the name of the file to which this iterator refers.
+ /*!
+ \param fileName Populated with the name of the file to which this iterator refers.
+ The file name character array must be able to accomodate a NULL-terminated, 15.3
+ formatted file name. This is, it must have a capacity of 20 bytes.
+ \param status Status chaining object.
+ */
+ virtual void getName( ViChar fileName[], tStatus& status ) = 0;
+
+ //! Retrieves the total size, in bytes, of the file to which this iterator refers.
+ /*!
+ \param status Status chaining object.
+ \return The total size of the file in bytes.
+ */
+ virtual ViUInt32 getSize( tStatus& status ) = 0;
+
+ };
+
+
+ // constants...
+
+} // namespace nFANTOM100
+
+
+ // declarations for globally-scoped globals...
+
+ // typedefs
+ typedef ViObject nFANTOM100_iFileIterator;
+
+ extern "C"
+ {
+ nFANTOM100_kExport nFANTOM100_iFile _VI_FUNCC nFANTOM100_iFileIterator_getFile(
+ nFANTOM100_iFileIterator iteratorPtr,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFileIterator_advance(
+ nFANTOM100_iFileIterator iteratorPtr,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFileIterator_getName(
+ nFANTOM100_iFileIterator iteratorPtr,
+ ViChar filename[],
+ ViStatus* status );
+
+ nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iFileIterator_getSize(
+ nFANTOM100_iFileIterator iteratorPtr,
+ ViStatus* status );
+ }
+
+#endif // ___fantom_iFileIterator_h___
diff --git a/AT91SAM7S256/armdebug/FantomModule/fantom/iModule.h b/AT91SAM7S256/armdebug/FantomModule/fantom/iModule.h
new file mode 100644
index 0000000..1f03849
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/fantom/iModule.h
@@ -0,0 +1,154 @@
+/*!
+ \file iModule.h
+ \brief Interface for a firmware module on a LEGO MINDSTORMS NXT.
+*/
+/*
+ Copyright 2005-2006,
+ National Instruments Corporation.
+ All rights reserved.
+
+ File: iModule.h
+ Originated: 8 Aug 2005
+*/
+
+#ifndef ___fantom_iModule_h___
+#define ___fantom_iModule_h___
+
+#ifndef ___fantom_platform_h___
+ #include "platform.h"
+#endif
+
+#ifndef ___fantom_tStatus_h___
+ #include "tStatus.h"
+#endif
+
+
+// defines...
+
+
+namespace nFANTOM100
+{
+
+ /*!
+ \class iModule
+ \brief Interface to a firmware module on a LEGO MINDSTORMS NXT.
+ */
+ class iModule
+ {
+ friend class tNXT;
+
+ // methods
+ protected:
+
+ //! Destructor
+ virtual ~iModule() = 0;
+
+ public:
+
+ //! Retrieves the name of this module.
+ /*!
+ \param moduleName Populated with the name of this module. The module name character
+ array must be able to accomodate a NULL-terminated, 15.3 formatted module name.
+ That is, it must have a capacity of 20 bytes.
+ */
+ virtual void getName( ViChar moduleName[] ) const = 0;
+
+ //! Retrieves the internal module ID of this module.
+ /*!
+ \return The internal module ID of this module.
+ */
+ virtual ViUInt32 getModuleID( void ) const = 0;
+
+ //! Retrieves the size in bytes of this module.
+ /*!
+ \return The size in bytes of this module.
+ */
+ virtual ViUInt32 getModuleSize( void ) const = 0;
+
+ //! Retrieves the size in bytes of the I/O map associated with this module.
+ /*!
+ \return The size in bytes of the I/O map associated with this module.
+ */
+ virtual ViUInt32 getModuleIOMapSize( void ) const = 0;
+
+ //! Reads a portion of this module's I/O map.
+ /*!
+ Reads the data located at [I/O map address] + [specified offset in bytes] into the
+ specified data buffer. The read will attempt to copy the specified number of
+ bytes. No read occurs if the specified status is fatal. The ownership of data
+ buffer is not transferred to this module object.
+
+ \param offsetInBytes The index of the byte in the I/O map at which to start the read.
+ \param numberOfBytes The number of bytes that should be read from the I/O map.
+ \param dataBufferPtr A pointer to the data buffer that will be populated with the
+ data that is read. The capacity of the specified data buffer must be at least the
+ specified number of bytes.
+ \param status Status chaining object.
+ \return The number of bytes actually read from the I/O map.
+
+ \post The specified data buffer may be deallocated.
+ */
+ virtual ViUInt32 readIOMap( ViUInt32 offsetInBytes, ViUInt32 numberOfBytes,
+ ViPBuf dataBufferPtr, tStatus& status ) = 0;
+
+ //! Writes a portion of this module's I/O map.
+ /*!
+ Writes the specified data into this module's I/O map. The write starts at [I/O map
+ address] + [specified offset in bytes] and stops after the specified number of
+ bytes have been written. No write occurs if the specified status is fatal. The
+ ownership of data buffer is not transferred to this module object.
+
+ \param offsetInBytes The index of the byte in the I/O map at which to start the write.
+ \param numberOfBytes The number of bytes to write into the I/O map.
+ \param dataBufferPtr A pointer to the data buffer that contains the data that will be
+ written. The capacity of the specified data buffer must be at least the specified
+ number of bytes.
+ \param status Status chaining object.
+ \return The number of bytes actually written into the I/O map.
+
+ \post The specified data buffer may be deallocated.
+ */
+ virtual ViUInt32 writeIOMap( ViUInt32 offsetInBytes, ViUInt32 numberOfBytes,
+ const ViByte dataBufferPtr[], tStatus& status ) = 0;
+
+ };
+
+}; // nFANTOM100
+
+typedef ViObject nFANTOM100_iModule;
+
+extern "C"
+{
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iModule_getName(
+ nFANTOM100_iModule modulePtr,
+ ViChar moduleName[],
+ ViStatus* status );
+
+ nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iModule_getModuleID(
+ nFANTOM100_iModule modulePtr,
+ ViStatus* status );
+
+ nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iModule_getModuleSize(
+ nFANTOM100_iModule modulePtr,
+ ViStatus* status );
+
+ nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iModule_getIOMapSize(
+ nFANTOM100_iModule modulePtr,
+ ViStatus* status );
+
+ nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iModule_readIOMap(
+ nFANTOM100_iModule modulePtr,
+ ViUInt32 offset,
+ ViUInt32 numberBytesToRead,
+ ViPBuf dataBuffer,
+ ViStatus* status );
+
+ nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iModule_writeIOMap(
+ nFANTOM100_iModule modulePtr,
+ ViUInt32 offset,
+ ViUInt32 numberBytesToWrite,
+ const ViByte dataBuffer[],
+ ViStatus* status );
+}
+
+#endif // ___fantom_iModule_h___
diff --git a/AT91SAM7S256/armdebug/FantomModule/fantom/iModuleIterator.h b/AT91SAM7S256/armdebug/FantomModule/fantom/iModuleIterator.h
new file mode 100644
index 0000000..402bf1a
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/fantom/iModuleIterator.h
@@ -0,0 +1,123 @@
+/*!
+ \file iModuleIterator.h
+ \brief Interface for an iterator for firmware modules on a LEGO MINDSTORMS NXT.
+*/
+/*
+ Copyright 2005-2006,
+ National Instruments Corporation.
+ All rights reserved.
+
+ File: iModuleIterator.h
+ Originated: 8 Aug 2005
+*/
+
+#ifndef ___fantom_iModuleIterator_h___
+#define ___fantom_iModuleIterator_h___
+
+
+// includes...
+
+#ifndef ___fantom_platform_h___
+ #include "platform.h"
+#endif
+
+#ifndef ___fantom_iModule_h___
+ #include "iModule.h"
+#endif
+
+#ifndef ___fantom_tStatus_h___
+ #include "tStatus.h"
+#endif
+
+
+// defines...
+
+
+namespace nFANTOM100
+{
+ // forward declarations...
+
+ // typedefs...
+
+ // classes...
+
+ /*!
+ \class iModuleIterator
+ \brief Interface to an iterator for firmware modules on a LEGO MINDSTORMS NXT.
+ */
+ class iModuleIterator
+ {
+ friend class tNXT;
+
+ // methods
+ protected:
+
+ //! Destructor
+ virtual ~iModuleIterator() = 0;
+
+ public:
+
+ //! Creates a module object for the module referenced by this iterator.
+ /*!
+ Creates a module object for the module referenced by this iterator. An object is not
+ created if the specified status is fatal or if this iterator refers to the end of
+ the list. The returned module object should be destroyed using the
+ iNXT::destroyModule method.
+
+ \param status Status chaining object.
+ \return A pointer to the iModule object that was created.
+ */
+ virtual iModule* getModule( tStatus& status ) = 0;
+
+ //! Advances this iterator.
+ /*!
+ Advances this iterator to the next module that matches the previously specified
+ module name pattern. If no more modules match, this iterator is advanced to the
+ end of the list.
+ The iterator is not advanced if the specified status is fatal.
+ If this iterator is already at the end of the list, a fatal status will be generated.
+
+ \param status Status chaining object.
+ */
+ virtual void advance( tStatus& status ) = 0;
+
+ //! Retrieves the name of the module to which this iterator refers.
+ /*!
+ \param moduleName Populated with the name of the module to which this iterator
+ refers. The module name character array must be able to accomodate a
+ NULL-terminated, 15.3 formatted module name. This is, it must have a capacity of
+ 20 bytes.
+ \param status Status chaining object.
+ */
+ virtual void getName( ViChar moduleName[], tStatus& status ) = 0;
+
+ };
+
+
+ // constants...
+
+} // namespace nFANTOM100
+
+
+ // declarations for globally-scoped globals...
+
+ // typedefs
+ typedef ViObject nFANTOM100_iModuleIterator;
+
+ extern "C"
+ {
+ nFANTOM100_kExport nFANTOM100_iModule _VI_FUNCC nFANTOM100_iModuleIterator_getModule(
+ nFANTOM100_iModuleIterator iteratorPtr,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iModuleIterator_advance(
+ nFANTOM100_iModuleIterator iteratorPtr,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iModuleIterator_getName(
+ nFANTOM100_iModuleIterator iteratorPtr,
+ ViChar moduleName[],
+ ViStatus* status );
+ }
+
+#endif // ___fantom_iModuleIterator_h___
diff --git a/AT91SAM7S256/armdebug/FantomModule/fantom/iNXT.h b/AT91SAM7S256/armdebug/FantomModule/fantom/iNXT.h
new file mode 100644
index 0000000..ba61db8
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/fantom/iNXT.h
@@ -0,0 +1,666 @@
+/*!
+ \file iNXT.h
+ \brief Interface for a LEGO MINDSTORMS NXT and declaration of its factory.
+*/
+/*
+ Copyright 2005-2006,
+ National Instruments Corporation.
+ All rights reserved.
+
+ File: iNXT.h
+ Originated: 12 May 2005
+*/
+
+#ifndef ___fantom_iNXT_h___
+#define ___fantom_iNXT_h___
+
+
+// includes...
+
+#ifndef ___fantom_platform_h___
+ #include "platform.h"
+#endif
+
+#ifndef ___fantom_iFile_h___
+ #include "iFile.h"
+#endif
+
+#ifndef ___fantom_iFileIterator_h___
+ #include "iFileIterator.h"
+#endif
+
+#ifndef ___fantom_iModule_h___
+ #include "iModule.h"
+#endif
+
+#ifndef ___fantom_iModuleIterator_h___
+ #include "iModuleIterator.h"
+#endif
+
+#ifndef ___fantom_iNXTIterator_h___
+ #include "iNXTIterator.h"
+#endif
+
+#ifndef ___fantom_tStatus_h___
+ #include "tStatus.h"
+#endif
+
+// defines...
+
+
+namespace nFANTOM100
+{
+ // forward declarations...
+
+ // typedefs...
+
+ // classes...
+
+ /*!
+ \class iNXT
+ \brief Interface to a LEGO MINDSTORMS NXT.
+ */
+ class iNXT
+ {
+ // methods
+ protected:
+
+ //! Destructor
+ virtual ~iNXT() = 0;
+
+ public:
+
+ //! Enumeration of buffer types on the NXT
+ enum tBuffer
+ {
+ // The buffer associated with the standard port.
+ kBufferStandard,
+
+ // The buffer associated with the high-speed port.
+ kBufferHighSpeed
+ };
+
+ //! Creates a file object for the file with the specified name on this NXT.
+ /*!
+ Invoking this method does not actually create a file on the NXT. Rather, this method
+ creates a file object which may be used to open a file on this NXT, for reading or
+ writing, or may be used to delete a file on the NXT.
+ A file is not created if the specified status is fatal.
+ The returned file object should be destroyed using the iNXT::destroyFile method.
+
+ \param fileName Name of the file. The file name must conform to the 15.3 naming
+ convention and be NULL-terminated.
+ \param status Status chaining object.
+ \return A pointer to the iFile object that was created.
+ */
+ virtual iFile* createFile( ViConstString fileName, tStatus& status ) = 0;
+
+
+ //! Destroys the specified file object.
+ /*!
+ Invoking this method does not actually delete a file on the NXT. Rather, this method
+ destroys a file object which may have been used to open a file on this NXT for
+ reading or writing, or may have been used to delete a file on the NXT.
+
+ \param filePtr Pointer to the file object to destroy.
+ */
+ virtual void destroyFile( iFile* filePtr ) = 0;
+
+
+ //! Creates an iterator to the files on this NXT.
+ /*!
+ The iterator traverses those files on this NXT that match the specified file name
+ pattern.
+ The iterator is not created if the specified status is fatal.
+ The returned file iterator object should be destroyed using the
+ iNXT::destroyFileIterator method.
+
+ \param fileNamePattern The file name pattern against which to match when iterating
+ over the files on this NXT. The file name pattern may contain wildcards. The
+ wildcards may be used in the following manner: *.* (all files on this NXT);
+ fileBaseName.* (all files on this NXT with the specified base name regardless of
+ extension); *.fileExtension (all files on this NXT with the specified extension,
+ regardless of basename); fileBaseName.fileExtension (the file on this NXT with the
+ specified base name and extension).
+ \param status Status chaining object.
+ \return A pointer to the iFileIterator object that was created.
+ */
+ virtual iFileIterator* createFileIterator( ViConstString fileNamePattern,
+ tStatus& status ) = 0;
+
+
+ //! Destroys the specified file iterator.
+ /*!
+ \param fileIteratorPtr A pointer to the file iterator to destroy.
+ */
+ virtual void destroyFileIterator( iFileIterator* fileIteratorPtr ) = 0;
+
+ //! Creates a module object for the module with the specified name on this NXT.
+ /*!
+ Invoking this method does not actually create a module on the NXT. Rather, this
+ method creates a module object which may be used to access an I/O map on this NXT.
+ A module is not created if the specified status is fatal.
+ The returned module object should be destroyed using the iNXT::destroyModule method.
+
+ \param moduleName The name of the module. The module name must conform to the 15.3
+ naming convention and be NULL-terminated.
+ \param moduleID The NXT-internal ID of the module.
+ \param moduleSizeInBytes The number of bytes the module occupies.
+ \param ioMapSizeInBytes The number of bytes the module's I/O map occupies.
+ \param status Status chaining object.
+ \return A pointer to the iModule object that was created.
+ */
+ virtual iModule* createModule( ViConstString moduleName, ViUInt32 moduleID,
+ ViUInt32 moduleSizeInBytes, ViUInt32 ioMapSizeInBytes, tStatus& status ) = 0;
+
+ //! Destroys the specified module object.
+ /*!
+ Invoking this method does not actually delete a module on this NXT. Rather, this
+ method destroys a module object which may have been used to access an I/O map on
+ this NXT.
+
+ \param modulePtr Pointer to the module object to destroy.
+ */
+ virtual void destroyModule( iModule* modulePtr ) = 0;
+
+
+ //! Creates an iterator to the modules on this NXT.
+ /*!
+ The iterator traverses those modules on this NXT that match the specified module name
+ pattern.
+ The iterator is not created if the specified status is fatal.
+ The returned module iterator object should be destroyed using the
+ iNXT::destroyModuleIterator method.
+
+ \param moduleNamePattern The module name pattern against which to match. The module
+ name pattern may contain wildcards. Since extensions are implicit in the case of
+ modules, a wildcard may only be used for the module name, as in "*.mod".
+ \param status Status chaining object.
+ \return A pointer to an iModuleIterator object that was created.
+ */
+ virtual iModuleIterator* createModuleIterator( ViConstString moduleNamePattern,
+ tStatus& status ) = 0;
+
+
+ //! Destroys the specified module iterator.
+ /*!
+ \param moduleIteratorPtr A pointer to the module iterator object to destroy.
+ */
+ virtual void destroyModuleIterator( iModuleIterator* moduleIteratorPtr ) = 0;
+
+ //! Retrieves the firmware version of this NXT.
+ /*!
+ Returns the protocol and firmware versions installed on this NXT.
+ The current version of this driver supports a protocol major version number of 1 and a
+ firmware major version number of 1. If either of these major version numbers is a
+ value other than 1, the driver will not attempt to communicate to the NXT.
+ The returned versions are undefined if the specified status is fatal.
+
+ \param protocolVersionMajorRef Reference to parameter that will be populated with the
+ major protocol version.
+ \param protocolVersionMinorRef Reference to parameter that will be populated with the
+ minor protocol version.
+ \param firmwareVersionMajorRef Reference to parameter that will be populated with the
+ major firmware verison.
+ \param firmwareVersionMinorRef Reference to parameter that will be populated with the
+ minor firmware verison.
+ \param status Status chaining object.
+ */
+ virtual void getFirmwareVersion( ViUInt8& protocolVersionMajorRef,
+ ViUInt8& protocolVersionMinorRef, ViUInt8& firmwareVersionMajorRef,
+ ViUInt8& firmwareVersionMinorRef, tStatus& status ) = 0;
+
+
+ //! Sends the specified direct command to this NXT.
+ /*!
+ For more information on direct commands, refer to the LEGO MINDSTORMS NXT Direct
+ commands document.
+ The command is not sent if the specified status is fatal.
+ The command buffer must be non-NULL and the command buffer size in bytes must be
+ non-zero.
+ If require response is set to true, the response buffer must be non-NULL and the
+ response buffer size in bytes must be non-zero.
+ If require response is set to false, the response buffer must be NULL and the
+ response buffer size in bytes must be zero.
+ Both of the buffer size parameters must be small enough to fit in one packet for
+ whichever bus the NXT is connected over (USB or Bluetooth). This means the
+ maximum length for a direct command over USB is 63 bytes; over Bluetooth, 65,533
+ bytes.
+ If any of these requirements are violated, VI_ERROR_USER_BUF will be returned.
+
+ \param requireResponse Boolean flag indicating if a response is required.
+ \param commandBufferPtr Buffer containing the direct command to send to the NXT.
+ \param commandBufferSizeInBytes Number of bytes in the command buffer.
+ \param responseBufferPtr Buffer that will be populated with the response to the direct
+ command.
+ \param responseBufferSizeInBytes Capacity of the response buffer in bytes.
+ \param status Status chaining object.
+ \return Number of bytes written to the response buffer.
+ */
+ virtual ViUInt32 sendDirectCommand( ViBoolean requireResponse, const ViByte commandBufferPtr[],
+ ViUInt32 commandBufferSizeInBytes, ViPBuf responseBufferPtr,
+ ViUInt32 responseBufferSizeInBytes, tStatus& status ) = 0;
+
+ //! Downloads firmware to this NXT.
+ /*!
+ The NXT must already be in firmware-download mode.
+
+ \param firmwareBufferPtr The buffer containing the new firmware binary image.
+ \param firmwareBufferSizeInBytes The number of bytes in the new firmware image.
+ \param status Status chaining object.
+ */
+ virtual void downloadFirmware( const ViByte firmwareBufferPtr[],
+ ViUInt32 firmwareBufferSizeInBytes, tStatus& status ) = 0;
+
+
+ //! Writes, in a generic fashion, to this NXT.
+ /*!
+ Writes a command directly to this NXT. In general, this method isn't used and,
+ instead, the sendDirectCommand and other more specific methods are invoked when
+ communication to the NXT.
+ The write doesn not occur if the specified status is fatal.
+
+ \param bufferPtr A pointer to the buffer that contains the command that will be
+ written.
+ \param numberOfBytes Size of the buffer.
+ \param status Status chaining object.
+ \return The number of bytes actually written to the NXT.
+ */
+ virtual ViUInt32 write( const ViByte bufferPtr[], ViUInt32 numberOfBytes,
+ tStatus& status ) = 0;
+
+ //! Reads, in a generic fashion, from this NXT.
+ /*!
+ Reads a response directly from this NXT. In general, this method isn't used and,
+ instead, the sendDirectCommand and other more specific methods are invoked when
+ communication to the NXT.
+ The command is not sent if the specified status is fatal.
+
+ \param bufferPtr A pointer to the buffer that will be populated with the response.
+ \param numberOfBytes Number of bytes expected to be read from this NXT.
+ \param status Status chaining object.
+ \return The number of bytes actually read from this NXT.
+ */
+ virtual ViUInt32 read ( ViPBuf bufferPtr, ViUInt32 numberOfBytes, tStatus& status ) = 0;
+
+ //! Reboots this NXT into firmware-download mode.
+ /*!
+ This is required before invoking the downloadFirmware method.
+ The reboot does not occur is the specified status is fatal.
+
+ \param status Status chaining object.
+ */
+ virtual void bootIntoFirmwareDownloadMode( tStatus& status ) = 0;
+
+ //! Sets the name of this NXT.
+ /*!
+ The specified name will be displayed on the NXT, show up during Bluetooth scans, and
+ returned when the getDeviceInfo method is called.
+
+ \param newName The name for the NXT. The name can be at most 15 characters. However,
+ the NXT can only display 8 characters. The string must be NULL terminated.
+ \param status Status chaining object.
+ */
+ virtual void setName( ViConstString newName, tStatus& status ) = 0;
+
+ //! Retrieves basic information about this NXT.
+ /*!
+ Retrieves the name of this NXT, its Bluetooth address, the Bluetooth signal strength,
+ and the number of bytes available.
+ Information retrieval is not done if specified status is fatal.
+
+ \param name Populated with the name of this NXT. The name character array must be
+ able to accomodate a NULL-terminated 15 character name. That is, it must have a
+ capacity of 16 bytes.
+ \param bluetoothAddress Populated with this NXT's Bluetooth address. The bluetooth
+ address array must have a capacity of six bytes.
+ \param signalStrength Populated with strength of the signal for this NXT's four
+ Bluetooth conenctions. The signal strength array must have a capacity of four
+ bytes.
+ \param availableFlash Populated with the amount of memory in bytes that is not
+ occupied by firmware or user files.
+ \param status Status chaining object.
+ */
+ virtual void getDeviceInfo( ViChar name[], ViByte bluetoothAddress[],
+ ViUInt8 signalStrength[], ViUInt32 &availableFlash, tStatus& status ) = 0;
+
+ //! Erases all files from this NXT, leaving only the firmware.
+ /*!
+ All programs, sounds, and data logs are erased.
+ The erasure does not occur if specified status is fatal.
+
+ \param status Status chaining object.
+ */
+ virtual void eraseUserFlash( tStatus& status ) = 0;
+
+ //! Polls the data buffer on this NXT for the number of bytes available to be read.
+ /*
+ The data buffer is not polled if the specified status is fatal.
+
+ \param bufferSelector The buffer from which to read.
+ \param status Status chaining object.
+ \return The number of bytes in the buffer available to be read.
+ */
+ virtual ViUInt32 pollAvailableLength( tBuffer bufferSelector, tStatus& status ) = 0;
+
+ //! Reads data from the data buffer on this NXT.
+ /*!
+ Data is not read if the specified status is fatal.
+
+ \param dataBuffer Populated with the data that is read from the specified buffer.
+ \param bufferSelector The buffer from which to read.
+ \param numberOfBytesToRead The number of bytes to read from the data buffer.
+ \param status Status chaining object.
+ \return The number of bytes actually read from the data buffer.
+ */
+ virtual ViUInt32 readBufferData( ViPBuf dataBuffer, tBuffer bufferSelector,
+ ViUInt32 numberOfBytesToRead, tStatus& status ) = 0;
+
+ //! Retrieves the resource string for this NXT's session.
+ /*
+ An example resource string could look like the one of the following:
+ BTH::LEGOBrick::00:16:53:04:05:06::5
+ BTH::LEGOBrick::00:16:53:04:05:06::1
+ BTH::Brick2::00:16:53:44:FF:66
+ USB0::0x0694::0x0002::0016535127BA::RAW
+
+ \param resourceString Populated with the resource string. The resource string must
+ have a capacity of 256 bytes.
+ \param status Status chaining object.
+ */
+ virtual void getResourceString( ViChar resourceString[], tStatus& status ) = 0;
+
+ //! Resets the Bluetooth module on this NXT to its factory settings.
+ /*
+ \param status Status chaining object.
+ */
+ virtual void bluetoothFactoryReset( tStatus& status ) = 0;
+
+ //! Creates an NXT object
+ /*!
+ Creates an NXT object representing the specified NXT.
+ The NXT object is not created if the specified status is fatal.
+ The returned NXT object should be destroyed using the iNXT::destroyNXT method.
+
+ \param resourceString A string identifying which resource should be opened. A list
+ of possible strings can be obtained using an iNXTIterator (refer to the
+ createNXTIterator method).
+ \param status Status chaining object.
+ \param checkFirmwareVersion A boolean flag that specifies whether version validation
+ should occur (defaults to true).
+ \return A pointer to the iNXT object that was created.
+ */
+ nFANTOM100_kExport static iNXT* _VI_FUNCC createNXT( ViConstString resourceString,
+ tStatus& status, ViBoolean checkFirmwareVersion = true );
+
+ //! Destroys an NXT object
+ /*!
+ \param nxtPtr A pointer to the NXT object to destroy; may be NULL
+ */
+ nFANTOM100_kExport static void _VI_FUNCC destroyNXT( iNXT* nxtPtr );
+
+ //! Creates an NXT iterator.
+ /*!
+ The NXT iterator can be used to find all NXTs that are connected (USB) or in range
+ (Bluetooth).
+ The NXT iterator is not created if the specified status is fatal.
+ The returned NXT iterator object should be destroyed using the
+ iNXT::destroyNXTIterator method.
+
+ \param searchBluetooth A boolean flag that specifies if the iterator should traverse
+ NXTs via Bluetooth.
+ \param bluetoothSearchTimeoutInSeconds The minimum number of seconds that should be
+ spent waiting for Bluetooth devices to respond.
+ \param status Status chaining object.
+ \return A pointer to the iNXTIterator object that was created.
+ */
+ nFANTOM100_kExport static iNXTIterator* _VI_FUNCC createNXTIterator(
+ ViBoolean searchBluetooth, ViUInt32 bluetoothSearchTimeoutInSeconds,
+ tStatus& status );
+
+ //! Destroys an NXT iterator object.
+ /*
+ \param iterPtr A pointer to the iNXTIterator object to destroy.
+ */
+ nFANTOM100_kExport static void _VI_FUNCC destroyNXTIterator( iNXTIterator* iterPtr );
+
+ //! Pairs with an NXT via Bluetooth.
+ /*!
+ Programmatically pairs the specified NXT to this computer and, on Windows, creates a
+ virtual serial port to use for communication with that NXT. However, clients
+ should not depend on the creation of this virtual serial port.
+ The pairing is not done if the specified status is fatal.
+
+ \param resourceName The resource string that specifies the NXT with which to pair.
+ \param passkey A string containing the passkey the computer should exchange with the
+ device. The passkey cannot be longer than 15 characters and must be
+ NULL-terminated.
+ \param pairedResourceName A Bluetooth resource string representing the paired device.
+ On Windows, the specified resourceName is suffixed with the COM port; On Mac OS X,
+ the RFCOMM channel identifier. The resource string must have a capacity of 256
+ bytes.
+ \param status Status chaining object.
+ */
+ nFANTOM100_kExport static void _VI_FUNCC pairBluetooth( ViConstString resourceName,
+ ViConstString passkey, ViChar pairedResourceName[], tStatus& status );
+
+ //! Unpairs with an NXT via Bluetooth.
+ /*!
+ Programmatically destroys the Bluetooth pairing that was previously established
+ between this computer and the specified NXT. On Mac OS X, this method has no
+ effect and doesn't generate a fatal status.
+ The unpairing is not done if the specified status is fatal.
+
+ \param resourceName The resource string that specifies the NXT with which to unpair.
+ \param status Status chaining object.
+ */
+ nFANTOM100_kExport static void _VI_FUNCC unpairBluetooth( ViConstString resourceName,
+ tStatus& status );
+
+ //! Determines if the NXT associated with the specified resource string is paired.
+ /*!
+ The determination is not done if the specified status is fatal.
+
+ \param resourceName A resource string that specifies the NXT for which to check its
+ pairing status.
+ \param status Status chaining object.
+ \return VI_TRUE if the NXT is paired with this computer (or if it is connected via
+ USB); VI_FALSE otherwise.
+ */
+ nFANTOM100_kExport static ViBoolean _VI_FUNCC isPaired( ViConstString resourceName,
+ tStatus& status );
+
+ //! Finds the NXT that is currently in firmware-download mode.
+ /*!
+ Note that only a single NXT may be in firmware-download mode at a time.
+
+ \param resourceName Populated with the resource string. The resource string must
+ have a capacity of 256 bytes.
+ \param status Status chaining object.
+ */
+ nFANTOM100_kExport static void findDeviceInFirmwareDownloadMode( ViChar resourceName[],
+ tStatus& status );
+
+
+ private:
+
+ };
+
+ // constants...
+
+} // namespace nFANTOM100
+
+
+ // declarations for globally-scoped globals...
+
+ // typedefs...
+ typedef ViObject nFANTOM100_iNXT;
+
+ // prototypes...
+ extern "C"
+ {
+
+ nFANTOM100_kExport nFANTOM100_iNXTIterator _VI_FUNCC nFANTOM100_createNXTIterator(
+ ViBoolean searchBluetooth,
+ ViUInt32 bluetoothSearchTimeoutInSeconds,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_destroyNXTIterator(
+ nFANTOM100_iNXTIterator iterPtr,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_pairBluetooth(
+ ViConstString resourceName,
+ ViConstString passkey,
+ ViChar pairedResourceName[],
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_unpairBluetooth(
+ ViConstString resourceName,
+ ViStatus* status );
+
+ nFANTOM100_kExport ViBoolean _VI_FUNCC nFANTOM100_isPaired(
+ ViConstString resourceName,
+ ViStatus* status );
+
+ nFANTOM100_kExport nFANTOM100_iNXT _VI_FUNCC nFANTOM100_createNXT(
+ ViConstString resourceString,
+ ViStatus* status,
+ ViBoolean checkFirmwareVersion );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_destroyNXT(
+ nFANTOM100_iNXT nxtPtr,
+ ViStatus* status );
+
+ nFANTOM100_kExport nFANTOM100_iFile _VI_FUNCC nFANTOM100_iNXT_createFile(
+ nFANTOM100_iNXT nxtPtr,
+ ViConstString fileName,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_destroyFile(
+ nFANTOM100_iNXT nxtPtr,
+ nFANTOM100_iFile filePtr,
+ ViStatus* status );
+
+ nFANTOM100_kExport nFANTOM100_iFileIterator _VI_FUNCC nFANTOM100_iNXT_createFileIterator(
+ nFANTOM100_iNXT nxtPtr,
+ ViConstString fileNamePattern,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_destroyFileIterator(
+ nFANTOM100_iNXT nxtPtr,
+ nFANTOM100_iFileIterator fileIteratorPtr,
+ ViStatus* status );
+
+ nFANTOM100_kExport nFANTOM100_iModule _VI_FUNCC nFANTOM100_iNXT_createModule(
+ nFANTOM100_iNXT nxtPtr,
+ ViConstString moduleName,
+ ViUInt32 moduleID,
+ ViUInt32 moduleSize,
+ ViUInt32 ioMapSizeInBytes,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_destroyModule(
+ nFANTOM100_iNXT nxtPtr,
+ nFANTOM100_iModule modulePtr,
+ ViStatus* status );
+
+ nFANTOM100_kExport nFANTOM100_iModuleIterator _VI_FUNCC nFANTOM100_iNXT_createModuleIterator(
+ nFANTOM100_iNXT nxtPtr,
+ ViConstString moduleNamePattern,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_destroyModuleIterator(
+ nFANTOM100_iNXT nxtPtr,
+ nFANTOM100_iModuleIterator moduleIteratorPtr,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_getFirmwareVersion(
+ nFANTOM100_iNXT nxtPtr,
+ ViUInt8* protocolVersionMajorPtr,
+ ViUInt8* protocolVersionMinorPtr,
+ ViUInt8* firmwareVersionMajorPtr,
+ ViUInt8* firmwareVersionMinorPtr,
+ ViStatus* status );
+
+ nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iNXT_sendDirectCommand(
+ nFANTOM100_iNXT nxtPtr,
+ ViBoolean requireResponse,
+ const ViByte commandBufferPtr[],
+ ViUInt32 commandBufferSizeInBytes,
+ ViPBuf responseBufferPtr,
+ ViUInt32 responseBufferSizeInBytes,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_findDeviceInFirmwareDownloadMode(
+ ViChar resourceString[],
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_downloadFirmware(
+ nFANTOM100_iNXT nxtPtr,
+ const ViByte firmwareBufferPtr[],
+ ViUInt32 firmwareBufferSize,
+ ViStatus* status );
+
+ nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iNXT_write(
+ nFANTOM100_iNXT nxtPtr,
+ const ViByte bufferPtr[],
+ ViUInt32 numberOfBytes,
+ ViStatus* status );
+
+ nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iNXT_read(
+ nFANTOM100_iNXT nxtPtr,
+ ViPBuf bufferPtr,
+ ViUInt32 numberOfBytes,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_bootIntoFirmwareDownloadMode(
+ ViConstString resouceName,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_setName(
+ nFANTOM100_iNXT nxtPtr,
+ ViConstString newName,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_getDeviceInfo(
+ nFANTOM100_iNXT nxtPtr,
+ ViChar name[],
+ ViByte bluetoothAddress[],
+ ViUInt8 signalStrength[],
+ ViUInt32* availableFlash,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_eraseUserFlash(
+ nFANTOM100_iNXT nxtPtr,
+ ViStatus* status );
+
+ nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iNXT_pollAvailableLength(
+ nFANTOM100_iNXT nxtPtr,
+ ViUInt32 bufferIndex,
+ ViStatus* status );
+
+ nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iNXT_readBufferData(
+ nFANTOM100_iNXT nxtPtr,
+ ViPBuf dataBuffer,
+ ViUInt32 bufferIndex,
+ ViUInt32 numberOfBytesToRead,
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_getResourceString(
+ nFANTOM100_iNXT nxtPtr,
+ ViChar resourceString[],
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_bluetoothFactoryReset(
+ nFANTOM100_iNXT nxtPtr,
+ ViStatus* status );
+
+
+ } // extern "C"
+
+
+// inline functions and function macros...
+
+
+#endif // ___fantom_iNXT_h___
diff --git a/AT91SAM7S256/armdebug/FantomModule/fantom/iNXTIterator.h b/AT91SAM7S256/armdebug/FantomModule/fantom/iNXTIterator.h
new file mode 100644
index 0000000..6f43537
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/fantom/iNXTIterator.h
@@ -0,0 +1,120 @@
+/*!
+ \file iNXTIterator.h
+ \brief Interface used for searching for LEGO MINDSTORMS NXTs.
+*/
+/*
+ Copyright 2005-2006,
+ National Instruments Corporation.
+ All rights reserved.
+
+ File: iNXTIterator.h
+ Originated: 17 Oct 2005
+*/
+
+#ifndef ___fantom_iNXTIterator_h___
+#define ___fantom_iNXTIterator_h___
+
+
+// includes...
+
+#ifndef ___fantom_platform_h___
+ #include "platform.h"
+#endif
+
+#ifndef ___fantom_tStatus_h___
+ #include "tStatus.h"
+#endif
+
+
+// defines...
+
+
+namespace nFANTOM100
+{
+ // forward declarations...
+ class iNXT;
+
+ // typedefs...
+
+ // classes...
+
+ /*!
+ \class iNXTIterator
+ \brief Interface to an iterator for LEGO MINDSTORMS NXTs.
+ */
+ class iNXTIterator
+ {
+ friend class iNXT;
+
+ // methods
+ protected:
+
+ //! Destructor
+ virtual ~iNXTIterator() = 0;
+
+ public:
+
+ //! Retrieves the name of the NXT to which this iterator refers.
+ /*
+ \param resourceName Populated with the name of the NXT to which this iterator
+ currently refers. The resource name character array must have a capacity of 256
+ bytes.
+ \param status Status chaining object.
+ */
+ virtual void getName( ViChar resourceName[], tStatus& status ) const = 0;
+
+ //! Advances this iterator.
+ /*!
+ Advances this iterator to the next NXT that was found. If no more NXTs are found,
+ this iterator is advanced to the end of the list.
+ The iterator is not advanced if the specified status is fatal.
+ If this iterator is already at the end of the list, a fatal status will be generated.
+
+ \param status Status chaining object.
+ */
+ virtual void advance( tStatus& status ) = 0;
+
+ //! Creates an NXT object for the NXT referenced by this iterator.
+ /*
+ Creates an NXT object for the NXT referenced by this iterator. An object is not
+ created if the specified status is fatal or if this iterator refers to the end of
+ the list. The returned iNXT object should be destroyed using the iNXT::destroyNXT
+ method.
+
+ \param status Status chaining object.
+ \return A pointer to the iNXT object that was created.
+ */
+ virtual iNXT* getNXT( tStatus& status ) = 0;
+ };
+
+
+ // constants...
+
+} // namespace nFANTOM100
+
+
+ // declarations for globally-scoped globals...
+
+ // typedefs
+ typedef ViObject nFANTOM100_iNXTIterator;
+
+ // we must duplicate this typedef for the getNXT C wrapper
+ typedef ViObject nFANTOM100_iNXT;
+
+ extern "C"
+ {
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXTIterator_getName(
+ nFANTOM100_iNXTIterator iteratorPtr,
+ ViChar resourceName[],
+ ViStatus* status );
+
+ nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXTIterator_advance(
+ nFANTOM100_iNXTIterator iteratorPtr,
+ ViStatus* status );
+
+ nFANTOM100_kExport nFANTOM100_iNXT _VI_FUNCC nFANTOM100_iNXTIterator_getNXT(
+ nFANTOM100_iNXTIterator iteratorPtr,
+ ViStatus* status );
+ }
+
+#endif // ___fantom_iNXTIterator_h___
diff --git a/AT91SAM7S256/armdebug/FantomModule/fantom/platform.h b/AT91SAM7S256/armdebug/FantomModule/fantom/platform.h
new file mode 100644
index 0000000..7455796
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/fantom/platform.h
@@ -0,0 +1,94 @@
+/*!
+ \file platform.h
+ \brief This file contains platform-related defines.
+*/
+/*
+ Copyright 2005,
+ National Instruments Corporation.
+ All rights reserved.
+
+ File: platform.h
+ Originated: 23 June 2005
+*/
+
+
+#ifndef ___fantom_platform_h___
+#define ___fantom_platform_h___
+
+#ifndef __VISATYPE_HEADER__
+ #include "visatype.h"
+#endif
+
+
+#define nFANTOM100_kOSMacOSX 0
+#define nFANTOM100_kOSWin32 0
+
+#define nFANTOM100_kProcessorI386 0
+#define nFANTOM100_kProcessorPPC 0
+
+#define nFANTOM100_kCompilerMSVC 0
+#define nFANTOM100_kCompilerApple 0
+
+
+#if (( defined( __GNUG__ ) || defined( __GNUC__ )) && defined( __APPLE__ ))
+
+ #undef nFANTOM100_kOSMacOSX
+ #define nFANTOM100_kOSMacOSX 1
+
+ #undef nFANTOM100_kCompilerApple
+ #define nFANTOM100_kCompilerApple ( __GNUC__ * 10000 \
+ + __GNUC_MINOR__ * 100 \
+ + __GNUC_PATCHLEVEL__ )
+
+ #if ( defined( __ppc__ ))
+ #undef nFANTOM100_kProcessorPPC
+ #define nFANTOM100_kProcessorPPC 1
+
+ #define nFANTOM100_kBigEndian 1
+ #define nFANTOM100_kLittleEndian 0
+ #elif ( defined( __i386__ ))
+ #undef nFANTOM100_kProcessorI386
+ #define nFANTOM100_kProcessorI386 1
+
+ #define nFANTOM100_kBigEndian 0
+ #define nFANTOM100_kLittleEndian 1
+ #else
+ #error Unknown processor.
+ #endif
+
+ #ifdef nFANTOM100_kExportSymbols
+ #define nFANTOM100_kExport __attribute__ ((section ("__TEXT,__export")))
+ #else
+ #define nFANTOM100_kExport
+ #endif
+
+
+#elif ( defined( _MSC_VER ) && ( defined( _M_IX86 ) || defined( _M_I86 )))
+
+ #undef nFANTOM100_kOSWin32
+ #define nFANTOM100_kOSWin32 1
+
+ #undef nFANTOM100_kCompilerMSVC
+ #define nFANTOM100_kCompilerMSVC _MSC_VER
+
+ #undef nFANTOM100_kProcessorI386
+ #define nFANTOM100_kProcessorI386 1
+
+ #ifdef nFANTOM100_kExportSymbols
+ #define nFANTOM100_kExport __declspec(dllexport)
+ #else
+ #define nFANTOM100_kExport __declspec(dllimport)
+ #endif
+
+ #define nFANTOM100_kBigEndian 0
+ #define nFANTOM100_kLittleEndian 1
+
+#else
+
+ #error Unknown platform.
+
+#endif
+
+
+#endif // ___fantom_platform_h___
+
diff --git a/AT91SAM7S256/armdebug/FantomModule/fantom/tStatus.h b/AT91SAM7S256/armdebug/FantomModule/fantom/tStatus.h
new file mode 100644
index 0000000..7622c63
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/fantom/tStatus.h
@@ -0,0 +1,458 @@
+/*!
+ \file tStatus.h
+ \brief Status code class
+*/
+/*
+ Copyright 2005-2006,
+ National Instruments Corporation.
+ All rights reserved.
+
+ File: tStatus.h
+ Originated: 10 March 2005
+*/
+
+#ifndef ___fantom_tStatus_h___
+#define ___fantom_tStatus_h___
+
+// includes ...
+
+#ifndef ___fantom_platform_h___
+ #include "platform.h"
+#endif
+
+#include <string.h>
+
+
+// defines...
+
+#define nFANTOM_mLocation __FILE__, __LINE__
+
+#define nFANTOM_ForceToWarning(s) (((s) >= 0 ) ? (s) : -(s))
+#define nFANTOM_ForceToFatal(s) (((s) <= 0 ) ? (s) : -(s))
+
+/*!
+ \brief The namespace for Fantom 1.0.
+*/
+namespace nFANTOM100
+{
+ // forward declarations...
+
+ // typedefs...
+
+ // classes...
+ const ViInt32 kStatusOffset = -142000; // 0xFFFDD550
+ const ViStatus kStatusSuccess = VI_SUCCESS;
+
+ /*!
+ \brief Enumeration of Fantom-specific status codes. NI-VISA status codes may also be
+ returned. These are documented in the NI-VISA Programmer Reference Manual which is
+ available from <http://ni.com/>.
+ */
+ enum tFANTOMStatus
+ {
+ kStatusFirst = (kStatusOffset + 0),
+
+ //! Error: Bluetooth pairing operation failed.
+ //! Warning: You have already paired with that Bluetooth device.
+ kStatusPairingFailed = (kStatusOffset + -5), // 0x54B
+
+ //! Error: Bluetooth search failed.
+ kStatusBluetoothSearchFailed = (kStatusOffset + -6), // 0x54A
+
+ //! Error: System library not found.
+ kStatusSystemLibraryNotFound = (kStatusOffset + -7), // 0x549
+
+ //! Error: Bluetooth unpairing operation failed.
+ kStatusUnpairingFailed = (kStatusOffset + -8), // 0x548
+
+ //! Error: Invalid filename specified.
+ kStatusInvalidFilename = (kStatusOffset + -9), // 0x547
+
+ //! Error: Invalid iterator dereference. (No object to get.)
+ kStatusInvalidIteratorDereference = (kStatusOffset + -10), // 0x546
+
+ //! Error: Resource locking operation failed.
+ kStatusLockOperationFailed = (kStatusOffset + -11), // 0x545
+
+ //! Error: Could not determine the requested size.
+ kStatusSizeUnknown = (kStatusOffset + -12), // 0x544
+
+ //! Error: Cannot open two objects at once.
+ kStatusDuplicateOpen = (kStatusOffset + -13), // 0x543
+
+ //! Error: File is empty.
+ //! Warning: The requested file is empty.
+ kStatusEmptyFile = (kStatusOffset + -14), // 0x542
+
+ //! Error: Firmware download failed.
+ kStatusFirmwareDownloadFailed = (kStatusOffset + -15), // 0x541
+
+ //! Error: Could not locate virtual serial port.
+ kStatusPortNotFound = (kStatusOffset + -16), // 0x540
+
+ //! Error: No more items found.
+ kStatusNoMoreItemsFound = (kStatusOffset + -17), // 0x53F
+
+ //! Error: Too many unconfigured devices.
+ kStatusTooManyUnconfiguredDevices = (kStatusOffset + -18), // 0x53E
+
+ //! Error: Command mismatch in firmware response.
+ kStatusCommandMismatch = (kStatusOffset + -19), // 0x53D
+
+ //! Error: Illegal operation.
+ kStatusIllegalOperation = (kStatusOffset + -20), // 0x53C
+
+ //! Error: Could not update local Bluetooth cache with new name.
+ //! Warning: Could not update local Bluetooth cache with new name.
+ kStatusBluetoothCacheUpdateFailed = (kStatusOffset + -21), // 0x53B
+
+ //! Error: Selected device is not an NXT.
+ kStatusNonNXTDeviceSelected = (kStatusOffset + -22), // 0x53A
+
+ //! Error: Communication error. Retry the operation.
+ kStatusRetryConnection = (kStatusOffset + -23), // 0x539
+
+ //! Error: Could not connect to NXT. Turn the NXT off and then back on before continuing.
+ kStatusPowerCycleNXT = (kStatusOffset + -24), // 0x538
+
+ //! Error: This feature is not yet implemented.
+ kStatusFeatureNotImplemented = (kStatusOffset + -99), // 0x4ED
+
+ //! Error: Firmware reported an illegal handle.
+ kStatusFWIllegalHandle = (kStatusOffset + -189), // 0x493
+
+ //! Error: Firmware reported an illegal file name.
+ kStatusFWIllegalFileName = (kStatusOffset + -190), // 0x492
+
+ //! Error: Firmware reported an out of bounds reference.
+ kStatusFWOutOfBounds = (kStatusOffset + -191), // 0x491
+
+ //! Error: Firmware could not find module.
+ kStatusFWModuleNotFound = (kStatusOffset + -192), // 0x490
+
+ //! Error: Firmware reported that the file already exists.
+ kStatusFWFileExists = (kStatusOffset + -193), // 0x48F
+
+ //! Error: Firmware reported that the file is full.
+ kStatusFWFileIsFull = (kStatusOffset + -194), // 0x48E
+
+ //! Error: Firmware reported the append operation is not possible.
+ kStatusFWAppendNotPossible = (kStatusOffset + -195), // 0x48D
+
+ //! Error: Firmware has no write buffers available.
+ kStatusFWNoWriteBuffers = (kStatusOffset + -196), // 0x48C
+
+ //! Error: Firmware reported that file is busy.
+ kStatusFWFileIsBusy = (kStatusOffset + -197), // 0x48B
+
+ //! Error: Firmware reported the undefined error.
+ kStatusFWUndefinedError = (kStatusOffset + -198), // 0x48A
+
+ //! Error: Firmware reported that no linear space is available.
+ kStatusFWNoLinearSpace = (kStatusOffset + -199), // 0x489
+
+ //! Error: Firmware reported that handle has already been closed.
+ kStatusFWHandleAlreadyClosed = (kStatusOffset + -200), // 0x488
+
+ //! Error: Firmware could not find file.
+ kStatusFWFileNotFound = (kStatusOffset + -201), // 0x487
+
+ //! Error: Firmware reported that the requested file is not linear.
+ kStatusFWNotLinearFile = (kStatusOffset + -202), // 0x486
+
+ //! Error: Firmware reached the end of the file.
+ kStatusFWEndOfFile = (kStatusOffset + -203), // 0x485
+
+ //! Error: Firmware expected an end of file.
+ kStatusFWEndOfFileExpected = (kStatusOffset + -204), // 0x484
+
+ //! Error: Firmware cannot handle more files.
+ kStatusFWNoMoreFiles = (kStatusOffset + -205), // 0x483
+
+ //! Error: Firmware reported the NXT is out of space.
+ kStatusFWNoSpace = (kStatusOffset + -206), // 0x482
+
+ //! Error: Firmware could not create a handle.
+ kStatusFWNoMoreHandles = (kStatusOffset + -207), // 0x481
+
+ //! Error: Firmware reported an unknown error code.
+ kStatusFWUnknownErrorCode = (kStatusOffset + -208), // 0x480
+
+ kStatusLast = (kStatusOffset + -999)
+ };
+
+ /*!
+ \brief Class that contains a status code and the file name and line number where that
+ status code was generated.
+ */
+ class tStatus
+ {
+ public:
+
+ // methods
+
+ //! constructor
+ /*!
+ Creates a tStatus object intialized to success.
+
+ \post The status code is set to VI_SUCCESS.
+ */
+ inline tStatus( void ) :
+ _code( VI_SUCCESS ),
+ _lineNumber( 0 )
+ {
+ _fileName[0] = '\0';
+ }
+
+
+ //! copy constructor
+ /*!
+ Copies the code, line number, and file name from the specified tStatus object.
+
+ \param status The status object to copy.
+ */
+ inline tStatus( const tStatus& status ) :
+ _code( status._code ),
+ _lineNumber( status._lineNumber )
+ {
+ ::strcpy( _fileName, "" );
+ ::strncat( _fileName, status._fileName, kMaxFileNameLength - 1 );
+ }
+
+
+ //! constructor with code, filename, and line number
+ /*!
+ Creates a tStatus object initialized to the specified code, file name, and line number.
+ Note that the nFANTOM_mLocation macro can be used to pass the fileName and lineNumber
+ parameters.
+
+ \param code A status code.
+ \param fileName The name of the file in which the status code was generated.
+ \param lineNumber The line number in the file at which the status code was generated.
+ */
+ inline tStatus( ViStatus code, const char* fileName, ViUInt32 lineNumber ) :
+ _code( code ),
+ _lineNumber( lineNumber )
+ {
+ ::strcpy( _fileName, "" );
+ ::strncat( _fileName, reinterpret_cast<const char*>( fileName ), kMaxFileNameLength - 1 );
+ }
+
+
+ //! destructor
+ inline ~tStatus()
+ {
+ }
+
+
+ //! Returns the status code for this status object.
+ /*!
+ \return The status code for this status object.
+ */
+ inline ViStatus getCode( void ) const
+ {
+ return _code;
+ }
+
+
+ //! Returns the file name in which the status code, for this status object, was generated.
+ /*!
+ \return The file name in which the status code, for this status object, was generated.
+ */
+ inline const char* getFileName( void ) const
+ {
+ return _fileName;
+ }
+
+
+ //! Returns the line number at which the status code, for this status object, was
+ // generated.
+ /*!
+ \return The line number at which the status code, for this status object, was
+ generated.
+ */
+ inline ViUInt32 getLineNumber( void ) const
+ {
+ return _lineNumber;
+ }
+
+
+ //! Sets the status code, file name, and line number for this status object, if
+ // appropriate.
+ /*!
+ Stores the specified status code, file name, and line number in this status object if
+ this status object contains a successful status code or if this status object
+ contains a warning status code and the specified status code is fatal. A fatal
+ status code is denoted by a negative value. A successful status code is denoted
+ by VI_SUCCESS.
+
+ \param code A status code.
+ \param fileName The name of the file in which the status code was generated.
+ \param lineNumber The line number in the file at which the status code was generated.
+ */
+ inline void setCode( ViStatus code, const char* fileName, ViUInt32 lineNumber )
+ {
+ if(( isSuccess() && code != VI_SUCCESS ) || ( isNotFatal() && code < VI_SUCCESS ))
+ {
+ _code = code;
+ _lineNumber = lineNumber;
+ ::strcpy( _fileName, "" );
+ ::strncat( _fileName, fileName, kMaxFileNameLength - 1 );
+ }
+ }
+
+
+ //! Assigns the specified status object to this status object, if appropriate.
+ /*!
+ Stores the status code, file name, and line number of the specified status object in
+ this status object if this status object contains a successful status code or if
+ this status object contains a warning status code and the status code of the
+ speciied status object is fatal. A fatal status code is denoted by a negative
+ value. A successful status code is denoted by VI_SUCCESS.
+
+ \param status The status object to assign.
+ */
+ inline void assign( const tStatus& status )
+ {
+ setCode( status.getCode(), status.getFileName(), status.getLineNumber());
+ }
+
+
+ //! Clears the status code for this status object.
+ /*!
+ \post status The code is set to VI_SUCCESS.
+ */
+ inline void clear( void )
+ {
+ _code = VI_SUCCESS;
+ _lineNumber = 0;
+ _fileName[0] = '\0';
+ }
+
+
+ //! Returns true if this status object contains a status code that is fatal.
+ /*!
+ A status code with a negative value is considered fatal.
+
+ \return true if this status object contains a status code that is
+ fatal; false otherwise.
+ */
+ inline bool isFatal( void ) const
+ {
+ return ( _code < VI_SUCCESS );
+ }
+
+ //! Returns true if this status object contains a status code that is not fatal.
+ /*!
+ Any status code with a non-negative (including zero) value is considered non-fatal.
+
+ \return true if this status object contains a non-fatal status code;
+ false otherwise.
+ */
+ inline bool isNotFatal( void ) const
+ {
+ return !isFatal();
+ }
+
+
+ //! Returns true if this status object contains a status code that is a warning.
+ /*!
+ A status code with a non-zero, positive value is considered a warning.
+
+ \return true if this status object contains a status code that is a warning; false
+ otherwise.
+ */
+ inline bool isWarning( void ) const
+ {
+ return ( _code > VI_SUCCESS );
+ }
+
+
+ //! Returns true if this status object contains the status code for success.
+ /*!
+ A value of VI_SUCCESS represents success.
+
+ \return true if this status object contains the status code for success; false
+ otherwise.
+ */
+ inline bool isSuccess( void ) const
+ {
+ return ( _code == VI_SUCCESS );
+ }
+
+ private:
+
+ // declared private to prevent assignment
+ tStatus& operator=(const tStatus& rhs);
+
+ enum
+ {
+ kMaxFileNameLength = 101
+ };
+
+ ViStatus _code;
+ ViChar _fileName[ kMaxFileNameLength ];
+ ViUInt32 _lineNumber;
+ };
+
+
+ // declarations for globally-scoped globals...
+ inline ViStatus convertStatus( ViUInt8 firmwareStatus )
+ {
+ ViStatus status;
+ switch (firmwareStatus)
+ {
+ // each of these cases corresponds to a unique status code returned by the firmware
+ case 0x00 : status = kStatusSuccess;
+ break;
+ case 0x81 : status = kStatusFWNoMoreHandles; // No more available handles
+ break;
+ case 0x82 : status = kStatusFWNoSpace; // No space
+ break;
+ case 0x83 : status = kStatusFWNoMoreFiles; // No more files
+ break;
+ case 0x84 : status = kStatusFWEndOfFileExpected; // End of file expected
+ break;
+ case 0x85 : status = kStatusFWEndOfFile; // End of file reached
+ break;
+ case 0x86 : status = kStatusFWNotLinearFile; // Not a linear file
+ break;
+ case 0x87 : status = kStatusFWFileNotFound; // File not found
+ break;
+ case 0x88 : status = kStatusFWHandleAlreadyClosed; // Handle is already closed
+ break;
+ case 0x89 : status = kStatusFWNoLinearSpace; // No linear space available
+ break;
+ case 0x8A : status = kStatusFWUndefinedError; // Undefined error
+ break;
+ case 0x8B : status = kStatusFWFileIsBusy; // File is busy
+ break;
+ case 0x8C : status = kStatusFWNoWriteBuffers; // No write buffers available
+ break;
+ case 0x8D : status = kStatusFWAppendNotPossible; // Append not possible
+ break;
+ case 0x8E : status = kStatusFWFileIsFull; // File is full
+ break;
+ case 0x8F : status = kStatusFWFileExists; // File already exists
+ break;
+ case 0x90 : status = kStatusFWModuleNotFound; // Module not found
+ break;
+ case 0x91 : status = kStatusFWOutOfBounds; // Out of module I/O map boundary
+ break;
+ case 0x92 : status = kStatusFWIllegalFileName; // Illegal file name
+ break;
+ case 0x93 : status = kStatusFWIllegalHandle; // Illegal handle
+ break;
+ default :
+ status = kStatusFWUnknownErrorCode;
+ }
+ return status;
+ }
+
+ // prototypes...
+
+} // namespace nFANTOM100
+
+// inline functions and function macros...
+
+#endif // ___fantom_tStatus_h___
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/advanceFileIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/advanceFileIterator.vi
new file mode 100644
index 0000000..427df5b
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/advanceFileIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/advanceModuleIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/advanceModuleIterator.vi
new file mode 100644
index 0000000..46617f5
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/advanceModuleIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/advanceNXTIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/advanceNXTIterator.vi
new file mode 100644
index 0000000..e223afd
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/advanceNXTIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/bluetoothFactoryReset.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/bluetoothFactoryReset.vi
new file mode 100644
index 0000000..d821675
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/bluetoothFactoryReset.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/bootSamba.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/bootSamba.vi
new file mode 100644
index 0000000..a1bf225
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/bootSamba.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/closeFile.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/closeFile.vi
new file mode 100644
index 0000000..f5b1e12
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/closeFile.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/createFile.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/createFile.vi
new file mode 100644
index 0000000..b3442ac
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/createFile.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/createFileIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/createFileIterator.vi
new file mode 100644
index 0000000..4ad1d34
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/createFileIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/createModule.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/createModule.vi
new file mode 100644
index 0000000..bd1f3e8
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/createModule.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/createModuleIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/createModuleIterator.vi
new file mode 100644
index 0000000..051e858
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/createModuleIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/createNXT.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/createNXT.vi
new file mode 100644
index 0000000..bb38bb8
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/createNXT.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/createNXTIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/createNXTIterator.vi
new file mode 100644
index 0000000..2827435
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/createNXTIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/destroyFile.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/destroyFile.vi
new file mode 100644
index 0000000..a57aea3
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/destroyFile.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/destroyFileIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/destroyFileIterator.vi
new file mode 100644
index 0000000..0010789
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/destroyFileIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/destroyModule.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/destroyModule.vi
new file mode 100644
index 0000000..66af71f
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/destroyModule.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/destroyModuleIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/destroyModuleIterator.vi
new file mode 100644
index 0000000..c0a4b9a
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/destroyModuleIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/destroyNXT.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/destroyNXT.vi
new file mode 100644
index 0000000..3065055
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/destroyNXT.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/destroyNXTIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/destroyNXTIterator.vi
new file mode 100644
index 0000000..f763b9a
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/destroyNXTIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/downloadFirmware.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/downloadFirmware.vi
new file mode 100644
index 0000000..d0c082b
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/downloadFirmware.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/eraseUserFlash.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/eraseUserFlash.vi
new file mode 100644
index 0000000..4961a39
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/eraseUserFlash.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/findDeviceInFirmwareDownloadMode.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/findDeviceInFirmwareDownloadMode.vi
new file mode 100644
index 0000000..44bfc91
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/findDeviceInFirmwareDownloadMode.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/findNXT.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/findNXT.vi
new file mode 100644
index 0000000..78b9034
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/findNXT.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getAvailableSize.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getAvailableSize.vi
new file mode 100644
index 0000000..c6f2be6
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getAvailableSize.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getDeviceInfo.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getDeviceInfo.vi
new file mode 100644
index 0000000..1fbc025
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getDeviceInfo.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getFile.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getFile.vi
new file mode 100644
index 0000000..6a31965
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getFile.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getFileName.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getFileName.vi
new file mode 100644
index 0000000..b5d7724
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getFileName.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getFileSize.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getFileSize.vi
new file mode 100644
index 0000000..d0d18dc
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getFileSize.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getFileSizeFromIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getFileSizeFromIterator.vi
new file mode 100644
index 0000000..b9ee459
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getFileSizeFromIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getFilenameFromIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getFilenameFromIterator.vi
new file mode 100644
index 0000000..f389374
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getFilenameFromIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getFirmwareVersion.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getFirmwareVersion.vi
new file mode 100644
index 0000000..d31e7b1
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getFirmwareVersion.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getIOMapSize.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getIOMapSize.vi
new file mode 100644
index 0000000..b85503e
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getIOMapSize.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getModule.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getModule.vi
new file mode 100644
index 0000000..c7aa164
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getModule.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getModuleID.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getModuleID.vi
new file mode 100644
index 0000000..c361683
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getModuleID.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getModuleName.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getModuleName.vi
new file mode 100644
index 0000000..1e677ac
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getModuleName.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getModuleNameFromIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getModuleNameFromIterator.vi
new file mode 100644
index 0000000..f398170
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getModuleNameFromIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getModuleSize.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getModuleSize.vi
new file mode 100644
index 0000000..504956b
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getModuleSize.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getNXTFromIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getNXTFromIterator.vi
new file mode 100644
index 0000000..8301df2
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getNXTFromIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getResourceString.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getResourceString.vi
new file mode 100644
index 0000000..55f8fe7
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getResourceString.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getStringFromNXTIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getStringFromNXTIterator.vi
new file mode 100644
index 0000000..9f97c2a
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/getStringFromNXTIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/isPaired.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/isPaired.vi
new file mode 100644
index 0000000..a2f9602
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/isPaired.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/nakedRead.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/nakedRead.vi
new file mode 100644
index 0000000..00a43de
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/nakedRead.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/nakedWrite.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/nakedWrite.vi
new file mode 100644
index 0000000..01bd8e1
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/nakedWrite.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/nxt.ctl b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/nxt.ctl
new file mode 100644
index 0000000..2f06605
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/nxt.ctl
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/openForRead.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/openForRead.vi
new file mode 100644
index 0000000..74dd60b
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/openForRead.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/openForWrite.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/openForWrite.vi
new file mode 100644
index 0000000..180bd70
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/openForWrite.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/pairBluetooth.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/pairBluetooth.vi
new file mode 100644
index 0000000..1845031
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/pairBluetooth.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/pollAvailableLength.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/pollAvailableLength.vi
new file mode 100644
index 0000000..0b74f5d
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/pollAvailableLength.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/read.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/read.vi
new file mode 100644
index 0000000..9cf87a4
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/read.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/readBufferData.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/readBufferData.vi
new file mode 100644
index 0000000..1ebef92
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/readBufferData.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/readIOMap.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/readIOMap.vi
new file mode 100644
index 0000000..be244b0
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/readIOMap.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/remove.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/remove.vi
new file mode 100644
index 0000000..4216b11
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/remove.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/sendDirectCommand.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/sendDirectCommand.vi
new file mode 100644
index 0000000..c7694ca
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/sendDirectCommand.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/setNXTName.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/setNXTName.vi
new file mode 100644
index 0000000..19339d2
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/setNXTName.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/unpairBluetooth.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/unpairBluetooth.vi
new file mode 100644
index 0000000..c2e3b7c
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/unpairBluetooth.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/write.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/write.vi
new file mode 100644
index 0000000..9f556a0
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/write.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/writeIOMap.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/writeIOMap.vi
new file mode 100644
index 0000000..dda451b
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/macosx/writeIOMap.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/advanceFileIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/advanceFileIterator.vi
new file mode 100644
index 0000000..19fc124
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/advanceFileIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/advanceModuleIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/advanceModuleIterator.vi
new file mode 100644
index 0000000..b9879c7
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/advanceModuleIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/advanceNXTIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/advanceNXTIterator.vi
new file mode 100644
index 0000000..a0fe1f1
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/advanceNXTIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/bluetoothFactoryReset.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/bluetoothFactoryReset.vi
new file mode 100644
index 0000000..0f9c6a8
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/bluetoothFactoryReset.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/bootSamba.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/bootSamba.vi
new file mode 100644
index 0000000..397a119
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/bootSamba.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/closeFile.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/closeFile.vi
new file mode 100644
index 0000000..3e893e7
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/closeFile.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/createFile.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/createFile.vi
new file mode 100644
index 0000000..1445f12
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/createFile.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/createFileIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/createFileIterator.vi
new file mode 100644
index 0000000..5554f4b
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/createFileIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/createModule.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/createModule.vi
new file mode 100644
index 0000000..b640ae7
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/createModule.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/createModuleIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/createModuleIterator.vi
new file mode 100644
index 0000000..fd79dba
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/createModuleIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/createNXT.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/createNXT.vi
new file mode 100644
index 0000000..47b3243
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/createNXT.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/createNXTIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/createNXTIterator.vi
new file mode 100644
index 0000000..c6f8f24
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/createNXTIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/destroyFile.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/destroyFile.vi
new file mode 100644
index 0000000..c71a99a
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/destroyFile.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/destroyFileIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/destroyFileIterator.vi
new file mode 100644
index 0000000..783c4f4
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/destroyFileIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/destroyModule.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/destroyModule.vi
new file mode 100644
index 0000000..0cf7fb7
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/destroyModule.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/destroyModuleIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/destroyModuleIterator.vi
new file mode 100644
index 0000000..5e40e7e
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/destroyModuleIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/destroyNXT.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/destroyNXT.vi
new file mode 100644
index 0000000..42409c3
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/destroyNXT.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/destroyNXTIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/destroyNXTIterator.vi
new file mode 100644
index 0000000..b9a9113
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/destroyNXTIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/downloadFirmware.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/downloadFirmware.vi
new file mode 100644
index 0000000..cf95da4
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/downloadFirmware.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/eraseUserFlash.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/eraseUserFlash.vi
new file mode 100644
index 0000000..d3c9154
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/eraseUserFlash.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/findDeviceInFirmwareDownloadMode.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/findDeviceInFirmwareDownloadMode.vi
new file mode 100644
index 0000000..4a0b7c6
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/findDeviceInFirmwareDownloadMode.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/findNXT.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/findNXT.vi
new file mode 100644
index 0000000..747c8cd
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/findNXT.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getAvailableSize.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getAvailableSize.vi
new file mode 100644
index 0000000..b511b2d
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getAvailableSize.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getDeviceInfo.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getDeviceInfo.vi
new file mode 100644
index 0000000..835046a
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getDeviceInfo.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getFile.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getFile.vi
new file mode 100644
index 0000000..2931da1
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getFile.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getFileName.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getFileName.vi
new file mode 100644
index 0000000..40ec334
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getFileName.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getFileSize.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getFileSize.vi
new file mode 100644
index 0000000..3ba069e
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getFileSize.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getFileSizeFromIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getFileSizeFromIterator.vi
new file mode 100644
index 0000000..9228800
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getFileSizeFromIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getFilenameFromIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getFilenameFromIterator.vi
new file mode 100644
index 0000000..bbbf882
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getFilenameFromIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getFirmwareVersion.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getFirmwareVersion.vi
new file mode 100644
index 0000000..38760ac
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getFirmwareVersion.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getIOMapSize.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getIOMapSize.vi
new file mode 100644
index 0000000..adf1396
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getIOMapSize.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getModule.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getModule.vi
new file mode 100644
index 0000000..eeff3c8
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getModule.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getModuleID.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getModuleID.vi
new file mode 100644
index 0000000..2250164
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getModuleID.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getModuleName.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getModuleName.vi
new file mode 100644
index 0000000..b0620c8
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getModuleName.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getModuleNameFromIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getModuleNameFromIterator.vi
new file mode 100644
index 0000000..f0e31ce
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getModuleNameFromIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getModuleSize.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getModuleSize.vi
new file mode 100644
index 0000000..1b2a5f6
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getModuleSize.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getNXTFromIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getNXTFromIterator.vi
new file mode 100644
index 0000000..8acd597
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getNXTFromIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getResourceString.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getResourceString.vi
new file mode 100644
index 0000000..c0d019a
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getResourceString.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getStringFromNXTIterator.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getStringFromNXTIterator.vi
new file mode 100644
index 0000000..8dee827
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/getStringFromNXTIterator.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/isPaired.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/isPaired.vi
new file mode 100644
index 0000000..1c73992
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/isPaired.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/nakedRead.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/nakedRead.vi
new file mode 100644
index 0000000..9c40980
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/nakedRead.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/nakedWrite.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/nakedWrite.vi
new file mode 100644
index 0000000..f2f875a
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/nakedWrite.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/nxt.ctl b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/nxt.ctl
new file mode 100644
index 0000000..6016dd1
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/nxt.ctl
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/openForRead.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/openForRead.vi
new file mode 100644
index 0000000..48d08e5
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/openForRead.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/openForWrite.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/openForWrite.vi
new file mode 100644
index 0000000..e5d83c8
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/openForWrite.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/pairBluetooth.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/pairBluetooth.vi
new file mode 100644
index 0000000..52fb06a
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/pairBluetooth.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/pollAvailableLength.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/pollAvailableLength.vi
new file mode 100644
index 0000000..6d05f67
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/pollAvailableLength.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/read.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/read.vi
new file mode 100644
index 0000000..c20cab9
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/read.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/readBufferData.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/readBufferData.vi
new file mode 100644
index 0000000..6b621d8
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/readBufferData.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/readIOMap.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/readIOMap.vi
new file mode 100644
index 0000000..9d89134
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/readIOMap.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/remove.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/remove.vi
new file mode 100644
index 0000000..9870267
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/remove.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/sendDirectCommand.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/sendDirectCommand.vi
new file mode 100644
index 0000000..dba13c6
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/sendDirectCommand.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/setNXTName.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/setNXTName.vi
new file mode 100644
index 0000000..65aa4ac
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/setNXTName.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/unpairBluetooth.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/unpairBluetooth.vi
new file mode 100644
index 0000000..9389c36
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/unpairBluetooth.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/write.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/write.vi
new file mode 100644
index 0000000..d6f95d9
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/write.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/writeIOMap.vi b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/writeIOMap.vi
new file mode 100644
index 0000000..621546c
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/include/labview/win32/writeIOMap.vi
Binary files differ
diff --git a/AT91SAM7S256/armdebug/FantomModule/pyfantom/__init__.py b/AT91SAM7S256/armdebug/FantomModule/pyfantom/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/pyfantom/__init__.py
diff --git a/AT91SAM7S256/armdebug/FantomModule/setup.py b/AT91SAM7S256/armdebug/FantomModule/setup.py
new file mode 100644
index 0000000..e713d2f
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/setup.py
@@ -0,0 +1,40 @@
+from distutils.core import setup, Extension
+import sys
+import os
+
+def getextensions():
+ mac_ext = Extension("FantomModule",
+ define_macros=[('PYFANTOM_DEBUG', '0')], # set to '1' to print debug messges
+ include_dirs=['.'],
+ extra_compile_args=["-Wno-strict-prototypes"],
+ extra_link_args=["-framework Fantom"],
+ sources=["FantomModule.cpp"]
+ )
+ return [mac_ext]
+
+# Must specify i386 arch via environment variable since Fantom libraries are i386 only
+# Order of gcc flags is important, it can't be specified via Extension() module
+os.environ['ARCHFLAGS'] = '-arch i386'
+
+# install the main library
+setup(name="pyfantom",
+ version="0.1",
+ author="Tat-Chee Wan",
+ author_email="tcwan@cs.usm.my",
+ url="",
+ description="Python Extension to call Fantom Driver",
+ long_description="Python Wrapper for Fantom Driver on Mac OS X.",
+ license="GPL",
+ packages=["pyfantom"],
+ ext_modules=getextensions(),
+ classifiers = [ "Development Status :: 3 - Alpha",
+ "Intended Audience :: Developers",
+ # Need to confirm Fantom / NI-VISA license compatibility
+ # "License :: OSI Approved :: GNU General Public License (GPL)",
+ # "License :: OSI Approved :: GNU General Public License v2",
+ "Programming Language :: C++",
+ "Topic :: Software Development :: Libraries",
+ "Topic :: System :: Networking",
+ "Topic :: Communications",
+ "Operating System :: MacOS :: MacOS X" ]
+ )
diff --git a/AT91SAM7S256/armdebug/FantomModule/visatype.h b/AT91SAM7S256/armdebug/FantomModule/visatype.h
new file mode 100644
index 0000000..a667ff1
--- /dev/null
+++ b/AT91SAM7S256/armdebug/FantomModule/visatype.h
@@ -0,0 +1,155 @@
+/*---------------------------------------------------------------------------*/
+/* Distributed by VXIplug&play Systems Alliance */
+/* */
+/* Do not modify the contents of this file. */
+/*---------------------------------------------------------------------------*/
+/* */
+/* Title : VISATYPE.H */
+/* Date : 08-01-98 */
+/* Purpose : Fundamental VISA data types and macro definitions */
+/* */
+/*---------------------------------------------------------------------------*/
+
+#ifndef __VISATYPE_HEADER__
+#define __VISATYPE_HEADER__
+
+#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)) && !defined(_NI_mswin16_)
+#define _VI_FAR
+#define _VI_FUNC __stdcall
+#define _VI_FUNCC __cdecl
+#define _VI_FUNCH __stdcall
+#define _VI_SIGNED signed
+#elif defined(_CVI_) && defined(_NI_i386_)
+#define _VI_FAR
+#define _VI_FUNC _pascal
+#define _VI_FUNCC
+#define _VI_FUNCH _pascal
+#define _VI_SIGNED signed
+#elif (defined(_WINDOWS) || defined(_Windows)) && !defined(_NI_mswin16_)
+#define _VI_FAR _far
+#define _VI_FUNC _far _pascal _export
+#define _VI_FUNCC _far _cdecl _export
+#define _VI_FUNCH _far _pascal
+#define _VI_SIGNED signed
+#elif (defined(hpux) || defined(__hpux)) && (defined(__cplusplus) || defined(__cplusplus__))
+#define _VI_FAR
+#define _VI_FUNC
+#define _VI_FUNCC
+#define _VI_FUNCH
+#define _VI_SIGNED
+#else
+#define _VI_FAR
+#define _VI_FUNC
+#define _VI_FUNCC
+#define _VI_FUNCH
+#define _VI_SIGNED signed
+#endif
+
+#define _VI_ERROR (-2147483647L-1) /* 0x80000000 */
+#define _VI_PTR _VI_FAR *
+
+/*- VISA Types --------------------------------------------------------------*/
+
+typedef unsigned long ViUInt32;
+typedef ViUInt32 _VI_PTR ViPUInt32;
+typedef ViUInt32 _VI_PTR ViAUInt32;
+
+typedef _VI_SIGNED long ViInt32;
+typedef ViInt32 _VI_PTR ViPInt32;
+typedef ViInt32 _VI_PTR ViAInt32;
+
+typedef unsigned short ViUInt16;
+typedef ViUInt16 _VI_PTR ViPUInt16;
+typedef ViUInt16 _VI_PTR ViAUInt16;
+
+typedef _VI_SIGNED short ViInt16;
+typedef ViInt16 _VI_PTR ViPInt16;
+typedef ViInt16 _VI_PTR ViAInt16;
+
+typedef unsigned char ViUInt8;
+typedef ViUInt8 _VI_PTR ViPUInt8;
+typedef ViUInt8 _VI_PTR ViAUInt8;
+
+typedef _VI_SIGNED char ViInt8;
+typedef ViInt8 _VI_PTR ViPInt8;
+typedef ViInt8 _VI_PTR ViAInt8;
+
+typedef char ViChar;
+typedef ViChar _VI_PTR ViPChar;
+typedef ViChar _VI_PTR ViAChar;
+
+typedef unsigned char ViByte;
+typedef ViByte _VI_PTR ViPByte;
+typedef ViByte _VI_PTR ViAByte;
+
+typedef void _VI_PTR ViAddr;
+typedef ViAddr _VI_PTR ViPAddr;
+typedef ViAddr _VI_PTR ViAAddr;
+
+typedef float ViReal32;
+typedef ViReal32 _VI_PTR ViPReal32;
+typedef ViReal32 _VI_PTR ViAReal32;
+
+typedef double ViReal64;
+typedef ViReal64 _VI_PTR ViPReal64;
+typedef ViReal64 _VI_PTR ViAReal64;
+
+typedef ViPByte ViBuf;
+typedef ViPByte ViPBuf;
+typedef ViPByte _VI_PTR ViABuf;
+
+typedef ViPChar ViString;
+typedef ViPChar ViPString;
+typedef ViPChar _VI_PTR ViAString;
+
+typedef ViString ViRsrc;
+typedef ViString ViPRsrc;
+typedef ViString _VI_PTR ViARsrc;
+
+typedef ViUInt16 ViBoolean;
+typedef ViBoolean _VI_PTR ViPBoolean;
+typedef ViBoolean _VI_PTR ViABoolean;
+
+typedef ViInt32 ViStatus;
+typedef ViStatus _VI_PTR ViPStatus;
+typedef ViStatus _VI_PTR ViAStatus;
+
+typedef ViUInt32 ViVersion;
+typedef ViVersion _VI_PTR ViPVersion;
+typedef ViVersion _VI_PTR ViAVersion;
+
+typedef ViUInt32 ViObject;
+typedef ViObject _VI_PTR ViPObject;
+typedef ViObject _VI_PTR ViAObject;
+
+typedef ViObject ViSession;
+typedef ViSession _VI_PTR ViPSession;
+typedef ViSession _VI_PTR ViASession;
+
+typedef ViUInt32 ViAttr;
+
+#ifndef _VI_CONST_STRING_DEFINED
+typedef const ViChar * ViConstString;
+#define _VI_CONST_STRING_DEFINED
+#endif
+
+/*- Completion and Error Codes ----------------------------------------------*/
+
+#define VI_SUCCESS (0L)
+
+/*- Other VISA Definitions --------------------------------------------------*/
+
+#define VI_NULL (0)
+
+#define VI_TRUE (1)
+#define VI_FALSE (0)
+
+/*- Backward Compatibility Macros -------------------------------------------*/
+
+#define VISAFN _VI_FUNC
+#define ViPtr _VI_PTR
+
+#endif
+
+/*- The End -----------------------------------------------------------------*/
+