aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Delmar Davis <don@suspectdevices.com>2012-06-04 17:32:47 -0700
committerDonald Delmar Davis <don@suspectdevices.com>2012-06-04 17:32:47 -0700
commitacb51df95fe41acac1f164bc3584275d003aaf4a (patch)
treeeed52bf3c6facadd81b9ae473956952c71a4437d
parentaf012d2ceaf9175eff7d9c470a8af5035a4c73c4 (diff)
Initial Add of Cache and Carry firmware.
-rw-r--r--Makefile186
-rw-r--r--build-targets.mk42
-rw-r--r--cacheandcarry.xcodeproj/don.mode1v31586
-rw-r--r--cacheandcarry.xcodeproj/don.pbxuser543
-rw-r--r--cacheandcarry.xcodeproj/project.pbxproj314
-rw-r--r--cacheandcarry.xcodeproj/project.xcworkspace/contents.xcworkspacedata7
-rw-r--r--cacheandcarry.xcodeproj/project.xcworkspace/xcuserdata/don.xcuserdatad/UserInterfaceState.xcuserstatebin0 -> 26770 bytes
-rw-r--r--cacheandcarry.xcodeproj/project.xcworkspace/xcuserdata/don.xcuserdatad/WorkspaceSettings.xcsettings10
-rw-r--r--cacheandcarry.xcodeproj/xcuserdata/don.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist31
-rw-r--r--cacheandcarry.xcodeproj/xcuserdata/don.xcuserdatad/xcschemes/Debug.xcscheme58
-rw-r--r--cacheandcarry.xcodeproj/xcuserdata/don.xcuserdatad/xcschemes/Make.xcscheme58
-rw-r--r--cacheandcarry.xcodeproj/xcuserdata/don.xcuserdatad/xcschemes/Program.xcscheme58
-rw-r--r--cacheandcarry.xcodeproj/xcuserdata/don.xcuserdatad/xcschemes/xcschememanagement.plist42
-rw-r--r--main.cpp890
14 files changed, 3825 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..fb90058
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,186 @@
+# Try "make help" first
+
+.DEFAULT_GOAL := sketch
+
+##
+## Useful paths, constants, etc.
+##
+
+ifeq ($(LIB_MAPLE_HOME),)
+SRCROOT := ../../libmaple
+else
+SRCROOT := $(LIB_MAPLE_HOME)
+endif
+BUILD_PATH = build
+LIBMAPLE_PATH := $(SRCROOT)/libmaple
+WIRISH_PATH := $(SRCROOT)/wirish
+SUPPORT_PATH := $(SRCROOT)/support
+# Support files for linker
+LDDIR := $(SUPPORT_PATH)/ld
+# Support files for this Makefile
+MAKEDIR := $(SUPPORT_PATH)/make
+
+# USB ID for DFU upload
+VENDOR_ID := 1EAF
+PRODUCT_ID := 0003
+
+##
+## Target-specific configuration. This determines some compiler and
+## linker options/flags.
+##
+
+# Try "make help" for more information on BOARD and MEMORY_TARGET;
+# these default to a Maple Flash build.
+BOARD ?= maple
+MEMORY_TARGET ?= flash
+
+# $(BOARD)- and $(MEMORY_TARGET)-specific configuration
+include $(MAKEDIR)/target-config.mk
+
+##
+## Compilation flags
+##
+
+GLOBAL_FLAGS := -D$(VECT_BASE_ADDR) \
+ -DBOARD_$(BOARD) -DMCU_$(MCU) \
+ -DERROR_LED_PORT=$(ERROR_LED_PORT) \
+ -DERROR_LED_PIN=$(ERROR_LED_PIN) \
+ -D$(DENSITY)
+GLOBAL_CFLAGS := -Os -g3 -gdwarf-2 -mcpu=cortex-m3 -mthumb -march=armv7-m \
+ -nostdlib -ffunction-sections -fdata-sections \
+ -Wl,--gc-sections $(GLOBAL_FLAGS)
+GLOBAL_CXXFLAGS := -fno-rtti -fno-exceptions -Wall $(GLOBAL_FLAGS)
+GLOBAL_ASFLAGS := -mcpu=cortex-m3 -march=armv7-m -mthumb \
+ -x assembler-with-cpp $(GLOBAL_FLAGS)
+LDFLAGS = -T$(LDDIR)/$(LDSCRIPT) -L$(LDDIR) \
+ -mcpu=cortex-m3 -mthumb -Xlinker \
+ --gc-sections --print-gc-sections --march=armv7-m -Wall
+
+##
+## Build rules and useful templates
+##
+
+include $(SUPPORT_PATH)/make/build-rules.mk
+include $(SUPPORT_PATH)/make/build-templates.mk
+
+##
+## Set all submodules here
+##
+
+# Try to keep LIBMAPLE_MODULES a simply-expanded variable
+ifeq ($(LIBMAPLE_MODULES),)
+ LIBMAPLE_MODULES := $(SRCROOT)/libmaple
+else
+ LIBMAPLE_MODULES += $(SRCROOT)/libmaple
+endif
+LIBMAPLE_MODULES += $(SRCROOT)/wirish
+# Official libraries:
+LIBMAPLE_MODULES += $(SRCROOT)/libraries/Servo
+LIBMAPLE_MODULES += $(SRCROOT)/libraries/LiquidCrystal
+LIBMAPLE_MODULES += $(SRCROOT)/libraries/Wire
+
+# Experimental libraries:
+#LIBMAPLE_MODULES += $(SRCROOT)/libraries/FreeRTOS
+LIBMAPLE_MODULES += $(SRCROOT)/libraries/SDfat
+#LIBMAPLE_MODULES += $(SRCROOT)/libraries/EEPROM
+LIBMAPLE_MODULES += $(SRCROOT)/libraries/RTC
+
+# Call each module's rules.mk:
+$(foreach m,$(LIBMAPLE_MODULES),$(eval $(call LIBMAPLE_MODULE_template,$(m))))
+
+##
+## Targets
+##
+
+# main target
+include $(SRCROOT)/build-targets.mk
+
+.PHONY: install sketch clean help debug cscope tags ctags ram flash jtag doxygen mrproper
+
+# Target upload commands
+UPLOAD_ram := $(SUPPORT_PATH)/scripts/reset.py && \
+ sleep 1 && \
+ $(DFU) -a0 -d $(VENDOR_ID):$(PRODUCT_ID) -D $(BUILD_PATH)/$(BOARD).bin -R
+UPLOAD_flash := which python &&\
+ $(SUPPORT_PATH)/scripts/reset.py && \
+ sleep 1 && \
+ $(DFU) -a1 -d $(VENDOR_ID):$(PRODUCT_ID) -D $(BUILD_PATH)/$(BOARD).bin -R
+UPLOAD_jtag := $(OPENOCD_WRAPPER) flash
+
+# Conditionally upload to whatever the last build was
+install: INSTALL_TARGET = $(shell cat $(BUILD_PATH)/build-type 2>/dev/null)
+install: $(BUILD_PATH)/$(BOARD).bin
+ @echo "Install target:" $(INSTALL_TARGET)
+ $(UPLOAD_$(INSTALL_TARGET))
+
+# Force a rebuild if the target changed
+PREV_BUILD_TYPE = $(shell cat $(BUILD_PATH)/build-type 2>/dev/null)
+build-check:
+ifneq ($(PREV_BUILD_TYPE), $(MEMORY_TARGET))
+ $(shell rm -rf $(BUILD_PATH))
+endif
+
+sketch: build-check MSG_INFO $(BUILD_PATH)/$(BOARD).bin
+
+clean:
+ rm -rf build/../../libmaple
+ rm -rf build
+
+mrproper: clean
+ rm -rf doxygen
+
+help:
+ @echo ""
+ @echo " libmaple Makefile help"
+ @echo " ----------------------"
+ @echo " "
+ @echo " Programming targets:"
+ @echo " sketch: Compile for BOARD to MEMORY_TARGET (default)."
+ @echo " install: Compile and upload code over USB, using Maple bootloader"
+ @echo " "
+ @echo " You *must* set BOARD if not compiling for Maple (e.g."
+ @echo " use BOARD=maple_mini for mini, etc.), and MEMORY_TARGET"
+ @echo " if not compiling to Flash."
+ @echo " "
+ @echo " Valid BOARDs:"
+ @echo " maple, maple_mini, maple_RET6, maple_native"
+ @echo " "
+ @echo " Valid MEMORY_TARGETs (default=flash):"
+ @echo " ram: Compile sketch code to ram"
+ @echo " flash: Compile sketch code to flash"
+ @echo " jtag: Compile sketch code for jtag; overwrites bootloader"
+ @echo " "
+ @echo " Other targets:"
+ @echo " debug: Start OpenOCD gdb server on port 3333, telnet on port 4444"
+ @echo " clean: Remove all build and object files"
+ @echo " help: Show this message"
+ @echo " doxygen: Build Doxygen HTML and XML documentation"
+ @echo " mrproper: Remove all generated files"
+ @echo " "
+
+debug:
+ $(OPENOCD_WRAPPER) debug
+
+cscope:
+ rm -rf *.cscope
+ find . -name '*.[hcS]' -o -name '*.cpp' | xargs cscope -b
+
+tags:
+ etags `find . -name "*.c" -o -name "*.cpp" -o -name "*.h"`
+ @echo "Made TAGS file for EMACS code browsing"
+
+ctags:
+ ctags-exuberant -R .
+ @echo "Made tags file for VIM code browsing"
+
+ram:
+ @$(MAKE) MEMORY_TARGET=ram --no-print-directory sketch
+
+flash:
+ @$(MAKE) MEMORY_TARGET=flash --no-print-directory sketch
+
+jtag:
+ @$(MAKE) MEMORY_TARGET=jtag --no-print-directory sketch
+
+doxygen:
+ doxygen $(SUPPORT_PATH)/doxygen/Doxyfile
diff --git a/build-targets.mk b/build-targets.mk
new file mode 100644
index 0000000..fb8edc0
--- /dev/null
+++ b/build-targets.mk
@@ -0,0 +1,42 @@
+# main project target
+$(BUILD_PATH)/main.o: main.cpp
+ $(SILENT_CXX) $(CXX) $(CFLAGS) $(CXXFLAGS) $(LIBMAPLE_INCLUDES) $(WIRISH_INCLUDES) -o $@ -c $<
+
+$(BUILD_PATH)/libmaple.a: $(BUILDDIRS) $(TGT_BIN)
+ - rm -f $@
+ $(AR) crv $(BUILD_PATH)/libmaple.a $(TGT_BIN)
+
+library: $(BUILD_PATH)/libmaple.a
+
+.PHONY: library
+
+$(BUILD_PATH)/$(BOARD).elf: $(BUILDDIRS) $(TGT_BIN) $(BUILD_PATH)/main.o
+ $(SILENT_LD) $(CXX) $(LDFLAGS) -o $@ $(TGT_BIN) $(BUILD_PATH)/main.o -Wl,-Map,$(BUILD_PATH)/$(BOARD).map
+
+$(BUILD_PATH)/$(BOARD).bin: $(BUILD_PATH)/$(BOARD).elf
+ $(SILENT_OBJCOPY) $(OBJCOPY) -v -Obinary $(BUILD_PATH)/$(BOARD).elf $@ 1>/dev/null
+ $(SILENT_DISAS) $(DISAS) -d $(BUILD_PATH)/$(BOARD).elf > $(BUILD_PATH)/$(BOARD).disas
+ @echo " "
+ @echo "Object file sizes:"
+ @find $(BUILD_PATH) -iname *.o | xargs $(SIZE) -t > $(BUILD_PATH)/$(BOARD).sizes
+ @cat $(BUILD_PATH)/$(BOARD).sizes
+ @echo " "
+ @echo "Final Size:"
+ @$(SIZE) $<
+ @echo $(MEMORY_TARGET) > $(BUILD_PATH)/build-type
+
+$(BUILDDIRS):
+ @mkdir -p $@
+
+MSG_INFO:
+ @echo "================================================================================"
+ @echo ""
+ @echo " Build info:"
+ @echo " BOARD: " $(BOARD)
+ @echo " MCU: " $(MCU)
+ @echo " MEMORY_TARGET: " $(MEMORY_TARGET)
+ @echo ""
+ @echo " See 'make help' for all possible targets"
+ @echo ""
+ @echo "================================================================================"
+ @echo ""
diff --git a/cacheandcarry.xcodeproj/don.mode1v3 b/cacheandcarry.xcodeproj/don.mode1v3
new file mode 100644
index 0000000..d3e41bd
--- /dev/null
+++ b/cacheandcarry.xcodeproj/don.mode1v3
@@ -0,0 +1,1586 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>ActivePerspectiveName</key>
+ <string>Project</string>
+ <key>AllowedModules</key>
+ <array>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXSmartGroupTreeModule</string>
+ <key>Name</key>
+ <string>Groups and Files Outline View</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Name</key>
+ <string>Editor</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCTaskListModule</string>
+ <key>Name</key>
+ <string>Task List</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCDetailModule</string>
+ <key>Name</key>
+ <string>File and Smart Group Detail Viewer</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>1</string>
+ <key>Module</key>
+ <string>PBXBuildResultsModule</string>
+ <key>Name</key>
+ <string>Detailed Build Results Viewer</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>1</string>
+ <key>Module</key>
+ <string>PBXProjectFindModule</string>
+ <key>Name</key>
+ <string>Project Batch Find Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCProjectFormatConflictsModule</string>
+ <key>Name</key>
+ <string>Project Format Conflicts List</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXBookmarksModule</string>
+ <key>Name</key>
+ <string>Bookmarks Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXClassBrowserModule</string>
+ <key>Name</key>
+ <string>Class Browser</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXCVSModule</string>
+ <key>Name</key>
+ <string>Source Code Control Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXDebugBreakpointsModule</string>
+ <key>Name</key>
+ <string>Debug Breakpoints Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCDockableInspector</string>
+ <key>Name</key>
+ <string>Inspector</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXOpenQuicklyModule</string>
+ <key>Name</key>
+ <string>Open Quickly Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>1</string>
+ <key>Module</key>
+ <string>PBXDebugSessionModule</string>
+ <key>Name</key>
+ <string>Debugger</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>1</string>
+ <key>Module</key>
+ <string>PBXDebugCLIModule</string>
+ <key>Name</key>
+ <string>Debug Console</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCSnapshotModule</string>
+ <key>Name</key>
+ <string>Snapshots Tool</string>
+ </dict>
+ </array>
+ <key>BundlePath</key>
+ <string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string>
+ <key>Description</key>
+ <string>DefaultDescriptionKey</string>
+ <key>DockingSystemVisible</key>
+ <false/>
+ <key>Extension</key>
+ <string>mode1v3</string>
+ <key>FavBarConfig</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>F606C71C0E36E52600ED6D97</string>
+ <key>XCBarModuleItemNames</key>
+ <dict/>
+ <key>XCBarModuleItems</key>
+ <array/>
+ </dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>com.apple.perspectives.project.mode1v3</string>
+ <key>MajorVersion</key>
+ <integer>33</integer>
+ <key>MinorVersion</key>
+ <integer>0</integer>
+ <key>Name</key>
+ <string>Default</string>
+ <key>Notifications</key>
+ <array/>
+ <key>OpenEditors</key>
+ <array>
+ <dict>
+ <key>Content</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>F6E3B3A61549E44000FCA958</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>main.cpp</string>
+ <key>PBXSplitModuleInNavigatorKey</key>
+ <dict>
+ <key>Split0</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>F6E3B3A71549E44000FCA958</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>main.cpp</string>
+ <key>_historyCapacity</key>
+ <integer>0</integer>
+ <key>bookmark</key>
+ <string>F6EB3681155EE2F5005D1535</string>
+ <key>history</key>
+ <array>
+ <string>F6EB35F6155AE436005D1535</string>
+ </array>
+ </dict>
+ <key>SplitCount</key>
+ <string>1</string>
+ </dict>
+ <key>StatusBarVisibility</key>
+ <true/>
+ </dict>
+ <key>Geometry</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 20}, {962, 710}}</string>
+ <key>PBXModuleWindowStatusBarHidden2</key>
+ <false/>
+ <key>RubberWindowFrame</key>
+ <string>446 127 962 751 0 0 1440 878 </string>
+ </dict>
+ </dict>
+ <dict>
+ <key>Content</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>F6EB359D155A16BA005D1535</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>SdFile.cpp</string>
+ <key>PBXSplitModuleInNavigatorKey</key>
+ <dict>
+ <key>Split0</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>F6EB359E155A16BA005D1535</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>SdFile.cpp</string>
+ <key>_historyCapacity</key>
+ <integer>0</integer>
+ <key>bookmark</key>
+ <string>F6EB3682155EE2F5005D1535</string>
+ <key>history</key>
+ <array>
+ <string>F6EB3597155A1592005D1535</string>
+ </array>
+ </dict>
+ <key>SplitCount</key>
+ <string>1</string>
+ </dict>
+ <key>StatusBarVisibility</key>
+ <true/>
+ </dict>
+ <key>Geometry</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 20}, {993, 624}}</string>
+ <key>PBXModuleWindowStatusBarHidden2</key>
+ <false/>
+ <key>RubberWindowFrame</key>
+ <string>15 208 993 665 0 0 1440 878 </string>
+ </dict>
+ </dict>
+ <dict>
+ <key>Content</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>F66649C1151CFA700040FDB5</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>main.cpp</string>
+ <key>PBXSplitModuleInNavigatorKey</key>
+ <dict>
+ <key>Split0</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>F66649C2151CFA700040FDB5</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>main.cpp</string>
+ <key>_historyCapacity</key>
+ <integer>0</integer>
+ <key>bookmark</key>
+ <string>F6EB3683155EE2F5005D1535</string>
+ <key>history</key>
+ <array>
+ <string>F6E3B62E1557A6CA00FCA958</string>
+ </array>
+ </dict>
+ <key>SplitCount</key>
+ <string>1</string>
+ </dict>
+ <key>StatusBarVisibility</key>
+ <true/>
+ </dict>
+ <key>Geometry</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 20}, {962, 710}}</string>
+ <key>PBXModuleWindowStatusBarHidden2</key>
+ <false/>
+ <key>RubberWindowFrame</key>
+ <string>392 127 962 751 0 0 1440 878 </string>
+ </dict>
+ </dict>
+ <dict>
+ <key>Content</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>F6E3B40E154B764E00FCA958</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>rules.mk</string>
+ <key>PBXSplitModuleInNavigatorKey</key>
+ <dict>
+ <key>Split0</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>F6E3B40F154B764E00FCA958</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>rules.mk</string>
+ <key>_historyCapacity</key>
+ <integer>0</integer>
+ <key>bookmark</key>
+ <string>F6EB3684155EE2F5005D1535</string>
+ <key>history</key>
+ <array>
+ <string>F6E3B62F1557A6CA00FCA958</string>
+ </array>
+ </dict>
+ <key>SplitCount</key>
+ <string>1</string>
+ </dict>
+ <key>StatusBarVisibility</key>
+ <true/>
+ </dict>
+ <key>Geometry</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 20}, {993, 624}}</string>
+ <key>PBXModuleWindowStatusBarHidden2</key>
+ <false/>
+ <key>RubberWindowFrame</key>
+ <string>447 213 993 665 0 0 1440 878 </string>
+ </dict>
+ </dict>
+ <dict>
+ <key>Content</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>F6E3B3A01549E44000FCA958</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>flash_stm32.c</string>
+ <key>PBXSplitModuleInNavigatorKey</key>
+ <dict>
+ <key>Split0</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>F6E3B3A11549E44000FCA958</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>flash_stm32.c</string>
+ <key>_historyCapacity</key>
+ <integer>0</integer>
+ <key>bookmark</key>
+ <string>F6EB3686155EE2F5005D1535</string>
+ <key>history</key>
+ <array>
+ <string>F6E3B6351557A6CA00FCA958</string>
+ </array>
+ </dict>
+ <key>SplitCount</key>
+ <string>1</string>
+ </dict>
+ <key>StatusBarVisibility</key>
+ <true/>
+ </dict>
+ <key>Geometry</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 20}, {993, 624}}</string>
+ <key>PBXModuleWindowStatusBarHidden2</key>
+ <false/>
+ <key>RubberWindowFrame</key>
+ <string>39 188 993 665 0 0 1440 878 </string>
+ </dict>
+ </dict>
+ </array>
+ <key>PerspectiveWidths</key>
+ <array>
+ <integer>-1</integer>
+ <integer>-1</integer>
+ </array>
+ <key>Perspectives</key>
+ <array>
+ <dict>
+ <key>ChosenToolbarItems</key>
+ <array>
+ <string>active-target-popup</string>
+ <string>active-buildstyle-popup</string>
+ <string>action</string>
+ <string>NSToolbarFlexibleSpaceItem</string>
+ <string>buildOrClean</string>
+ <string>com.apple.ide.PBXToolbarStopButton</string>
+ <string>get-info</string>
+ <string>toggle-editor</string>
+ <string>NSToolbarFlexibleSpaceItem</string>
+ <string>com.apple.pbx.toolbar.searchfield</string>
+ </array>
+ <key>ControllerClassBaseName</key>
+ <string></string>
+ <key>IconName</key>
+ <string>WindowOfProjectWithEditor</string>
+ <key>Identifier</key>
+ <string>perspective.project</string>
+ <key>IsVertical</key>
+ <false/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXBottomSmartGroupGIDs</key>
+ <array>
+ <string>1C37FBAC04509CD000000102</string>
+ <string>1C37FAAC04509CD000000102</string>
+ <string>1C37FABC05509CD000000102</string>
+ <string>1C37FABC05539CD112110102</string>
+ <string>E2644B35053B69B200211256</string>
+ <string>1C37FABC04509CD000100104</string>
+ </array>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B1FE06471DED0097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Files</string>
+ <key>PBXProjectStructureProvided</key>
+ <string>yes</string>
+ <key>PBXSmartGroupTreeModuleColumnData</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
+ <array>
+ <real>186</real>
+ </array>
+ <key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
+ <array>
+ <string>MainColumn</string>
+ </array>
+ </dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
+ <array>
+ <string>08FB7794FE84155DC02AAC07</string>
+ <string>08FB7795FE84155DC02AAC07</string>
+ <string>F6EB355C155A113F005D1535</string>
+ <string>F6EB355F155A1193005D1535</string>
+ <string>1C37FBAC04509CD000000102</string>
+ <string>1C37FABC05509CD000000102</string>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
+ <array>
+ <array>
+ <integer>3</integer>
+ <integer>2</integer>
+ <integer>0</integer>
+ </array>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
+ <string>{{0, 0}, {186, 617}}</string>
+ </dict>
+ <key>PBXTopSmartGroupGIDs</key>
+ <array/>
+ <key>XCIncludePerspectivesSwitch</key>
+ <true/>
+ <key>XCSharingToken</key>
+ <string>com.apple.Xcode.GFSharingToken</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {203, 635}}</string>
+ <key>GroupTreeTableConfiguration</key>
+ <array>
+ <string>MainColumn</string>
+ <real>186</real>
+ </array>
+ <key>RubberWindowFrame</key>
+ <string>99 202 1066 676 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXSmartGroupTreeModule</string>
+ <key>Proportion</key>
+ <string>203pt</string>
+ </dict>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <true/>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B20306471E060097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>main.cpp</string>
+ <key>PBXSplitModuleInNavigatorKey</key>
+ <dict>
+ <key>Split0</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B20406471E060097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>main.cpp</string>
+ <key>_historyCapacity</key>
+ <integer>0</integer>
+ <key>bookmark</key>
+ <string>F6EB3680155EE2F5005D1535</string>
+ <key>history</key>
+ <array>
+ <string>F6E83B88153B6F4100A14FCA</string>
+ <string>F6E83B89153B6F4100A14FCA</string>
+ <string>F6EB3553155A1047005D1535</string>
+ <string>F6EB3571155A134D005D1535</string>
+ <string>F6EB359A155A16BA005D1535</string>
+ <string>F6EB35EF155AE436005D1535</string>
+ <string>F6EB35F0155AE436005D1535</string>
+ <string>F6EB35F1155AE436005D1535</string>
+ <string>F6EB35F2155AE436005D1535</string>
+ <string>F6EB35F3155AE436005D1535</string>
+ <string>F6EB367C155EE2F5005D1535</string>
+ <string>F6EB367D155EE2F5005D1535</string>
+ <string>F6EB367F155EE2F5005D1535</string>
+ </array>
+ </dict>
+ <key>SplitCount</key>
+ <string>1</string>
+ </dict>
+ <key>StatusBarVisibility</key>
+ <true/>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {858, 400}}</string>
+ <key>RubberWindowFrame</key>
+ <string>99 202 1066 676 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>400pt</string>
+ </dict>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B20506471E060097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Detail</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 405}, {858, 230}}</string>
+ <key>RubberWindowFrame</key>
+ <string>99 202 1066 676 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>XCDetailModule</string>
+ <key>Proportion</key>
+ <string>230pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>858pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Project</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>XCModuleDock</string>
+ <string>PBXSmartGroupTreeModule</string>
+ <string>XCModuleDock</string>
+ <string>PBXNavigatorGroup</string>
+ <string>XCDetailModule</string>
+ </array>
+ <key>TableOfContents</key>
+ <array>
+ <string>F6EB3546155A04F5005D1535</string>
+ <string>1CE0B1FE06471DED0097A5F4</string>
+ <string>F6EB3547155A04F5005D1535</string>
+ <string>1CE0B20306471E060097A5F4</string>
+ <string>1CE0B20506471E060097A5F4</string>
+ </array>
+ <key>ToolbarConfigUserDefaultsMinorVersion</key>
+ <string>2</string>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.defaultV3</string>
+ </dict>
+ <dict>
+ <key>ControllerClassBaseName</key>
+ <string></string>
+ <key>IconName</key>
+ <string>WindowOfProject</string>
+ <key>Identifier</key>
+ <string>perspective.morph</string>
+ <key>IsVertical</key>
+ <integer>0</integer>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <integer>1</integer>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXBottomSmartGroupGIDs</key>
+ <array>
+ <string>1C37FBAC04509CD000000102</string>
+ <string>1C37FAAC04509CD000000102</string>
+ <string>1C08E77C0454961000C914BD</string>
+ <string>1C37FABC05509CD000000102</string>
+ <string>1C37FABC05539CD112110102</string>
+ <string>E2644B35053B69B200211256</string>
+ <string>1C37FABC04509CD000100104</string>
+ <string>1CC0EA4004350EF90044410B</string>
+ <string>1CC0EA4004350EF90041110B</string>
+ </array>
+ <key>PBXProjectModuleGUID</key>
+ <string>11E0B1FE06471DED0097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Files</string>
+ <key>PBXProjectStructureProvided</key>
+ <string>yes</string>
+ <key>PBXSmartGroupTreeModuleColumnData</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
+ <array>
+ <real>186</real>
+ </array>
+ <key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
+ <array>
+ <string>MainColumn</string>
+ </array>
+ </dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
+ <array>
+ <string>29B97314FDCFA39411CA2CEA</string>
+ <string>1C37FABC05509CD000000102</string>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
+ <array>
+ <array>
+ <integer>0</integer>
+ </array>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
+ <string>{{0, 0}, {186, 337}}</string>
+ </dict>
+ <key>PBXTopSmartGroupGIDs</key>
+ <array/>
+ <key>XCIncludePerspectivesSwitch</key>
+ <integer>1</integer>
+ <key>XCSharingToken</key>
+ <string>com.apple.Xcode.GFSharingToken</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {203, 355}}</string>
+ <key>GroupTreeTableConfiguration</key>
+ <array>
+ <string>MainColumn</string>
+ <real>186</real>
+ </array>
+ <key>RubberWindowFrame</key>
+ <string>373 269 690 397 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXSmartGroupTreeModule</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Morph</string>
+ <key>PreferredWidth</key>
+ <integer>300</integer>
+ <key>ServiceClasses</key>
+ <array>
+ <string>XCModuleDock</string>
+ <string>PBXSmartGroupTreeModule</string>
+ </array>
+ <key>TableOfContents</key>
+ <array>
+ <string>11E0B1FE06471DED0097A5F4</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.default.shortV3</string>
+ </dict>
+ </array>
+ <key>PerspectivesBarVisible</key>
+ <false/>
+ <key>ShelfIsVisible</key>
+ <false/>
+ <key>SourceDescription</key>
+ <string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TimeStamp</key>
+ <real>0.0</real>
+ <key>ToolbarDisplayMode</key>
+ <integer>1</integer>
+ <key>ToolbarIsVisible</key>
+ <true/>
+ <key>ToolbarSizeMode</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Perspectives</string>
+ <key>UpdateMessage</key>
+ <string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'?</string>
+ <key>WindowJustification</key>
+ <integer>5</integer>
+ <key>WindowOrderList</key>
+ <array>
+ <string>F6E3B3A01549E44000FCA958</string>
+ <string>F6E3B40E154B764E00FCA958</string>
+ <string>F66649C1151CFA700040FDB5</string>
+ <string>F69C9B0F150BDAC200B4163A</string>
+ <string>F6EB359D155A16BA005D1535</string>
+ <string>/Users/don/Sites/embedded/suspectDevices/xtractSolutions/AMACallHome/Baco-matic5000/programs/datalogger/datalogger.xcodeproj</string>
+ <string>F6E3B3A61549E44000FCA958</string>
+ </array>
+ <key>WindowString</key>
+ <string>99 202 1066 676 0 0 1440 878 </string>
+ <key>WindowToolsV3</key>
+ <array>
+ <dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>windowTool.build</string>
+ <key>IsVertical</key>
+ <true/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CD0528F0623707200166675</string>
+ <key>PBXProjectModuleLabel</key>
+ <string></string>
+ <key>StatusBarVisibility</key>
+ <true/>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {1037, 325}}</string>
+ <key>RubberWindowFrame</key>
+ <string>69 207 1037 607 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>325pt</string>
+ </dict>
+ <dict>
+ <key>BecomeActive</key>
+ <true/>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>XCMainBuildResultsModuleGUID</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Build Results</string>
+ <key>XCBuildResultsTrigger_Collapse</key>
+ <integer>1021</integer>
+ <key>XCBuildResultsTrigger_Open</key>
+ <integer>1011</integer>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 330}, {1037, 236}}</string>
+ <key>RubberWindowFrame</key>
+ <string>69 207 1037 607 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXBuildResultsModule</string>
+ <key>Proportion</key>
+ <string>236pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>566pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Build Results</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXBuildResultsModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TableOfContents</key>
+ <array>
+ <string>F69C9B0F150BDAC200B4163A</string>
+ <string>F6EB354F155A04F5005D1535</string>
+ <string>1CD0528F0623707200166675</string>
+ <string>XCMainBuildResultsModuleGUID</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.buildV3</string>
+ <key>WindowString</key>
+ <string>69 207 1037 607 0 0 1440 878 </string>
+ <key>WindowToolGUID</key>
+ <string>F69C9B0F150BDAC200B4163A</string>
+ <key>WindowToolIsVisible</key>
+ <true/>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.debugger</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>Debugger</key>
+ <dict>
+ <key>HorizontalSplitView</key>
+ <dict>
+ <key>_collapsingFrameDimension</key>
+ <real>0.0</real>
+ <key>_indexOfCollapsedView</key>
+ <integer>0</integer>
+ <key>_percentageOfCollapsedView</key>
+ <real>0.0</real>
+ <key>isCollapsed</key>
+ <string>yes</string>
+ <key>sizes</key>
+ <array>
+ <string>{{0, 0}, {317, 164}}</string>
+ <string>{{317, 0}, {377, 164}}</string>
+ </array>
+ </dict>
+ <key>VerticalSplitView</key>
+ <dict>
+ <key>_collapsingFrameDimension</key>
+ <real>0.0</real>
+ <key>_indexOfCollapsedView</key>
+ <integer>0</integer>
+ <key>_percentageOfCollapsedView</key>
+ <real>0.0</real>
+ <key>isCollapsed</key>
+ <string>yes</string>
+ <key>sizes</key>
+ <array>
+ <string>{{0, 0}, {694, 164}}</string>
+ <string>{{0, 164}, {694, 216}}</string>
+ </array>
+ </dict>
+ </dict>
+ <key>LauncherConfigVersion</key>
+ <string>8</string>
+ <key>PBXProjectModuleGUID</key>
+ <string>1C162984064C10D400B95A72</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Debug - GLUTExamples (Underwater)</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>DebugConsoleDrawerSize</key>
+ <string>{100, 120}</string>
+ <key>DebugConsoleVisible</key>
+ <string>None</string>
+ <key>DebugConsoleWindowFrame</key>
+ <string>{{200, 200}, {500, 300}}</string>
+ <key>DebugSTDIOWindowFrame</key>
+ <string>{{200, 200}, {500, 300}}</string>
+ <key>Frame</key>
+ <string>{{0, 0}, {694, 380}}</string>
+ <key>RubberWindowFrame</key>
+ <string>321 238 694 422 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXDebugSessionModule</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Debugger</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXDebugSessionModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>1</integer>
+ <key>TableOfContents</key>
+ <array>
+ <string>1CD10A99069EF8BA00B06720</string>
+ <string>1C0AD2AB069F1E9B00FABCE6</string>
+ <string>1C162984064C10D400B95A72</string>
+ <string>1C0AD2AC069F1E9B00FABCE6</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.debugV3</string>
+ <key>WindowString</key>
+ <string>321 238 694 422 0 0 1440 878 </string>
+ <key>WindowToolGUID</key>
+ <string>1CD10A99069EF8BA00B06720</string>
+ <key>WindowToolIsVisible</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.find</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CDD528C0622207200134675</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>&lt;No Editor&gt;</string>
+ <key>PBXSplitModuleInNavigatorKey</key>
+ <dict>
+ <key>Split0</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CD0528D0623707200166675</string>
+ </dict>
+ <key>SplitCount</key>
+ <string>1</string>
+ </dict>
+ <key>StatusBarVisibility</key>
+ <integer>1</integer>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {781, 167}}</string>
+ <key>RubberWindowFrame</key>
+ <string>62 385 781 470 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>781pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>50%</string>
+ </dict>
+ <dict>
+ <key>BecomeActive</key>
+ <integer>1</integer>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CD0528E0623707200166675</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Project Find</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{8, 0}, {773, 254}}</string>
+ <key>RubberWindowFrame</key>
+ <string>62 385 781 470 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXProjectFindModule</string>
+ <key>Proportion</key>
+ <string>50%</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>428pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Project Find</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXProjectFindModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>1</integer>
+ <key>TableOfContents</key>
+ <array>
+ <string>1C530D57069F1CE1000CFCEE</string>
+ <string>1C530D58069F1CE1000CFCEE</string>
+ <string>1C530D59069F1CE1000CFCEE</string>
+ <string>1CDD528C0622207200134675</string>
+ <string>1C530D5A069F1CE1000CFCEE</string>
+ <string>1CE0B1FE06471DED0097A5F4</string>
+ <string>1CD0528E0623707200166675</string>
+ </array>
+ <key>WindowString</key>
+ <string>62 385 781 470 0 0 1440 878 </string>
+ <key>WindowToolGUID</key>
+ <string>1C530D57069F1CE1000CFCEE</string>
+ <key>WindowToolIsVisible</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>MENUSEPARATOR</string>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.debuggerConsole</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <integer>1</integer>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1C78EAAC065D492600B07095</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Debugger Console</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {650, 250}}</string>
+ <key>RubberWindowFrame</key>
+ <string>516 632 650 250 0 0 1680 1027 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXDebugCLIModule</string>
+ <key>Proportion</key>
+ <string>209pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>209pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Debugger Console</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXDebugCLIModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>1</integer>
+ <key>TableOfContents</key>
+ <array>
+ <string>1C78EAAD065D492600B07095</string>
+ <string>1C78EAAE065D492600B07095</string>
+ <string>1C78EAAC065D492600B07095</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.consoleV3</string>
+ <key>WindowString</key>
+ <string>650 41 650 250 0 0 1280 1002 </string>
+ <key>WindowToolGUID</key>
+ <string>1C78EAAD065D492600B07095</string>
+ <key>WindowToolIsVisible</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.snapshots</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>Module</key>
+ <string>XCSnapshotModule</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Snapshots</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>XCSnapshotModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <string>Yes</string>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.snapshots</string>
+ <key>WindowString</key>
+ <string>315 824 300 550 0 0 1440 878 </string>
+ <key>WindowToolIsVisible</key>
+ <string>Yes</string>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.scm</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1C78EAB2065D492600B07095</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>&lt;No Editor&gt;</string>
+ <key>PBXSplitModuleInNavigatorKey</key>
+ <dict>
+ <key>Split0</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1C78EAB3065D492600B07095</string>
+ </dict>
+ <key>SplitCount</key>
+ <string>1</string>
+ </dict>
+ <key>StatusBarVisibility</key>
+ <integer>1</integer>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {452, 0}}</string>
+ <key>RubberWindowFrame</key>
+ <string>743 379 452 308 0 0 1280 1002 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>0pt</string>
+ </dict>
+ <dict>
+ <key>BecomeActive</key>
+ <integer>1</integer>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CD052920623707200166675</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>SCM</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>ConsoleFrame</key>
+ <string>{{0, 259}, {452, 0}}</string>
+ <key>Frame</key>
+ <string>{{0, 7}, {452, 259}}</string>
+ <key>RubberWindowFrame</key>
+ <string>743 379 452 308 0 0 1280 1002 </string>
+ <key>TableConfiguration</key>
+ <array>
+ <string>Status</string>
+ <real>30</real>
+ <string>FileName</string>
+ <real>199</real>
+ <string>Path</string>
+ <real>197.0950012207031</real>
+ </array>
+ <key>TableFrame</key>
+ <string>{{0, 0}, {452, 250}}</string>
+ </dict>
+ <key>Module</key>
+ <string>PBXCVSModule</string>
+ <key>Proportion</key>
+ <string>262pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>266pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>SCM</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXCVSModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>1</integer>
+ <key>TableOfContents</key>
+ <array>
+ <string>1C78EAB4065D492600B07095</string>
+ <string>1C78EAB5065D492600B07095</string>
+ <string>1C78EAB2065D492600B07095</string>
+ <string>1CD052920623707200166675</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.scm</string>
+ <key>WindowString</key>
+ <string>743 379 452 308 0 0 1280 1002 </string>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.breakpoints</string>
+ <key>IsVertical</key>
+ <integer>0</integer>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <integer>1</integer>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXBottomSmartGroupGIDs</key>
+ <array>
+ <string>1C77FABC04509CD000000102</string>
+ </array>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B1FE06471DED0097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Files</string>
+ <key>PBXProjectStructureProvided</key>
+ <string>no</string>
+ <key>PBXSmartGroupTreeModuleColumnData</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
+ <array>
+ <real>168</real>
+ </array>
+ <key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
+ <array>
+ <string>MainColumn</string>
+ </array>
+ </dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
+ <array>
+ <string>1C77FABC04509CD000000102</string>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
+ <array>
+ <array>
+ <integer>0</integer>
+ </array>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
+ <string>{{0, 0}, {168, 350}}</string>
+ </dict>
+ <key>PBXTopSmartGroupGIDs</key>
+ <array/>
+ <key>XCIncludePerspectivesSwitch</key>
+ <integer>0</integer>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {185, 368}}</string>
+ <key>GroupTreeTableConfiguration</key>
+ <array>
+ <string>MainColumn</string>
+ <real>168</real>
+ </array>
+ <key>RubberWindowFrame</key>
+ <string>315 424 744 409 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXSmartGroupTreeModule</string>
+ <key>Proportion</key>
+ <string>185pt</string>
+ </dict>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CA1AED706398EBD00589147</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Detail</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{190, 0}, {554, 368}}</string>
+ <key>RubberWindowFrame</key>
+ <string>315 424 744 409 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>XCDetailModule</string>
+ <key>Proportion</key>
+ <string>554pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>368pt</string>
+ </dict>
+ </array>
+ <key>MajorVersion</key>
+ <integer>3</integer>
+ <key>MinorVersion</key>
+ <integer>0</integer>
+ <key>Name</key>
+ <string>Breakpoints</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXSmartGroupTreeModule</string>
+ <string>XCDetailModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>1</integer>
+ <key>TableOfContents</key>
+ <array>
+ <string>1CDDB66807F98D9800BB5817</string>
+ <string>1CDDB66907F98D9800BB5817</string>
+ <string>1CE0B1FE06471DED0097A5F4</string>
+ <string>1CA1AED706398EBD00589147</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.breakpointsV3</string>
+ <key>WindowString</key>
+ <string>315 424 744 409 0 0 1440 878 </string>
+ <key>WindowToolGUID</key>
+ <string>1CDDB66807F98D9800BB5817</string>
+ <key>WindowToolIsVisible</key>
+ <integer>1</integer>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.debugAnimator</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Debug Visualizer</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXNavigatorGroup</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>1</integer>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.debugAnimatorV3</string>
+ <key>WindowString</key>
+ <string>100 100 700 500 0 0 1280 1002 </string>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.bookmarks</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>Module</key>
+ <string>PBXBookmarksModule</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Bookmarks</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXBookmarksModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>0</integer>
+ <key>WindowString</key>
+ <string>538 42 401 187 0 0 1280 1002 </string>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.projectFormatConflicts</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>Module</key>
+ <string>XCProjectFormatConflictsModule</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Project Format Conflicts</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>XCProjectFormatConflictsModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>0</integer>
+ <key>WindowContentMinSize</key>
+ <string>450 300</string>
+ <key>WindowString</key>
+ <string>50 850 472 307 0 0 1440 877</string>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.classBrowser</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <integer>1</integer>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>OptionsSetName</key>
+ <string>Hierarchy, all classes</string>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CA6456E063B45B4001379D8</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Class Browser - NSObject</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>ClassesFrame</key>
+ <string>{{0, 0}, {374, 96}}</string>
+ <key>ClassesTreeTableConfiguration</key>
+ <array>
+ <string>PBXClassNameColumnIdentifier</string>
+ <real>208</real>
+ <string>PBXClassBookColumnIdentifier</string>
+ <real>22</real>
+ </array>
+ <key>Frame</key>
+ <string>{{0, 0}, {630, 331}}</string>
+ <key>MembersFrame</key>
+ <string>{{0, 105}, {374, 395}}</string>
+ <key>MembersTreeTableConfiguration</key>
+ <array>
+ <string>PBXMemberTypeIconColumnIdentifier</string>
+ <real>22</real>
+ <string>PBXMemberNameColumnIdentifier</string>
+ <real>216</real>
+ <string>PBXMemberTypeColumnIdentifier</string>
+ <real>97</real>
+ <string>PBXMemberBookColumnIdentifier</string>
+ <real>22</real>
+ </array>
+ <key>PBXModuleWindowStatusBarHidden2</key>
+ <integer>1</integer>
+ <key>RubberWindowFrame</key>
+ <string>385 179 630 352 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXClassBrowserModule</string>
+ <key>Proportion</key>
+ <string>332pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>332pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Class Browser</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXClassBrowserModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>0</integer>
+ <key>TableOfContents</key>
+ <array>
+ <string>1C0AD2AF069F1E9B00FABCE6</string>
+ <string>1C0AD2B0069F1E9B00FABCE6</string>
+ <string>1CA6456E063B45B4001379D8</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.classbrowser</string>
+ <key>WindowString</key>
+ <string>385 179 630 352 0 0 1440 878 </string>
+ <key>WindowToolGUID</key>
+ <string>1C0AD2AF069F1E9B00FABCE6</string>
+ <key>WindowToolIsVisible</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.refactoring</string>
+ <key>IncludeInToolsMenu</key>
+ <integer>0</integer>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <integer>1</integer>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{0, 0}, {500, 335}</string>
+ <key>RubberWindowFrame</key>
+ <string>{0, 0}, {500, 335}</string>
+ </dict>
+ <key>Module</key>
+ <string>XCRefactoringModule</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Refactoring</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>XCRefactoringModule</string>
+ </array>
+ <key>WindowString</key>
+ <string>200 200 500 356 0 0 1920 1200 </string>
+ </dict>
+ </array>
+</dict>
+</plist>
diff --git a/cacheandcarry.xcodeproj/don.pbxuser b/cacheandcarry.xcodeproj/don.pbxuser
new file mode 100644
index 0000000..6cb6978
--- /dev/null
+++ b/cacheandcarry.xcodeproj/don.pbxuser
@@ -0,0 +1,543 @@
+// !$*UTF8*$!
+{
+ 0142E2590A37DAD800461F0A /* Debug */ = {
+ activeExec = 0;
+ };
+ 01706F540A347F6900E43B08 /* Make */ = {
+ activeExec = 0;
+ };
+ 01706F590A347F9A00E43B08 /* Makefile */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {903, 2431}}";
+ sepNavSelRange = "{2174, 0}";
+ sepNavVisRange = "{3751, 1645}";
+ sepNavWindowFrame = "{{434, 71}, {962, 807}}";
+ };
+ };
+ 01706F5B0A34807400E43B08 /* Program */ = {
+ activeExec = 0;
+ };
+ 08FB7793FE84155DC02AAC07 /* Project object */ = {
+ activeBuildConfigurationName = Development;
+ activeTarget = 01706F5B0A34807400E43B08 /* Program */;
+ addToTargets = (
+ 01706F540A347F6900E43B08 /* Make */,
+ 01706F5B0A34807400E43B08 /* Program */,
+ );
+ breakpoints = (
+ F6E3B3811549E41A00FCA958 /* EEPROM.h:4 */,
+ F6EB3584155A141A005D1535 /* main.cpp:320 */,
+ );
+ codeSenseManager = F606C70F0E36E4F300ED6D97 /* Code sense */;
+ perUserDictionary = {
+ PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 20,
+ 619,
+ 20,
+ 48,
+ 43,
+ 43,
+ 20,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXFileDataSource_FiletypeID,
+ PBXFileDataSource_Filename_ColumnID,
+ PBXFileDataSource_Built_ColumnID,
+ PBXFileDataSource_ObjectSize_ColumnID,
+ PBXFileDataSource_Errors_ColumnID,
+ PBXFileDataSource_Warnings_ColumnID,
+ PBXFileDataSource_Target_ColumnID,
+ );
+ };
+ PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 20,
+ 579,
+ 60,
+ 20,
+ 48.16259765625,
+ 43,
+ 43,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXFileDataSource_FiletypeID,
+ PBXFileDataSource_Filename_ColumnID,
+ PBXTargetDataSource_PrimaryAttribute,
+ PBXFileDataSource_Built_ColumnID,
+ PBXFileDataSource_ObjectSize_ColumnID,
+ PBXFileDataSource_Errors_ColumnID,
+ PBXFileDataSource_Warnings_ColumnID,
+ );
+ };
+ PBXPerProjectTemplateStateSaveDate = 358221038;
+ PBXWorkspaceStateSaveDate = 358221038;
+ };
+ perUserProjectItems = {
+ F6E3B62E1557A6CA00FCA958 /* PBXTextBookmark */ = F6E3B62E1557A6CA00FCA958 /* PBXTextBookmark */;
+ F6E3B62F1557A6CA00FCA958 /* PBXTextBookmark */ = F6E3B62F1557A6CA00FCA958 /* PBXTextBookmark */;
+ F6E3B6351557A6CA00FCA958 /* PBXTextBookmark */ = F6E3B6351557A6CA00FCA958 /* PBXTextBookmark */;
+ F6E83B88153B6F4100A14FCA /* PBXTextBookmark */ = F6E83B88153B6F4100A14FCA /* PBXTextBookmark */;
+ F6E83B89153B6F4100A14FCA /* PBXTextBookmark */ = F6E83B89153B6F4100A14FCA /* PBXTextBookmark */;
+ F6EB3553155A1047005D1535 /* PBXTextBookmark */ = F6EB3553155A1047005D1535 /* PBXTextBookmark */;
+ F6EB3571155A134D005D1535 /* PBXTextBookmark */ = F6EB3571155A134D005D1535 /* PBXTextBookmark */;
+ F6EB3597155A1592005D1535 /* PBXBookmark */ = F6EB3597155A1592005D1535 /* PBXBookmark */;
+ F6EB359A155A16BA005D1535 /* PBXTextBookmark */ = F6EB359A155A16BA005D1535 /* PBXTextBookmark */;
+ F6EB35EF155AE436005D1535 /* PBXTextBookmark */ = F6EB35EF155AE436005D1535 /* PBXTextBookmark */;
+ F6EB35F0155AE436005D1535 /* PBXTextBookmark */ = F6EB35F0155AE436005D1535 /* PBXTextBookmark */;
+ F6EB35F1155AE436005D1535 /* PBXTextBookmark */ = F6EB35F1155AE436005D1535 /* PBXTextBookmark */;
+ F6EB35F2155AE436005D1535 /* PBXTextBookmark */ = F6EB35F2155AE436005D1535 /* PBXTextBookmark */;
+ F6EB35F3155AE436005D1535 /* PBXTextBookmark */ = F6EB35F3155AE436005D1535 /* PBXTextBookmark */;
+ F6EB35F6155AE436005D1535 /* PBXTextBookmark */ = F6EB35F6155AE436005D1535 /* PBXTextBookmark */;
+ F6EB367C155EE2F5005D1535 /* PBXTextBookmark */ = F6EB367C155EE2F5005D1535 /* PBXTextBookmark */;
+ F6EB367D155EE2F5005D1535 /* PBXTextBookmark */ = F6EB367D155EE2F5005D1535 /* PBXTextBookmark */;
+ F6EB367F155EE2F5005D1535 /* PBXTextBookmark */ = F6EB367F155EE2F5005D1535 /* PBXTextBookmark */;
+ F6EB3680155EE2F5005D1535 /* PBXTextBookmark */ = F6EB3680155EE2F5005D1535 /* PBXTextBookmark */;
+ F6EB3681155EE2F5005D1535 /* PBXTextBookmark */ = F6EB3681155EE2F5005D1535 /* PBXTextBookmark */;
+ F6EB3682155EE2F5005D1535 /* PBXTextBookmark */ = F6EB3682155EE2F5005D1535 /* PBXTextBookmark */;
+ F6EB3683155EE2F5005D1535 /* PBXTextBookmark */ = F6EB3683155EE2F5005D1535 /* PBXTextBookmark */;
+ F6EB3684155EE2F5005D1535 /* PBXTextBookmark */ = F6EB3684155EE2F5005D1535 /* PBXTextBookmark */;
+ F6EB3686155EE2F5005D1535 /* PBXTextBookmark */ = F6EB3686155EE2F5005D1535 /* PBXTextBookmark */;
+ };
+ sourceControlManager = F606C70E0E36E4F300ED6D97 /* Source Control */;
+ userBuildSettings = {
+ };
+ };
+ F606C70E0E36E4F300ED6D97 /* Source Control */ = {
+ isa = PBXSourceControlManager;
+ fallbackIsa = XCSourceControlManager;
+ isSCMEnabled = 0;
+ scmConfiguration = {
+ repositoryNamesForRoots = {
+ "" = "";
+ };
+ };
+ };
+ F606C70F0E36E4F300ED6D97 /* Code sense */ = {
+ isa = PBXCodeSenseManager;
+ indexTemplatePath = "";
+ };
+ F65B9782153F4D4F00A8B814 /* main.cpp */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.cpp;
+ path = main.cpp;
+ sourceTree = "<group>";
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {903, 8710}}";
+ sepNavSelRange = "{14487, 0}";
+ sepNavVisRange = "{1751, 1398}";
+ sepNavWindowFrame = "{{392, 71}, {962, 807}}";
+ };
+ };
+ F69C9B5A150D0F0000B4163A /* stdlib.h */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = stdlib.h;
+ path = "/Applications/MapleIDE.app/Contents/Resources/Java/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/include/stdlib.h";
+ sourceTree = "<absolute>";
+ };
+ F69C9F67150EAAF300B4163A /* main.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {903, 8788}}";
+ sepNavSelRange = "{2107, 0}";
+ sepNavVisRange = "{870, 1590}";
+ sepNavWindowFrame = "{{446, 71}, {962, 807}}";
+ };
+ };
+ F6E3B3811549E41A00FCA958 /* EEPROM.h:4 */ = {
+ isa = PBXFileBreakpoint;
+ actions = (
+ );
+ breakpointStyle = 0;
+ continueAfterActions = 0;
+ countType = 0;
+ delayBeforeContinue = 0;
+ fileReference = F6E3B3821549E41A00FCA958 /* EEPROM.h */;
+ hitCount = 0;
+ ignoreCount = 0;
+ lineNumber = 4;
+ modificationTime = 357164058.10546;
+ originalNumberOfMultipleMatches = 0;
+ state = 1;
+ };
+ F6E3B3821549E41A00FCA958 /* EEPROM.h */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = EEPROM.h;
+ path = "/Users/don/Sites/embedded/suspectDevices/xtractSolutions/AMACallHome/Baco-matic5000/libmaple/libraries/EEPROM/EEPROM.h";
+ sourceTree = "<absolute>";
+ };
+ F6E3B62D1557A6CA00FCA958 /* usb_core.c */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = usb_core.c;
+ path = "/Users/don/Sites/embedded/suspectDevices/xtractSolutions/AMACallHome/Baco-matic5000/libmaple/libmaple/usb/usb_lib/usb_core.c";
+ sourceTree = "<absolute>";
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {797, 13442}}";
+ sepNavSelRange = "{15729, 1}";
+ sepNavVisRange = "{8443, 796}";
+ };
+ };
+ F6E3B62E1557A6CA00FCA958 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F69C9F67150EAAF300B4163A /* main.cpp */;
+ name = "main.cpp: 459";
+ rLen = 0;
+ rLoc = 13077;
+ rType = 0;
+ vrLen = 1464;
+ vrLoc = 13511;
+ };
+ F6E3B62F1557A6CA00FCA958 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F6E3B6301557A6CA00FCA958 /* rules.mk */;
+ name = "rules.mk: 6";
+ rLen = 40;
+ rLoc = 99;
+ rType = 0;
+ vrLen = 1054;
+ vrLoc = 0;
+ };
+ F6E3B6301557A6CA00FCA958 /* rules.mk */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = text;
+ name = rules.mk;
+ path = "/Users/don/Sites/embedded/suspectDevices/xtractSolutions/AMACallHome/Baco-matic5000/libmaple/libraries/FreeRTOS/rules.mk";
+ sourceTree = "<absolute>";
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {934, 593}}";
+ sepNavSelRange = "{99, 40}";
+ sepNavVisRange = "{0, 1054}";
+ };
+ };
+ F6E3B6351557A6CA00FCA958 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F6E3B6361557A6CA00FCA958 /* flash_stm32.c */;
+ name = "flash_stm32.c: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 1161;
+ vrLoc = 133;
+ };
+ F6E3B6361557A6CA00FCA958 /* flash_stm32.c */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = flash_stm32.c;
+ path = "/Users/don/Sites/embedded/suspectDevices/xtractSolutions/AMACallHome/Baco-matic5000/libmaple/libraries/EEPROM/flash_stm32.c";
+ sourceTree = "<absolute>";
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {934, 2145}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{133, 1161}";
+ sepNavWindowFrame = "{{39, 132}, {993, 721}}";
+ };
+ };
+ F6E83B88153B6F4100A14FCA /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F69C9B5A150D0F0000B4163A /* stdlib.h */;
+ name = "stdlib.h: 72";
+ rLen = 0;
+ rLoc = 1254;
+ rType = 0;
+ vrLen = 817;
+ vrLoc = 908;
+ };
+ F6E83B89153B6F4100A14FCA /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 01706F590A347F9A00E43B08 /* Makefile */;
+ name = "Makefile: 101";
+ rLen = 0;
+ rLoc = 2788;
+ rType = 0;
+ vrLen = 1076;
+ vrLoc = 2382;
+ };
+ F6EB3553155A1047005D1535 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F6E3B62D1557A6CA00FCA958 /* usb_core.c */;
+ name = "usb_core.c: 487";
+ rLen = 1;
+ rLoc = 15729;
+ rType = 0;
+ vrLen = 796;
+ vrLoc = 8443;
+ };
+ F6EB3564155A1193005D1535 /* FatStructs.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {797, 5473}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{4956, 1415}";
+ };
+ };
+ F6EB3565155A1193005D1535 /* Sd2Card.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {797, 9178}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{1173, 643}";
+ };
+ };
+ F6EB3566155A1193005D1535 /* Sd2Card.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {797, 2574}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{0, 962}";
+ };
+ };
+ F6EB3567155A1193005D1535 /* Sd2PinMap.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {797, 4706}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{0, 1068}";
+ };
+ };
+ F6EB3568155A1193005D1535 /* SdFat.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {797, 7436}}";
+ sepNavSelRange = "{7316, 0}";
+ sepNavVisRange = "{123, 1046}";
+ };
+ };
+ F6EB3569155A1193005D1535 /* SdFatmainpage.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {797, 2639}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{7583, 622}";
+ };
+ };
+ F6EB356A155A1193005D1535 /* SdFatUtil.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {797, 936}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{0, 1070}";
+ };
+ };
+ F6EB356B155A1193005D1535 /* SdFile.cpp */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {934, 16393}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{21349, 1666}";
+ sepNavWindowFrame = "{{15, 152}, {993, 721}}";
+ };
+ };
+ F6EB3571155A134D005D1535 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F6EB3565155A1193005D1535 /* Sd2Card.cpp */;
+ name = "Sd2Card.cpp: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 643;
+ vrLoc = 1173;
+ };
+ F6EB3584155A141A005D1535 /* main.cpp:320 */ = {
+ isa = PBXFileBreakpoint;
+ actions = (
+ );
+ breakpointStyle = 0;
+ continueAfterActions = 0;
+ countType = 0;
+ delayBeforeContinue = 0;
+ fileReference = F65B9782153F4D4F00A8B814 /* main.cpp */;
+ functionName = "toPachube(int key, char * value)";
+ hitCount = 0;
+ ignoreCount = 0;
+ lineNumber = 320;
+ modificationTime = 358224922.127699;
+ originalNumberOfMultipleMatches = 0;
+ state = 1;
+ };
+ F6EB3597155A1592005D1535 /* PBXBookmark */ = {
+ isa = PBXBookmark;
+ fRef = F6EB356B155A1193005D1535 /* SdFile.cpp */;
+ };
+ F6EB359A155A16BA005D1535 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F6EB3568155A1193005D1535 /* SdFat.h */;
+ name = "SdFat.h: 202";
+ rLen = 0;
+ rLoc = 7316;
+ rType = 0;
+ vrLen = 1046;
+ vrLoc = 123;
+ };
+ F6EB35EF155AE436005D1535 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F6EB3564155A1193005D1535 /* FatStructs.h */;
+ name = "FatStructs.h: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 1415;
+ vrLoc = 4956;
+ };
+ F6EB35F0155AE436005D1535 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F6EB3566155A1193005D1535 /* Sd2Card.h */;
+ name = "Sd2Card.h: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 962;
+ vrLoc = 0;
+ };
+ F6EB35F1155AE436005D1535 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F6EB3567155A1193005D1535 /* Sd2PinMap.h */;
+ name = "Sd2PinMap.h: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 1068;
+ vrLoc = 0;
+ };
+ F6EB35F2155AE436005D1535 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F6EB3569155A1193005D1535 /* SdFatmainpage.h */;
+ name = "SdFatmainpage.h: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 622;
+ vrLoc = 7583;
+ };
+ F6EB35F3155AE436005D1535 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F6EB356A155A1193005D1535 /* SdFatUtil.h */;
+ name = "SdFatUtil.h: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 1070;
+ vrLoc = 0;
+ };
+ F6EB35F6155AE436005D1535 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F65B9782153F4D4F00A8B814 /* main.cpp */;
+ name = "main.cpp: 580";
+ rLen = 0;
+ rLoc = 17053;
+ rType = 0;
+ vrLen = 1592;
+ vrLoc = 14552;
+ };
+ F6EB367C155EE2F5005D1535 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F6EB356B155A1193005D1535 /* SdFile.cpp */;
+ name = "SdFile.cpp: 667";
+ rLen = 41;
+ rLoc = 22189;
+ rType = 0;
+ vrLen = 1127;
+ vrLoc = 21650;
+ };
+ F6EB367D155EE2F5005D1535 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F6EB367E155EE2F5005D1535 /* usbcfg.h */;
+ name = "usbcfg.h: 12";
+ rLen = 0;
+ rLoc = 659;
+ rType = 0;
+ vrLen = 715;
+ vrLoc = 2991;
+ };
+ F6EB367E155EE2F5005D1535 /* usbcfg.h */ = {
+ isa = PBXFileReference;
+ name = usbcfg.h;
+ path = /Users/don/Downloads/STM32_USBMem/usbcfg.h;
+ sourceTree = "<absolute>";
+ };
+ F6EB367F155EE2F5005D1535 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F65B9782153F4D4F00A8B814 /* main.cpp */;
+ name = "main.cpp: 619";
+ rLen = 42;
+ rLoc = 16415;
+ rType = 0;
+ vrLen = 850;
+ vrLoc = 8604;
+ };
+ F6EB3680155EE2F5005D1535 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F69C9F67150EAAF300B4163A /* main.cpp */;
+ name = "main.cpp: 176";
+ rLen = 0;
+ rLoc = 4623;
+ rType = 0;
+ vrLen = 639;
+ vrLoc = 4054;
+ };
+ F6EB3681155EE2F5005D1535 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F69C9F67150EAAF300B4163A /* main.cpp */;
+ name = "main.cpp: 538";
+ rLen = 0;
+ rLoc = 14487;
+ rType = 0;
+ vrLen = 1398;
+ vrLoc = 1751;
+ };
+ F6EB3682155EE2F5005D1535 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F6EB356B155A1193005D1535 /* SdFile.cpp */;
+ name = "SdFile.cpp: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 1666;
+ vrLoc = 21349;
+ };
+ F6EB3683155EE2F5005D1535 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F69C9F67150EAAF300B4163A /* main.cpp */;
+ name = "main.cpp: 76";
+ rLen = 0;
+ rLoc = 2107;
+ rType = 0;
+ vrLen = 1590;
+ vrLoc = 870;
+ };
+ F6EB3684155EE2F5005D1535 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F6EB3685155EE2F5005D1535 /* rules.mk */;
+ name = "rules.mk: 6";
+ rLen = 40;
+ rLoc = 99;
+ rType = 0;
+ vrLen = 1054;
+ vrLoc = 0;
+ };
+ F6EB3685155EE2F5005D1535 /* rules.mk */ = {
+ isa = PBXFileReference;
+ name = rules.mk;
+ path = "/Users/don/Sites/embedded/suspectDevices/xtractSolutions/AMACallHome/Baco-matic5000/libmaple/libraries/FreeRTOS/rules.mk";
+ sourceTree = "<absolute>";
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {934, 593}}";
+ sepNavSelRange = "{99, 40}";
+ sepNavVisRange = "{0, 1054}";
+ sepNavWindowFrame = "{{447, 157}, {993, 721}}";
+ };
+ };
+ F6EB3686155EE2F5005D1535 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F6EB3687155EE2F5005D1535 /* flash_stm32.c */;
+ name = "flash_stm32.c: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 1161;
+ vrLoc = 133;
+ };
+ F6EB3687155EE2F5005D1535 /* flash_stm32.c */ = {
+ isa = PBXFileReference;
+ name = flash_stm32.c;
+ path = "/Users/don/Sites/embedded/suspectDevices/xtractSolutions/AMACallHome/Baco-matic5000/libmaple/libraries/EEPROM/flash_stm32.c";
+ sourceTree = "<absolute>";
+ };
+}
diff --git a/cacheandcarry.xcodeproj/project.pbxproj b/cacheandcarry.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..b9575de
--- /dev/null
+++ b/cacheandcarry.xcodeproj/project.pbxproj
@@ -0,0 +1,314 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXFileReference section */
+ 01706F590A347F9A00E43B08 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
+ F69C9F67150EAAF300B4163A /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
+ F6F130BF15768E0D00094B32 /* FatStructs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FatStructs.h; sourceTree = "<group>"; };
+ F6F130C015768E0D00094B32 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
+ F6F130C115768E0D00094B32 /* rules.mk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = rules.mk; sourceTree = "<group>"; };
+ F6F130C215768E0D00094B32 /* Sd2Card.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Sd2Card.cpp; sourceTree = "<group>"; };
+ F6F130C315768E0D00094B32 /* Sd2Card.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Sd2Card.h; sourceTree = "<group>"; };
+ F6F130C415768E0D00094B32 /* SdCard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SdCard.h; sourceTree = "<group>"; };
+ F6F130C515768E0D00094B32 /* SdFat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SdFat.h; sourceTree = "<group>"; };
+ F6F130C615768E0D00094B32 /* SdFatUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SdFatUtil.h; sourceTree = "<group>"; };
+ F6F130C715768E0D00094B32 /* SdFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SdFile.cpp; sourceTree = "<group>"; };
+ F6F130C815768E0D00094B32 /* SdInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SdInfo.h; sourceTree = "<group>"; };
+ F6F130C915768E0D00094B32 /* SdVolume.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SdVolume.cpp; sourceTree = "<group>"; };
+ F6F130CA15768E0D00094B32 /* SdVolume.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SdVolume.h; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXGroup section */
+ 08FB7794FE84155DC02AAC07 /* «PROJECTNAME» */ = {
+ isa = PBXGroup;
+ children = (
+ 01706F590A347F9A00E43B08 /* Makefile */,
+ 08FB7795FE84155DC02AAC07 /* Source */,
+ F6EB355C155A113F005D1535 /* Libraries */,
+ C6A0FF2B0290797F04C91782 /* Documentation */,
+ 1AB674ADFE9D54B511CA2CBB /* Products */,
+ );
+ name = "«PROJECTNAME»";
+ sourceTree = "<group>";
+ };
+ 08FB7795FE84155DC02AAC07 /* Source */ = {
+ isa = PBXGroup;
+ children = (
+ F69C9F67150EAAF300B4163A /* main.cpp */,
+ );
+ name = Source;
+ sourceTree = "<group>";
+ };
+ 1AB674ADFE9D54B511CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ C6A0FF2B0290797F04C91782 /* Documentation */ = {
+ isa = PBXGroup;
+ children = (
+ );
+ name = Documentation;
+ sourceTree = "<group>";
+ };
+ F6EB355C155A113F005D1535 /* Libraries */ = {
+ isa = PBXGroup;
+ children = (
+ F6F130BE15768E0D00094B32 /* SDfat */,
+ );
+ name = Libraries;
+ sourceTree = "<group>";
+ };
+ F6F130BE15768E0D00094B32 /* SDfat */ = {
+ isa = PBXGroup;
+ children = (
+ F6F130BF15768E0D00094B32 /* FatStructs.h */,
+ F6F130C015768E0D00094B32 /* README */,
+ F6F130C115768E0D00094B32 /* rules.mk */,
+ F6F130C215768E0D00094B32 /* Sd2Card.cpp */,
+ F6F130C315768E0D00094B32 /* Sd2Card.h */,
+ F6F130C415768E0D00094B32 /* SdCard.h */,
+ F6F130C515768E0D00094B32 /* SdFat.h */,
+ F6F130C615768E0D00094B32 /* SdFatUtil.h */,
+ F6F130C715768E0D00094B32 /* SdFile.cpp */,
+ F6F130C815768E0D00094B32 /* SdInfo.h */,
+ F6F130C915768E0D00094B32 /* SdVolume.cpp */,
+ F6F130CA15768E0D00094B32 /* SdVolume.h */,
+ );
+ name = SDfat;
+ path = ../../libmaple/libraries/SDfat;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXLegacyTarget section */
+ 0142E2590A37DAD800461F0A /* Debug */ = {
+ isa = PBXLegacyTarget;
+ buildArgumentsString = "$(ACTION) debug";
+ buildConfigurationList = 0142E25A0A37DAD800461F0A /* Build configuration list for PBXLegacyTarget "Debug" */;
+ buildPhases = (
+ );
+ buildToolPath = /usr/bin/make;
+ dependencies = (
+ );
+ name = Debug;
+ passBuildSettingsInEnvironment = 1;
+ productName = Program;
+ };
+ 01706F540A347F6900E43B08 /* Make */ = {
+ isa = PBXLegacyTarget;
+ buildArgumentsString = "$(ACTION)";
+ buildConfigurationList = 01706F550A347F8800E43B08 /* Build configuration list for PBXLegacyTarget "Make" */;
+ buildPhases = (
+ );
+ buildToolPath = /usr/bin/make;
+ dependencies = (
+ );
+ name = Make;
+ passBuildSettingsInEnvironment = 1;
+ productName = Make;
+ };
+ 01706F5B0A34807400E43B08 /* Program */ = {
+ isa = PBXLegacyTarget;
+ buildArgumentsString = "$(ACTION) install";
+ buildConfigurationList = 01706F660A34808D00E43B08 /* Build configuration list for PBXLegacyTarget "Program" */;
+ buildPhases = (
+ );
+ buildToolPath = /usr/bin/make;
+ dependencies = (
+ );
+ name = Program;
+ passBuildSettingsInEnvironment = 1;
+ productName = Program;
+ };
+/* End PBXLegacyTarget section */
+
+/* Begin PBXProject section */
+ 08FB7793FE84155DC02AAC07 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0430;
+ };
+ buildConfigurationList = 01706F350A34762900E43B08 /* Build configuration list for PBXProject "datalogger" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 1;
+ knownRegions = (
+ English,
+ Japanese,
+ French,
+ German,
+ );
+ mainGroup = 08FB7794FE84155DC02AAC07 /* «PROJECTNAME» */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 01706F540A347F6900E43B08 /* Make */,
+ 01706F5B0A34807400E43B08 /* Program */,
+ 0142E2590A37DAD800461F0A /* Debug */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin XCBuildConfiguration section */
+ 0142E25B0A37DAD800461F0A /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ PATH = "/sw/bin/:/usr/local/bin/:$PATH";
+ PRODUCT_NAME = Program;
+ };
+ name = Development;
+ };
+ 0142E25C0A37DAD800461F0A /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ PRODUCT_NAME = Program;
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 0142E25D0A37DAD800461F0A /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = Program;
+ };
+ name = Default;
+ };
+ 01706F360A34762900E43B08 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ };
+ name = Development;
+ };
+ 01706F370A34762900E43B08 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ };
+ name = Deployment;
+ };
+ 01706F380A34762900E43B08 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ };
+ name = Default;
+ };
+ 01706F560A347F8800E43B08 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ PATH = "/sw/bin/:/usr/local/bin/:$PATH";
+ PRODUCT_NAME = Make;
+ ZERO_LINK = "/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin";
+ };
+ name = Development;
+ };
+ 01706F570A347F8800E43B08 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ PRODUCT_NAME = Make;
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 01706F580A347F8800E43B08 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = Make;
+ };
+ name = Default;
+ };
+ 01706F670A34808D00E43B08 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BOARD = maple_mini;
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ PATH = "/usr/local/arm-none-eabi/bin/:/usr/local/bin/:$PATH";
+ PRODUCT_NAME = Program;
+ };
+ name = Development;
+ };
+ 01706F680A34808D00E43B08 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ PRODUCT_NAME = Program;
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 01706F690A34808D00E43B08 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = Program;
+ };
+ name = Default;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 0142E25A0A37DAD800461F0A /* Build configuration list for PBXLegacyTarget "Debug" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 0142E25B0A37DAD800461F0A /* Development */,
+ 0142E25C0A37DAD800461F0A /* Deployment */,
+ 0142E25D0A37DAD800461F0A /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 01706F350A34762900E43B08 /* Build configuration list for PBXProject "datalogger" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 01706F360A34762900E43B08 /* Development */,
+ 01706F370A34762900E43B08 /* Deployment */,
+ 01706F380A34762900E43B08 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 01706F550A347F8800E43B08 /* Build configuration list for PBXLegacyTarget "Make" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 01706F560A347F8800E43B08 /* Development */,
+ 01706F570A347F8800E43B08 /* Deployment */,
+ 01706F580A347F8800E43B08 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 01706F660A34808D00E43B08 /* Build configuration list for PBXLegacyTarget "Program" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 01706F670A34808D00E43B08 /* Development */,
+ 01706F680A34808D00E43B08 /* Deployment */,
+ 01706F690A34808D00E43B08 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
+}
diff --git a/cacheandcarry.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/cacheandcarry.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..bcf3114
--- /dev/null
+++ b/cacheandcarry.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:datalogger.xcodeproj">
+ </FileRef>
+</Workspace>
diff --git a/cacheandcarry.xcodeproj/project.xcworkspace/xcuserdata/don.xcuserdatad/UserInterfaceState.xcuserstate b/cacheandcarry.xcodeproj/project.xcworkspace/xcuserdata/don.xcuserdatad/UserInterfaceState.xcuserstate
new file mode 100644
index 0000000..67bbde4
--- /dev/null
+++ b/cacheandcarry.xcodeproj/project.xcworkspace/xcuserdata/don.xcuserdatad/UserInterfaceState.xcuserstate
Binary files differ
diff --git a/cacheandcarry.xcodeproj/project.xcworkspace/xcuserdata/don.xcuserdatad/WorkspaceSettings.xcsettings b/cacheandcarry.xcodeproj/project.xcworkspace/xcuserdata/don.xcuserdatad/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..659c876
--- /dev/null
+++ b/cacheandcarry.xcodeproj/project.xcworkspace/xcuserdata/don.xcuserdatad/WorkspaceSettings.xcsettings
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges</key>
+ <true/>
+ <key>SnapshotAutomaticallyBeforeSignificantChanges</key>
+ <true/>
+</dict>
+</plist>
diff --git a/cacheandcarry.xcodeproj/xcuserdata/don.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist b/cacheandcarry.xcodeproj/xcuserdata/don.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
new file mode 100644
index 0000000..a78ce2d
--- /dev/null
+++ b/cacheandcarry.xcodeproj/xcuserdata/don.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Bucket
+ type = "1"
+ version = "1.0">
+ <FileBreakpoints>
+ <FileBreakpoint
+ shouldBeEnabled = "Yes"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ filePath = "../../libmaple/libraries/EEPROM/EEPROM.h"
+ timestampString = "357164058.10546"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "4"
+ endingLineNumber = "4">
+ </FileBreakpoint>
+ <FileBreakpoint
+ shouldBeEnabled = "Yes"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ filePath = "main.cpp"
+ timestampString = "358224922.127699"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "320"
+ endingLineNumber = "320"
+ landmarkName = "typeFile(char *fname)"
+ landmarkType = "7">
+ </FileBreakpoint>
+ </FileBreakpoints>
+</Bucket>
diff --git a/cacheandcarry.xcodeproj/xcuserdata/don.xcuserdatad/xcschemes/Debug.xcscheme b/cacheandcarry.xcodeproj/xcuserdata/don.xcuserdatad/xcschemes/Debug.xcscheme
new file mode 100644
index 0000000..721d790
--- /dev/null
+++ b/cacheandcarry.xcodeproj/xcuserdata/don.xcuserdatad/xcschemes/Debug.xcscheme
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "0142E2590A37DAD800461F0A"
+ BuildableName = "Debug"
+ BlueprintName = "Debug"
+ ReferencedContainer = "container:datalogger.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Development">
+ <Testables>
+ </Testables>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Development"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Deployment"
+ debugDocumentVersioning = "YES">
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Development">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Deployment"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/cacheandcarry.xcodeproj/xcuserdata/don.xcuserdatad/xcschemes/Make.xcscheme b/cacheandcarry.xcodeproj/xcuserdata/don.xcuserdatad/xcschemes/Make.xcscheme
new file mode 100644
index 0000000..3e389d0
--- /dev/null
+++ b/cacheandcarry.xcodeproj/xcuserdata/don.xcuserdatad/xcschemes/Make.xcscheme
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "01706F540A347F6900E43B08"
+ BuildableName = "Make"
+ BlueprintName = "Make"
+ ReferencedContainer = "container:datalogger.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Development">
+ <Testables>
+ </Testables>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Development"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Deployment"
+ debugDocumentVersioning = "YES">
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Development">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Deployment"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/cacheandcarry.xcodeproj/xcuserdata/don.xcuserdatad/xcschemes/Program.xcscheme b/cacheandcarry.xcodeproj/xcuserdata/don.xcuserdatad/xcschemes/Program.xcscheme
new file mode 100644
index 0000000..68ba12c
--- /dev/null
+++ b/cacheandcarry.xcodeproj/xcuserdata/don.xcuserdatad/xcschemes/Program.xcscheme
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "01706F5B0A34807400E43B08"
+ BuildableName = "Program"
+ BlueprintName = "Program"
+ ReferencedContainer = "container:datalogger.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Development">
+ <Testables>
+ </Testables>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Development"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Deployment"
+ debugDocumentVersioning = "YES">
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Development">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Deployment"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/cacheandcarry.xcodeproj/xcuserdata/don.xcuserdatad/xcschemes/xcschememanagement.plist b/cacheandcarry.xcodeproj/xcuserdata/don.xcuserdatad/xcschemes/xcschememanagement.plist
new file mode 100644
index 0000000..106fc3c
--- /dev/null
+++ b/cacheandcarry.xcodeproj/xcuserdata/don.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>Debug.xcscheme</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>0</integer>
+ </dict>
+ <key>Make.xcscheme</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>1</integer>
+ </dict>
+ <key>Program.xcscheme</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>2</integer>
+ </dict>
+ </dict>
+ <key>SuppressBuildableAutocreation</key>
+ <dict>
+ <key>0142E2590A37DAD800461F0A</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ <key>01706F540A347F6900E43B08</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ <key>01706F5B0A34807400E43B08</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ </dict>
+</dict>
+</plist>
diff --git a/main.cpp b/main.cpp
new file mode 100644
index 0000000..68f0d7c
--- /dev/null
+++ b/main.cpp
@@ -0,0 +1,890 @@
+/*------------------------------------------------------------datalogger/main.cpp
+ *
+ *
+ *
+ *
+ *
+ * Loose framework (thinking out loud).
+ *
+ * Deal with multi line data.
+ * SOD[ :]Start of multiline data
+ * EOD[ :]End of multiline data
+ *
+ * Log file and disk commands
+ * DIR[? ] directory of the disk.
+ * TYP[? ] type file
+ * DEL[ ! ] delete file
+ * DDS[? ] dates from logs.
+ * DMP[ ! ] dump all logs [in order]
+ *
+ * LOG[ !:] log data to current log file
+ * LSV[? :] logger software version
+ * LTS[ ! ] sync time with client
+ * LNT[ ! ] sync time from network.
+ *
+ * NSC[? ] network scan
+ * NPW[ ! ] network password
+ * NJN[?!:] join network.
+ *
+ * SSV[! ] save settings (read bom5k.set)
+ * SGT[? ] get settings (write bom5k.set)
+ *
+ *-----------------------------------------------------------------------------*/
+#include "wirish.h"
+#include "iwdg.h"
+#include <ctype.h>
+#include <SdFat.h>
+#include <SdFat.h>
+#include <time.h>
+#include <RTClock.h>
+//#include <EEPROM.h>
+#include <HardwareSPI.h>
+#include <stdint.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+
+#ifndef uint8_t
+#define uint8_t uint8
+#define uint16_t uint16
+#define uint32_t uint32
+#endif
+
+#define GRN_LED 19
+#define ORN_LED 18
+#define RED_LED 14
+#define LED_ON LOW
+#define LED_OFF HIGH
+
+#define BOM_VERSION "BOM5K_"__DATE__
+
+#define KEYWORDS \
+ "SYN" "ACK" "NAK" "SWV" "HWV" "MEM" "SSN" "HLP" "FTL" "ALT" "WRN" "INF" "DBG"\
+ "LOG" "STC" "DVL" "LVL" "DLG" "RST" "SHD" "ALM" "CPT" "CND" "BTN" "WBP" "ERF"\
+ "NOW" "TIM" "THR" "THM" "DFR" "TS1" "TS2" "TS3" "TS4" "TS5" "AMT" "CHT" "AIT"\
+ "FAN" "CHL" "???" "PWR" "PCT" "TSC" "CPR" "CPP" "CPI" "CPD" "FPP" "FPI" "FPD"\
+ "RED" "GRN" "BLU" "TSS" "NOP"
+
+enum keywordIndex {
+ _SYN_,_ACK_,_NAK_,_SWV_,_HWV_,_MEM_,_SSN_,_HLP_,_FTL_,_ALT_,_WRN_,_INF_,_DBG_,
+ _LOG_,_STC_,_DVL_,_LVL_,_DLG_,_RST_,_SHD_,_ALM_,_CPT_,_CND_,_BTN_,_WBP_,_ERF_,
+ _NOW_,_TIM_,_THR_,_THM_,_DFR_,_TS1_,_TS2_,_TS3_,_TS4_,_TS5_,_AMT_,_CHT_,_AIT_,
+ _FAN_,_CHL_,_TMP_,_PWR_,_PCT_,_TSC_,_CPR_,_CPP_,_CPI_,_CPD_,_FPP_,_FPI_,_FPD_,
+ _RED_,_GRN_,_BLU_,_TSS_,_NOP_
+};
+
+// use enum to determine the size of the keyword arrays.
+#define NKEYWORDS _NOP_ + 1
+//NKEYWORDS;
+#define LOGGERKEYWORDS \
+ "DIR" "DEL" "TX2" "TYP" "NSC" "NJN" "NPW" "NST" "TPT" "FMT" "PKY" \
+ "PFD" "PTO" "PIP" "PON" "POF" "SSV" "SGT" "LSV"
+
+enum loggerKeywordIndex {
+ _DIR_=_NOP_+1,_DEL_,_TX2_,_TYP_,_NSC_,_NJN_,_NPW_,_NST_,_TPT_,_FMT_,_PKY_,
+ _PFD_,_PTO_,_PIP_,_PON_,_POF_,_SSV_,_SGT_,_LSV_
+};
+
+//int patchubeIndex[]={_TS1_,_TS2_,_TS3_,_TS4_,_TS5_,_FAN_,_CHL_,_STC_};
+
+#undef NKEYWORDS
+#define NKEYWORDS _LSV_ + 1
+
+int toPachube(int, char *);
+void readSettings(void);
+void writeSettings(void);
+int networkStatus();
+const char keywords[((NKEYWORDS)*3)+1] = KEYWORDS LOGGERKEYWORDS;
+
+int lookupIndex(char *);
+void logData(char *);
+void stripcrlf(char *);
+void stripcrlf(char *mystring) {
+ char * finger;
+ if ((finger=strchr(mystring,'\r')) != NULL) {
+ finger[0]='\0';
+ }
+ if ((finger=strchr(mystring,'\n')) != NULL) {
+ finger[0]='\0';
+ }
+}
+#define MAX_RETURN_VALUE 104
+
+#define WATCHDOG_TIMEOUT 16000
+#define Watchdog_Reset iwdg_feed
+
+HardwareSPI spi(1);
+Sd2Card card;
+SdVolume volume;
+SdFile root;
+SdFile file;
+SdFile settingsFile;
+char logFileName[16];
+char settingsFileName[16]="BOM5K.SET";
+
+bool logOpened=false;
+
+#define MAX_PATCHUBE_KEY_LENGHT 80
+#define MAX_PATCHUBE_FEED_LENGHT 10
+#define MAX_NETWORK_PASSWORD_LENGTH 40
+#define MAX_NETWORK_SSID_LENGTH 64
+
+char networkPassword[MAX_NETWORK_PASSWORD_LENGTH];
+char networkSSID[MAX_NETWORK_SSID_LENGTH];
+char pachubeKey[MAX_PATCHUBE_KEY_LENGHT]="J_4LnoRNleWbZDm9FYp3XevLWXuSzlDiJwCsQnc1TGFQOUZLMHM9";
+char pachubeFeed[MAX_PATCHUBE_FEED_LENGHT]="50019";
+
+class DataStream {
+private:
+ Print *_out;
+ bool _isUSB;
+ char _buf[MAX_RETURN_VALUE];
+ char _key[4];
+ uint8_t _keyVal;
+ char _action;
+ uint8_t _ndx;
+ //bool _gotLine;
+public:
+ DataStream(Print *, int); //initializer
+ bool available();
+ uint8_t read();
+ void printf(const char *format, ...);
+ bool gotLine(unsigned int timeout);
+ char * line() {return _buf; };
+ char action() {return _action; };
+ char * key(){return _key; };
+ char * arguments() {return _buf+4 ; };
+ uint8_t keyValue() {return _keyVal; };
+ void puts(char *s); //{ _out->print(s); };
+ void putChar(char ch); //{ _out->print(ch); };
+ void discard() { while(available())read();_ndx=0;}
+ void flush() { if (_isUSB) {/*SerialUSB.flush();*/;} else {((HardwareSerial *)_out)->flush();}}
+};
+
+DataStream::DataStream(Print * sout, int baudRate=0) {
+ _out=sout;
+ _isUSB=(baudRate==0);
+ _ndx=0;
+ //_gotLine=false;
+ _buf[0]=_key[0]='\0';
+ if (_isUSB) {
+ SerialUSB.begin();
+ } else {
+ ((HardwareSerial *)_out)->begin(baudRate);
+ }
+
+}
+
+char outputBuffer[MAX_RETURN_VALUE]; //allocate once use often.
+
+void DataStream::printf(const char *format, ...){
+ va_list blarg;
+ va_start(blarg, format);
+ vsnprintf(outputBuffer, MAX_RETURN_VALUE, format, blarg);
+ va_end(blarg);
+//
+ //if(SerialUSB.isConnected() && (SerialUSB.getDTR() || SerialUSB.getRTS())) {
+ puts(outputBuffer);
+}
+
+void DataStream::puts(char *s) {
+ if (_isUSB && (!SerialUSB.isConnected() || (!SerialUSB.getDTR() && !SerialUSB.getRTS())))
+ return;
+ _out->write(s);
+};
+
+void DataStream::putChar(char ch) {
+ if (_isUSB && (!SerialUSB.isConnected() || (!SerialUSB.getDTR() && !SerialUSB.getRTS())))
+ return;
+ _out->write(&ch,1); };
+
+
+bool DataStream::available() {
+ if (_isUSB) {
+ return ((USBSerial *)_out)->available();
+ } else {
+ return ((HardwareSerial *)_out)->available();
+ }
+}
+
+uint8_t DataStream::read() {
+ if (_isUSB) {
+ return (uint8_t) ((USBSerial *)_out)->read();
+ } else {
+ return (uint8_t) ((HardwareSerial *)_out)->read();
+ }
+}
+
+bool DataStream::gotLine(unsigned int timeout=5000) {
+ char ch=0;
+ bool retval=false;
+ unsigned long int mark=millis();
+ if(available()){
+ while( (millis()-mark < timeout) && available() && _ndx < 99 && ((ch=read()) != '\n') && ch !='\r' ) {
+ _buf[_ndx++] = ch;
+ }
+ if (_ndx && ((ch=='\n')||(ch=='\r'))) { // should probably check if line is at least 4 chars.
+ _buf[_ndx++]='\r';
+ _buf[_ndx++]='\n';
+ _buf[_ndx]='\0';
+ _ndx=0;
+ //_gotLine=
+ retval=true;
+ _key[0]=_buf[0];
+ _key[1]=_buf[1];
+ _key[2]=_buf[2];
+ _key[3]='\0';
+ _action=_buf[3];
+ _keyVal=lookupIndex(_key);
+ }
+ }
+ return retval;
+}
+
+DataStream device(&Serial1,9600);
+DataStream console(&SerialUSB);
+DataStream radio(&Serial2,9600);
+
+void logData(char *data) {
+ int n;
+ n=file.write(data,strlen(data));
+ console.printf("DBG: Logging (%d)'%s'",n,data);
+ file.sync();
+}
+volatile long unsigned int throttleMark;
+void handleDeviceInput() {
+ bool throttle = false;
+ bool dataSent = false;
+ if ((millis()-throttleMark<1500)) {
+ throttle=true;
+ }
+ switch (device.keyValue()) {
+ case _LOG_:
+ logData(device.arguments());
+ break;
+ case _TS1_:
+ if (!throttle) {
+ dataSent=true;
+ toPachube(0, device.arguments());
+ } break;
+ case _TS2_:
+ if (!throttle) {
+ dataSent=true;
+ toPachube(1, device.arguments());
+ } break;
+ case _TS3_:
+ if (!throttle) {
+ dataSent=true;
+ toPachube(2, device.arguments());
+ } break;
+ case _TS4_:
+ if (!throttle) {
+ dataSent=true;
+ toPachube(3, device.arguments());
+ } break;
+ case _TS5_:
+ if (!throttle) {
+ dataSent=true;
+ toPachube(4, device.arguments());
+ } break;
+ case _FAN_:
+ if (!throttle) {
+ dataSent=true;
+ toPachube(5, device.arguments());
+ } break;
+ case _CHL_:
+ if (!throttle) {
+ dataSent=true;
+ toPachube(6, device.arguments());
+ } break;
+ case _STC_:
+ char * finger;
+ if ((finger=strchr(device.arguments(),' ')) != NULL) {
+ finger[0]='\0';
+ toPachube(8, finger+1);
+ }
+ toPachube(7, device.arguments()); break;
+ case _FTL_: toPachube(7, device.arguments()); break;
+ break;
+ default:
+ console.printf("%s",device.line());
+ break;
+ }
+ if (dataSent) throttleMark=millis();
+}
+
+
+void typeFile(char *fname) {
+ SdFile file2;
+ int16_t n;
+ char nfname[16];
+ char buf[65];
+ for (n=0; fname[n] && n<15; n++) {
+ if (fname[n]=='\r'||fname[n]=='\n') {
+ nfname[n]='\0';
+ } else if (fname[n]=='.') {
+ nfname[n]='.';
+ } else {
+ nfname[n]=fname[n];//nfname[n]=toupper(fname[n]);
+ }
+ }
+ if (file2.open (&root,nfname,O_READ)) {
+ console.printf("SOD:%s\r\n",nfname);
+ while ((n = file2.read(buf, sizeof(buf)-1)) > 0) {
+ buf[n]='\0';
+ console.puts(buf);
+ }
+ console.printf("EOD:%s\r\n",nfname);
+ } else {
+ console.printf("DBG: Couldnt open '%s'\r\n",nfname);
+ }
+
+}
+#define MAX_INPUT_LINE 100
+
+char inBuffer[MAX_INPUT_LINE];
+
+int networkScan() {
+ uint8_t index=0;
+ char endofinput[]="No.Of AP Found:";
+ char nfound[4]="0";
+ uint8_t ch='0';
+ radio.discard();
+ radio.printf("\r\n");
+ radio.discard();
+ radio.printf("\r\nAT+WS\r\n");
+ while (!radio.available()); // and some timeout.
+
+ while ((index<15)){
+ while (radio.available()) {
+ console.putChar(ch=(char) radio.read());
+ if ((ch=='\n')||(ch=='\r')) index=0;
+ if (ch==endofinput[index]) index++;
+ }
+
+ }
+
+ while (!radio.available()); // and some timeout.
+ ch='\0'; index=0;
+ while ((index<4)&&(ch!='\r')&&(ch!='\n')){
+ while(radio.available()) {
+ console.putChar(ch=(char) radio.read());
+ if (isdigit(ch)) nfound[index++]=ch;
+ }
+ }
+ radio.discard();
+ console.printf("\r\n");
+ nfound[index]='\0';
+ return(atoi(nfound));
+
+}
+
+int isErrorOrOK(char *line) {
+ if (line[0]=='O'&&line[1]=='K'&&line[2]=='\0') return 1;
+ if (line[0]=='O'&&line[1]=='K'&&line[2]=='\r') return 1;
+ if (line[0]=='E'&&line[1]=='R'&&line[2]=='R'&&line[3]=='O'&&line[4]=='R'&&line[5]=='\0') return -1;
+ if (line[0]=='E'&&line[1]=='R'&&line[2]=='R'&&line[3]=='O'&&line[4]=='R'&&line[5]=='\r') return -1;
+ return 0;
+}
+
+
+int toPachube(int key, char * value) {
+ uint8_t n,index=0;
+ int retval;
+ char databuffer[36];
+ char cid[4]="0";
+ bool gotResponse=false;
+ enum {CONNECT, ERROR, DISASSOCIATED} status=ERROR;//statii;
+ uint8_t ch='0';
+ radio.discard();
+ radio.printf("\r\n");
+ radio.discard();
+ radio.printf("\r\nAT+NCTCP=216.52.233.122,80\r\n");
+ while (!radio.available()); // and some timeout.
+
+ // ERROR
+ // CONNECT <CID>
+ // DISASSOCIATED
+ digitalWrite(ORN_LED,LOW);
+
+ while (!gotResponse){ // this needs to catch errors.
+ while (radio.available()) {
+ databuffer[index]=ch=(char) radio.read();
+ if (index<36) index++;
+ console.putChar(ch);
+ if ((ch=='\n')||(ch=='\r')) {
+ databuffer[index]='\0';
+ if (strncmp("CONNECT", databuffer,6)==0) {
+ if (index>7) {
+ for (index=0, n=8; index<3 && databuffer[n];) {
+ cid[index++]=databuffer[n++]; // if isdigit????
+ }
+ cid[index]='\0';
+ }
+ status=CONNECT;
+ gotResponse=true;
+ console.printf("DBG: Connect CID=%s\r\n",cid);
+ } else if (strcmp("ERROR", databuffer)==0) {
+ gotResponse=true;
+ status=ERROR;
+
+ } else if (strncmp("DISASSOCIATED",databuffer,index)==0) {
+ gotResponse=true;
+ status=DISASSOCIATED;
+ }
+ index=0;
+ }
+ }
+
+ }
+ digitalWrite(ORN_LED,HIGH);
+
+ if (status!=CONNECT) {
+ console.printf("DBG: NOT CONNECTED! (%d) Exiting\r\n", status);
+ return(0);
+ }
+ radio.discard();
+ snprintf(databuffer, 36, "%d,%s",key,value);
+ radio.printf("\033S%dPUT /v2/feeds/%s.csv HTTP/1.1\r\n",atoi(cid),pachubeFeed);
+ radio.printf("User-Agent: SuspectDevices/Baco-matic5000 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15\r\n");
+ radio.printf("Host: api.pachube.com\r\nAccept: */*\r\nConnection: close\r\n");
+ radio.printf("X-PachubeApiKey: %s\r\n",pachubeKey);
+ radio.printf("Content-Length: %d\r\n\r\n%s\r\n\033E",strlen(databuffer),databuffer);
+ console.printf("DBG: Sending to feed %s: (%d)%s \r\n",pachubeFeed,strlen(databuffer),databuffer);
+
+ //
+ // sent data then wait for an OK
+ //
+ while (!radio.gotLine());
+ while (!(retval=isErrorOrOK(radio.line()))){
+ //console.printf("DBG: %s\r\n",radio.line());
+ while (!radio.gotLine()) {
+ ;
+ }
+ }
+
+ if (retval<1) {
+ console.printf("DBG: NOT OK! %s\r\n",radio.line());
+ radio.discard();
+ return(0);
+ }
+ //
+ // should get an escaped stream followed by a disconnect
+ //
+ index=0;
+ gotResponse=false;
+ digitalWrite(ORN_LED,LOW);
+
+ while (!radio.gotLine());
+ sprintf(databuffer,"%c%c%c%c%cS%dHTTP",0x1b,0x4f,0x1b,0x4f,0x1b,atoi(cid));
+ if(!strncmp(databuffer, radio.line(),strlen(databuffer)) ) {
+ databuffer[0]=radio.line()[16];
+ databuffer[1]=radio.line()[17];
+ databuffer[2]=radio.line()[18];
+ databuffer[3]='\0';
+ console.printf("DBG:[%d] %s\r\n",retval=atoi(databuffer),radio.line()+7);
+ }
+ while (!radio.gotLine());
+ radio.discard();
+ delay(500);
+ digitalWrite(ORN_LED,HIGH);
+ return(retval);
+}
+
+int networkJoin(char *ssid) {
+
+ int retval=0;
+
+ strcpy(networkSSID, ssid);
+
+ radio.discard();
+ radio.printf("\r\nATE0\r\nAT+WA=%s\r\n",ssid);
+ while (!radio.gotLine()); // and some timeout.
+ while (!(retval=isErrorOrOK(radio.line()))){
+ //console.puts(radio.line());
+ while (!radio.gotLine()) { // timeout?
+ ;
+ }
+ }
+ radio.printf("\r\nAT+ndhcp=1\r\n");
+ delay(1000); // this should be an idle.
+ while (!radio.gotLine()); // and some timeout.
+ while (!(isErrorOrOK(radio.line()))){
+ console.printf("DBG: %s",radio.line());
+ while (!radio.gotLine()) {
+ ;
+ }
+ }
+ //console.printf("\r\nDBG: join %s (%d)\r\n",networkSSID,retval=networkStatus());
+ return(networkStatus());
+}
+
+
+int networkSetPassword(char *pwd) {
+ int retval=0;
+ // strncpy(networkPassword, pwd, MAX_NETWORK_PASSWORD_LENGTH-1);
+ strcpy(networkPassword, pwd);
+ radio.discard();
+ radio.printf("\r\nAT+WWPA=%s\r\n",pwd);
+ while (!radio.gotLine()); // and some timeout.
+ while (!(retval=isErrorOrOK(radio.line()))){
+ //console.puts(radio.line());
+ while (!radio.gotLine()) {
+ ;
+ }
+
+ }
+ //console.printf("\r\nDBG: Password shoudld be: %s (%d)\r\n",networkPassword,retval);
+ return(retval>=1);
+
+}
+
+int networkStatus() {
+ int retval=0;
+ radio.discard();
+ radio.printf("\r\n");
+ radio.discard();
+ radio.printf("\r\nAT+WSTATUS\r\n");
+ while (!radio.gotLine()); // and some timeout.
+ while (!(retval=isErrorOrOK(radio.line()))){
+ if ((radio.line()[0]=='N') && (radio.line()[1] == 'O') && (radio.line()[2] == 'T')) {
+ //if (strcmp("NOT ASSOCIATED",radio.line()) ==0){ //wtf????
+ console.printf("DBG: NOT ASSOCIATED\r\n");
+ return(0);
+ } else {
+// console.printf("DBG:%s",radio.line());
+ }
+ while (!radio.gotLine()) {
+ // and some timeout!!!
+ ;
+ }
+ }
+ //console.puts(radio.line());
+ return(retval>=1);
+
+}
+
+void handleConsoleInput() {
+ uint8_t retval;
+ uint8_t index=0;
+ uint8_t ch='0';
+ SdFile finger;
+
+ switch (console.keyValue()) {
+ case _DIR_:
+ console.printf("SOD:\r\n");
+ root.ls(LS_DATE | LS_SIZE);
+ console.printf("EOD:\r\n");
+ break;
+ case _LSV_:
+ console.printf("LSV:" BOM_VERSION "\r\n");
+ break;
+ case _TYP_:
+ typeFile(console.arguments());
+ break;
+ case _NSC_:
+ console.printf("SOD:\r\n");
+ retval=networkScan();
+ console.printf("EOD:\r\n");
+ console.printf("\nDBG: found=%d\r\n",retval);
+ break;
+ case _NJN_:
+ //console.printf("SOD:\r\n");
+ retval=networkJoin(console.arguments());
+ //console.printf("EOD:\r\n");
+ console.printf("\nDBG: joined=%s\r\n",retval?"TRUE":"FALSE");
+ break;
+ case _NPW_:
+ //console.printf("SOD:\r\n");
+ retval=networkSetPassword(console.arguments());
+ //console.printf("EOD:\r\n");
+ console.printf("\nDBG: pwd set=%s\r\n",retval?"TRUE":"FALSE");
+ break;
+ case _NST_:
+ retval=networkStatus();
+ console.printf("NST: %s\r\n",retval?"CONNECTED":"NOT CONNECTED");
+ break;
+ case _FMT_: // there really should be some REALLY do you mean this here but.....
+ root.openRoot(&volume);
+ if (finger.open(&root, ".", O_WRITE|O_READ)) {
+ console.printf("\nDBG: Opened / \r\n");
+ finger.rmRfStar();
+ } else {
+ console.printf("\nDBG: FAIL \r\n");
+ }
+ break;
+
+ case _TPT_:
+ toPachube(1, console.arguments());
+ break;
+ case _TX2_:
+ radio.printf("%s",console.arguments());
+ index=0;
+ // delay(1000);
+ while (radio.available()) {
+ inBuffer[index++]=ch=radio.read();
+ if( index>= 99 || ((ch== '\n') || ch !='\r')) {
+ inBuffer[index]='\0';
+ console.puts(inBuffer);
+ index=0;
+ delay(100);
+ }
+ }
+ inBuffer[index]='\0';
+ console.puts(inBuffer);
+ console.puts((char *) "\r\n");
+ break;
+// set to one to test output for.
+#if 1
+ case _TS1_: toPachube(0, console.arguments()); break;
+ case _TS2_: toPachube(1, console.arguments()); break;
+ case _TS3_: toPachube(2, console.arguments()); break;
+ case _TS4_: toPachube(3, console.arguments()); break;
+ case _TS5_: toPachube(4, console.arguments()); break;
+ case _FAN_: toPachube(5, console.arguments()); break;
+ case _CHL_: toPachube(6, console.arguments()); break;
+ case _STC_: toPachube(7, console.arguments()); break;
+#endif
+
+ case _PKY_:
+ strncpy(pachubeKey, console.arguments(), MAX_PATCHUBE_KEY_LENGHT-1);
+ stripcrlf(pachubeKey);
+ break;
+ case _PFD_:
+ strncpy(pachubeFeed, console.arguments(), MAX_PATCHUBE_FEED_LENGHT-1);
+ stripcrlf(pachubeFeed);
+ break;
+ case _SGT_ :
+ readSettings();
+ break;
+ case _SSV_ :
+ writeSettings();
+ break;
+
+ default:
+ console.printf("DBG: forwarding (%s) to device\r\n",console.key());
+ device.puts(console.line());
+ //device.puts("\r\n");
+ break;
+ }
+
+
+}
+
+void readSettings() {
+ int n,cc;
+ char ch, buff[24];
+ char buff2[80];
+ unsigned int ndx=0;
+ int read=0;
+ if (!settingsFile.open(&root, settingsFileName, O_READ)) {
+ console.printf("DBG: Creating New Settings File\r\n"); console.flush();
+ writeSettings();
+ return;
+ }
+ console.printf("DBG: Opened Settings File: %s\r\n",settingsFileName);
+ settingsFile.seekSet(0);
+ while ((read=settingsFile.read(buff, sizeof(buff))) > 0) {
+ //console.printf("DBG: READ %d\r\n",read); console.flush();
+ for (cc=0; cc < read ; cc++) {
+
+ ch=buff[cc];
+ //console.putChar(ch); console.flush();
+ buff2[ndx]=ch;
+ if (ndx<MAX_INPUT_LINE) {ndx++;}
+ if (ch=='\n'){//console.putChar('\r');
+ if(ndx) {
+ ndx--; // eat the newline.
+ }
+ buff2[ndx]='\0';
+ //console.puts(buff2);
+ if ((ndx>4) && buff2[3]=='!') {//fix this when the files are better
+ buff2[3]='\0';
+ n=lookupIndex(buff2);
+ switch (n) {
+ case _NPW_:
+ networkSetPassword(buff2+4);
+ break;
+ case _NJN_:
+ Watchdog_Reset();
+ networkJoin(buff2 +4);
+ break;
+ case _PKY_:
+ strncpy(pachubeKey, buff2+4, MAX_PATCHUBE_KEY_LENGHT-1);
+ break;
+ case _PFD_:
+ strncpy(pachubeFeed, buff2+4, MAX_PATCHUBE_FEED_LENGHT-1);
+ break;
+ default:
+ break;
+ }
+
+ }
+
+ ndx=0;
+
+ }
+ }
+ }
+
+ console.printf("DBG: Finished with Settings File: %s\r\n",settingsFileName);
+
+ settingsFile.close();
+}
+
+void writeSettings() {
+
+ char wrtBuffer[80];
+
+ if (!settingsFile.open(&root, settingsFileName, O_WRITE|O_CREAT)) {
+ // bitch.... ();
+ return;
+ }
+ console.printf("DBG: Opened Settings File: %s\r\n",settingsFileName);
+ snprintf(wrtBuffer,80,"NPW!%s\n",networkPassword);
+ settingsFile.write(wrtBuffer,strlen(wrtBuffer));
+ snprintf(wrtBuffer,80,"NJN!%s\n",networkSSID);
+ settingsFile.write(wrtBuffer,strlen(wrtBuffer));
+ snprintf(wrtBuffer,80,"PKY!%s\n",pachubeKey);
+ settingsFile.write(wrtBuffer,strlen(wrtBuffer));
+ snprintf(wrtBuffer,80,"PFD!%s\n",pachubeFeed);
+ settingsFile.write(wrtBuffer,strlen(wrtBuffer));
+ settingsFile.close();
+ console.printf("DBG: Closing Settings File: %s\r\n",settingsFileName);
+
+
+}
+
+int lookupIndex(char *key) {
+ int ndx=0;
+ int ptr=0;
+ while (ndx<NKEYWORDS) {
+ if ( (keywords[ptr]==toupper(key[0]))
+ && (keywords[ptr+1]==toupper(key[1]))
+ && (keywords[ptr+2]==toupper(key[2]))
+ ) {
+ return ndx;
+ } else {
+ ptr+=3;
+ ndx++;
+ }
+ }
+ return -1;
+}
+/*
+ * need to find a better way to handle errors if console is connected.
+ */
+#define LINE_BUFFER_MAX 80
+void setup() {
+
+ int logNo;
+ char configLineBuffer[LINE_BUFFER_MAX];
+ spi.begin(SPI_281_250KHZ, MSBFIRST, 0);
+
+ pinMode(GRN_LED,OUTPUT);
+ pinMode(ORN_LED,OUTPUT);
+ pinMode(RED_LED,OUTPUT);
+ digitalWrite(GRN_LED,HIGH);
+ digitalWrite(ORN_LED,LOW);
+ digitalWrite(RED_LED,LOW);
+
+ iwdg_init(IWDG_PRE_256, WATCHDOG_TIMEOUT);
+ Watchdog_Reset();
+
+
+ if (!card.init(&spi)) {
+ //if (!card.init()) {
+ console.printf("FTL: card.init failed");
+ }
+ delay(100);
+
+ // initialize a FAT volume
+ if (!volume.init(&card)) {
+ console.printf("FTL: volume.init failed");
+ }
+
+ // open the root directory
+ if (!root.openRoot(&volume))
+ ;//SerialUSB.println("FTL: openRoot failed");
+
+ for (logNo=0; (!logOpened) && logNo<512; logNo++) {
+ Watchdog_Reset();
+ //int snprintf(char *str, size_t size, const char *format, ...);
+ snprintf(logFileName,15,"LOG%03d.TXT",logNo);
+ if (file.open(&root, logFileName, O_READ)) {
+ //SerialUSB.print("DBG: Exists :"); SerialUSB.println(logFileName);
+ file.close();
+ } else if (file.open(&root, logFileName, O_CREAT|O_READ|O_WRITE)) {
+ //SerialUSB.print("DBG: New File:"); SerialUSB.println(logFileName);
+ logOpened=true;
+ file.sync();
+ file.close();
+ file.open(&root,logFileName,O_WRITE|O_READ);
+ while (file.read(configLineBuffer,LINE_BUFFER_MAX)) {
+
+ }
+ file.sync();
+ }
+ }
+ //if (!logOpened) SerialUSB.println("FTL: openRoot failed");
+
+ digitalWrite(GRN_LED,LOW);
+ digitalWrite(RED_LED,HIGH);
+ readSettings();
+ console.printf("LSV:" BOM_VERSION "\r\n");
+ console.printf("NST: %s\r\n",networkStatus()?"CONNECTED":"NOT CONNECTED");
+ digitalWrite(ORN_LED,HIGH);
+ digitalWrite(RED_LED,networkStatus()?HIGH:LOW);
+
+}
+volatile long int lastCheck;
+volatile long int lastConnected;
+
+void loop() {
+ static int disconnected;
+ if (millis() - lastCheck > 3000) {
+
+ if (networkStatus()) {
+ digitalWrite(RED_LED,LED_OFF);
+ disconnected=0;
+ } else {
+ digitalWrite(RED_LED,LED_ON);
+ if (++disconnected > 10) {
+ char tempssid[40];
+ strcpy(tempssid,networkSSID);
+ digitalWrite(RED_LED,networkJoin(tempssid)?LED_OFF:LED_ON);
+ }
+ }
+ digitalWrite(GRN_LED,SerialUSB.isConnected()?HIGH:LOW);
+ lastCheck=millis();
+ }
+
+ while (device.gotLine()) {
+ handleDeviceInput();
+ }
+ while (console.gotLine()) {
+ digitalWrite(GRN_LED,LOW);
+ handleConsoleInput();
+ digitalWrite(GRN_LED,HIGH);
+ }
+
+ Watchdog_Reset();
+
+}
+
+// Force init to be called *first*, i.e. before static object allocation.
+// Otherwise, statically allocated objects that need libmaple may fail.
+__attribute__((constructor)) void premain() {
+ init();
+}
+
+int main(void) {
+ setup();
+
+ while (true) {
+ loop();
+ }
+
+ return 0;
+}