pierre 5 سال پیش
کامیت
5df61af6c4
100فایلهای تغییر یافته به همراه6943 افزوده شده و 0 حذف شده
  1. 14 0
      alarm_clock/matrix_clock/.ccsproject
  2. 163 0
      alarm_clock/matrix_clock/.cproject
  3. 83 0
      alarm_clock/matrix_clock/.project
  4. 3 0
      alarm_clock/matrix_clock/.settings/org.eclipse.cdt.codan.core.prefs
  5. 2 0
      alarm_clock/matrix_clock/.settings/org.eclipse.cdt.debug.core.prefs
  6. 6 0
      alarm_clock/matrix_clock/.settings/org.eclipse.core.resources.prefs
  7. 6 0
      alarm_clock/matrix_clock/DangerousPrototypes.com forum • View topic - MSP430 LED Matrix Toy.URL
  8. 12 0
      alarm_clock/matrix_clock/MSP430G2452.ccxml
  9. 1 0
      alarm_clock/matrix_clock/Release/ccsObjs.opt
  10. 1 0
      alarm_clock/matrix_clock/Release/ccsSrcs.opt
  11. BIN
      alarm_clock/matrix_clock/Release/main.obj
  12. 15 0
      alarm_clock/matrix_clock/Release/main.pp
  13. 133 0
      alarm_clock/matrix_clock/Release/makefile
  14. 489 0
      alarm_clock/matrix_clock/Release/matrix_clock.map
  15. BIN
      alarm_clock/matrix_clock/Release/matrix_clock.out
  16. 8 0
      alarm_clock/matrix_clock/Release/objects.mk
  17. 99 0
      alarm_clock/matrix_clock/Release/sources.mk
  18. 13 0
      alarm_clock/matrix_clock/Release/subdir_rules.mk
  19. 27 0
      alarm_clock/matrix_clock/Release/subdir_vars.mk
  20. 13 0
      alarm_clock/matrix_clock/glyphs.h
  21. 100 0
      alarm_clock/matrix_clock/lnk_msp430g2452.cmd
  22. 619 0
      alarm_clock/matrix_clock/main.cpp
  23. 90 0
      alarm_clock/matrix_clock/tune.h
  24. BIN
      alarm_clock/source.zip
  25. 19 0
      blink/Makefile
  26. 23 0
      blink/main.c
  27. BIN
      blink/main.elf
  28. BIN
      blink/main.o
  29. 19 0
      bp_led/Makefile
  30. 29 0
      bp_led/main.c
  31. BIN
      bp_led/main.elf
  32. BIN
      bp_led/main.o
  33. BIN
      clock/.main.c.swp
  34. 19 0
      clock/Makefile
  35. 174 0
      clock/main.c
  36. BIN
      clock/main.o
  37. 19 0
      clock_test/Makefile
  38. 26 0
      clock_test/main.c
  39. BIN
      clock_test/main.elf
  40. BIN
      clock_test/main.o
  41. 19 0
      led_matrix_pattern/Makefile
  42. 79 0
      led_matrix_pattern/main.c
  43. BIN
      led_matrix_pattern/main.elf
  44. BIN
      led_matrix_pattern/main.o
  45. 19 0
      led_matrix_scroll/Makefile
  46. 98 0
      led_matrix_scroll/char.c
  47. 105 0
      led_matrix_scroll/main.c
  48. BIN
      led_matrix_scroll/main.elf
  49. BIN
      led_matrix_scroll/main.o
  50. 5 0
      msp430-harduart/CHANGELOG
  51. 676 0
      msp430-harduart/LICENSE
  52. 57 0
      msp430-harduart/Makefile
  53. 62 0
      msp430-harduart/README
  54. 0 0
      msp430-harduart/bin/emptyfile.txt
  55. BIN
      msp430-harduart/bin/firmware.bin
  56. BIN
      msp430-harduart/bin/firmware.elf
  57. 34 0
      msp430-harduart/bin/firmware.hex
  58. 262 0
      msp430-harduart/bin/firmware.list
  59. 34 0
      msp430-harduart/bin/firmware.srec
  60. 102 0
      msp430-harduart/common.mk
  61. 0 0
      msp430-harduart/deploy/emptyfile.txt
  62. 0 0
      msp430-harduart/doc/emptyfile.txt
  63. 1551 0
      msp430-harduart/doxygen.conf
  64. 10 0
      msp430-harduart/src/Makefile
  65. BIN
      msp430-harduart/src/firmware.bin
  66. BIN
      msp430-harduart/src/firmware.elf
  67. 34 0
      msp430-harduart/src/firmware.hex
  68. 262 0
      msp430-harduart/src/firmware.list
  69. 34 0
      msp430-harduart/src/firmware.srec
  70. 66 0
      msp430-harduart/src/include/uart.h
  71. 86 0
      msp430-harduart/src/main.c
  72. BIN
      msp430-harduart/src/main.o
  73. 89 0
      msp430-harduart/src/uart.c
  74. BIN
      msp430-harduart/src/uart.o
  75. 27 0
      rfid_read/Makefile
  76. 0 0
      rfid_read/bin/emptyfile.txt
  77. BIN
      rfid_read/bin/firmware.bin
  78. BIN
      rfid_read/bin/firmware.elf
  79. 25 0
      rfid_read/bin/firmware.hex
  80. 218 0
      rfid_read/bin/firmware.list
  81. 25 0
      rfid_read/bin/firmware.srec
  82. 102 0
      rfid_read/common.mk
  83. BIN
      rfid_read/src/.main.c.kate-swp
  84. 10 0
      rfid_read/src/Makefile
  85. BIN
      rfid_read/src/firmware.bin
  86. BIN
      rfid_read/src/firmware.elf
  87. 25 0
      rfid_read/src/firmware.hex
  88. 218 0
      rfid_read/src/firmware.list
  89. 25 0
      rfid_read/src/firmware.srec
  90. 66 0
      rfid_read/src/include/uart.h
  91. 30 0
      rfid_read/src/main.c
  92. BIN
      rfid_read/src/main.o
  93. 89 0
      rfid_read/src/uart.c
  94. BIN
      rfid_read/src/uart.o
  95. 19 0
      serial_test/Makefile
  96. 50 0
      serial_test/main.c
  97. BIN
      serial_test/main.elf
  98. BIN
      serial_test/main.o
  99. 19 0
      shift_register/Makefile
  100. 86 0
      shift_register/main.c

+ 14 - 0
alarm_clock/matrix_clock/.ccsproject

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?ccsproject version="1.0"?>
+
+<projectOptions>
+<deviceVariant value="MSP430G2452"/>
+<deviceFamily value="MSP430"/>
+<deviceEndianness value="little"/>
+<codegenToolVersion value="4.1.1"/>
+<isElfFormat value="true"/>
+<connection value="common/targetdb/connections/TIMSP430-USB.xml"/>
+<linkerCommandFile value="lnk_msp430g2452.cmd"/>
+<rts value="libc.a"/>
+<templateProperties value="id=com.ti.common.project.core.emptyProjectWithMainTemplate,"/>
+</projectOptions>

+ 163 - 0
alarm_clock/matrix_clock/.cproject

@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+
+<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+	<storageModule configRelations="2" moduleId="org.eclipse.cdt.core.settings">
+		<cconfiguration id="com.ti.ccstudio.buildDefinitions.MSP430.Debug.1274510812">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.MSP430.Debug.1274510812" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+				<externalSettings/>
+				<extensions>
+					<extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.MSP430.Debug.1274510812" name="Debug" parent="com.ti.ccstudio.buildDefinitions.MSP430.Debug">
+					<folderInfo id="com.ti.ccstudio.buildDefinitions.MSP430.Debug.1274510812." name="/" resourcePath="">
+						<toolChain id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.exe.DebugToolchain.487419211" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.MSP430_4.1.exe.linkerDebug.520792912">
+							<option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.988445169" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+								<listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=MSP430G2452"/>
+								<listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+								<listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+								<listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.1.0.01"/>
+								<listOptionValue builtIn="false" value="LINKER_COMMAND_FILE=lnk_msp430g2452.cmd"/>
+								<listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+								<listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+							</option>
+							<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.116588136" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="4.1.1" valueType="string"/>
+							<targetPlatform id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.exe.targetPlatformDebug.1200405168" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.exe.targetPlatformDebug"/>
+							<builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.exe.builderDebug.18193510" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.exe.builderDebug"/>
+							<tool id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.exe.compilerDebug.157600778" name="MSP430 Compiler" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.exe.compilerDebug">
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.SILICON_VERSION.645074552" name="Silicon version (--silicon_version, -v)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.SILICON_VERSION" value="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.SILICON_VERSION.msp" valueType="enumerated"/>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.DEFINE.1743440421" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.DEFINE" valueType="definedSymbols">
+									<listOptionValue builtIn="false" value="__MSP430G2452__"/>
+								</option>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.PRINTF_SUPPORT.590580905" name="Level of printf support required (--printf_support)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.PRINTF_SUPPORT" value="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.PRINTF_SUPPORT.minimal" valueType="enumerated"/>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.DEBUGGING_MODEL.595044264" name="Debugging model" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.DEBUGGING_MODEL" value="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.DEBUGGING_MODEL.SYMDEBUG__DWARF" valueType="enumerated"/>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.ADVICE__POWER.1192666372" name="Enable checking of ULP power rules (--advice:power)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.ADVICE__POWER" value="" valueType="string"/>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.DIAG_WARNING.1748244561" name="Treat diagnostic &lt;id&gt; as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.DIAG_WARNING" valueType="stringList">
+									<listOptionValue builtIn="false" value="225"/>
+								</option>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.DISPLAY_ERROR_NUMBER.1366545125" name="Emit diagnostic identifier numbers (--display_error_number, -pden)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.DIAG_WRAP.434282481" name="Wrap diagnostic messages (--diag_wrap)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.DIAG_WRAP.off" valueType="enumerated"/>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.INCLUDE_PATH.932366458" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.INCLUDE_PATH" valueType="includePath">
+									<listOptionValue builtIn="false" value="&quot;${CCS_BASE_ROOT}/msp430/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>
+								</option>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.ABI.1745726017" name="Application binary interface (--abi)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.ABI.eabi" valueType="enumerated"/>
+								<inputType id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compiler.inputType__C_SRCS.368458152" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compiler.inputType__C_SRCS"/>
+								<inputType id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compiler.inputType__CPP_SRCS.607741115" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compiler.inputType__CPP_SRCS"/>
+								<inputType id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compiler.inputType__ASM_SRCS.1595918469" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compiler.inputType__ASM_SRCS"/>
+								<inputType id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compiler.inputType__ASM2_SRCS.1734079429" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compiler.inputType__ASM2_SRCS"/>
+							</tool>
+							<tool id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.exe.linkerDebug.520792912" name="MSP430 Linker" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.exe.linkerDebug">
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.HEAP_SIZE.1178796683" name="Heap size for C/C++ dynamic memory allocation (--heap_size, -heap)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.HEAP_SIZE" value="80" valueType="string"/>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.STACK_SIZE.2095206470" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.STACK_SIZE" value="80" valueType="string"/>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.OUTPUT_FILE.292538036" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.OUTPUT_FILE" value="&quot;${ProjName}.out&quot;" valueType="string"/>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.MAP_FILE.973859278" name="Input and output sections listed into &lt;file&gt; (--map_file, -m)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.MAP_FILE" value="&quot;${ProjName}.map&quot;" valueType="string"/>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.DISPLAY_ERROR_NUMBER.1064731135" name="Emit diagnostic identifier numbers (--display_error_number)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.DIAG_WRAP.689249268" name="Wrap diagnostic messages (--diag_wrap)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.DIAG_WRAP.off" valueType="enumerated"/>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.SEARCH_PATH.874647419" name="Add &lt;dir&gt; to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.SEARCH_PATH" valueType="stringList">
+									<listOptionValue builtIn="false" value="&quot;${CCS_BASE_ROOT}/msp430/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/lib&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>
+								</option>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.LIBRARY.1133013486" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.LIBRARY" valueType="libs">
+									<listOptionValue builtIn="false" value="&quot;libc.a&quot;"/>
+								</option>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.INITIALIZATION_MODEL.1876646826" name="Initialization model" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.INITIALIZATION_MODEL" value="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.INITIALIZATION_MODEL.ROM_MODEL" valueType="enumerated"/>
+							</tool>
+						</toolChain>
+					</folderInfo>
+				</configuration>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+		</cconfiguration>
+		<cconfiguration id="com.ti.ccstudio.buildDefinitions.MSP430.Release.1968062923">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.MSP430.Release.1968062923" moduleId="org.eclipse.cdt.core.settings" name="Release">
+				<externalSettings/>
+				<extensions>
+					<extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.MSP430.Release.1968062923" name="Release" parent="com.ti.ccstudio.buildDefinitions.MSP430.Release">
+					<folderInfo id="com.ti.ccstudio.buildDefinitions.MSP430.Release.1968062923." name="/" resourcePath="">
+						<toolChain id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.exe.ReleaseToolchain.69660498" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.exe.ReleaseToolchain" targetTool="com.ti.ccstudio.buildDefinitions.MSP430_4.1.exe.linkerRelease.412383490">
+							<option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1846273900" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+								<listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=MSP430G2452"/>
+								<listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+								<listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+								<listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.1.0.01"/>
+								<listOptionValue builtIn="false" value="LINKER_COMMAND_FILE=lnk_msp430g2452.cmd"/>
+								<listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+								<listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+							</option>
+							<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.649413828" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="4.1.1" valueType="string"/>
+							<targetPlatform id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.exe.targetPlatformRelease.1206515450" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.exe.targetPlatformRelease"/>
+							<builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.exe.builderRelease.637803672" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.exe.builderRelease"/>
+							<tool id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.exe.compilerRelease.345171598" name="MSP430 Compiler" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.exe.compilerRelease">
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.SILICON_VERSION.1444532651" name="Silicon version (--silicon_version, -v)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.SILICON_VERSION" value="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.SILICON_VERSION.msp" valueType="enumerated"/>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.DEFINE.499549194" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.DEFINE" valueType="definedSymbols">
+									<listOptionValue builtIn="false" value="__MSP430G2452__"/>
+								</option>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.PRINTF_SUPPORT.428375160" name="Level of printf support required (--printf_support)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.PRINTF_SUPPORT" value="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.PRINTF_SUPPORT.minimal" valueType="enumerated"/>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.ADVICE__POWER.379168226" name="Enable checking of ULP power rules (--advice:power)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.ADVICE__POWER" value="all" valueType="string"/>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.DIAG_WARNING.784393490" name="Treat diagnostic &lt;id&gt; as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.DIAG_WARNING" valueType="stringList">
+									<listOptionValue builtIn="false" value="225"/>
+								</option>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.DISPLAY_ERROR_NUMBER.63212333" name="Emit diagnostic identifier numbers (--display_error_number, -pden)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.DIAG_WRAP.600407689" name="Wrap diagnostic messages (--diag_wrap)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.DIAG_WRAP.off" valueType="enumerated"/>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.INCLUDE_PATH.627142495" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.INCLUDE_PATH" valueType="includePath">
+									<listOptionValue builtIn="false" value="&quot;${CCS_BASE_ROOT}/msp430/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>
+								</option>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.ABI.2011711667" name="Application binary interface (--abi)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compilerID.ABI.eabi" valueType="enumerated"/>
+								<inputType id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compiler.inputType__C_SRCS.845443215" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compiler.inputType__C_SRCS"/>
+								<inputType id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compiler.inputType__CPP_SRCS.1759995229" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compiler.inputType__CPP_SRCS"/>
+								<inputType id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compiler.inputType__ASM_SRCS.1155278266" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compiler.inputType__ASM_SRCS"/>
+								<inputType id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compiler.inputType__ASM2_SRCS.780606117" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.compiler.inputType__ASM2_SRCS"/>
+							</tool>
+							<tool id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.exe.linkerRelease.412383490" name="MSP430 Linker" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.exe.linkerRelease">
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.HEAP_SIZE.341926720" name="Heap size for C/C++ dynamic memory allocation (--heap_size, -heap)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.HEAP_SIZE" value="80" valueType="string"/>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.STACK_SIZE.470426947" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.STACK_SIZE" value="80" valueType="string"/>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.OUTPUT_FILE.1642932788" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.OUTPUT_FILE" value="&quot;${ProjName}.out&quot;" valueType="string"/>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.MAP_FILE.1800573201" name="Input and output sections listed into &lt;file&gt; (--map_file, -m)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.MAP_FILE" value="&quot;${ProjName}.map&quot;" valueType="string"/>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.DISPLAY_ERROR_NUMBER.2088149298" name="Emit diagnostic identifier numbers (--display_error_number)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.DIAG_WRAP.2138662095" name="Wrap diagnostic messages (--diag_wrap)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.DIAG_WRAP.off" valueType="enumerated"/>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.SEARCH_PATH.677629244" name="Add &lt;dir&gt; to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.SEARCH_PATH" valueType="stringList">
+									<listOptionValue builtIn="false" value="&quot;${CCS_BASE_ROOT}/msp430/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/lib&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>
+								</option>
+								<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.LIBRARY.154230006" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.1.linkerID.LIBRARY" valueType="libs">
+									<listOptionValue builtIn="false" value="&quot;libc.a&quot;"/>
+								</option>
+							</tool>
+						</toolChain>
+					</folderInfo>
+				</configuration>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+		</cconfiguration>
+	</storageModule>
+	<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+		<project id="matrix_clock__.com.ti.ccstudio.buildDefinitions.MSP430.ProjectType.997658592" name="MSP430" projectType="com.ti.ccstudio.buildDefinitions.MSP430.ProjectType"/>
+	</storageModule>
+	<storageModule moduleId="refreshScope"/>
+	<storageModule moduleId="scannerConfiguration"/>
+	<storageModule moduleId="org.eclipse.cdt.core.language.mapping">
+		<project-mappings>
+			<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.asmSource" language="com.ti.ccstudio.core.TIASMLanguage"/>
+			<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cHeader" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+			<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cSource" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+			<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxHeader" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+			<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxSource" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+		</project-mappings>
+	</storageModule>
+</cproject>

+ 83 - 0
alarm_clock/matrix_clock/.project

@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>matrix_clock</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+			<arguments>
+				<dictionary>
+					<key>?name?</key>
+					<value></value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.append_environment</key>
+					<value>true</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+					<value>all</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.buildArguments</key>
+					<value>-k</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.buildCommand</key>
+					<value>${CCS_UTILS_DIR}/bin/gmake</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.buildLocation</key>
+					<value>${BuildDirectory}</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
+					<value>clean</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.contents</key>
+					<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+					<value>true</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+					<value>true</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
+					<value>true</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
+					<value>all</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.stopOnError</key>
+					<value>false</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+					<value>true</value>
+				</dictionary>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+			<triggers>full,incremental,</triggers>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>com.ti.ccstudio.core.ccsNature</nature>
+		<nature>org.eclipse.cdt.core.cnature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+		<nature>org.eclipse.cdt.core.ccnature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+	</natures>
+</projectDescription>

+ 3 - 0
alarm_clock/matrix_clock/.settings/org.eclipse.cdt.codan.core.prefs

@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+inEditor=false
+onBuild=false

+ 2 - 0
alarm_clock/matrix_clock/.settings/org.eclipse.cdt.debug.core.prefs

@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker

+ 6 - 0
alarm_clock/matrix_clock/.settings/org.eclipse.core.resources.prefs

@@ -0,0 +1,6 @@
+eclipse.preferences.version=1
+encoding//Release/makefile=UTF-8
+encoding//Release/objects.mk=UTF-8
+encoding//Release/sources.mk=UTF-8
+encoding//Release/subdir_rules.mk=UTF-8
+encoding//Release/subdir_vars.mk=UTF-8

+ 6 - 0
alarm_clock/matrix_clock/DangerousPrototypes.com forum • View topic - MSP430 LED Matrix Toy.URL

@@ -0,0 +1,6 @@
+[InternetShortcut]
+URL=http://dangerousprototypes.com/forum/viewtopic.php?f=56&t=2784
+IDList=
+HotKey=0
+IconFile=C:\Users\mgr\AppData\Local\Mozilla\Firefox\Profiles\20v2vsex.default\shortcutCache\pfxiw729Xq+AcNb24ny_WQ==.ico
+IconIndex=0

+ 12 - 0
alarm_clock/matrix_clock/MSP430G2452.ccxml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<configurations XML_version="1.2" id="configurations_0">
+    <configuration XML_version="1.2" id="configuration_0">
+        <instance XML_version="1.2" desc="TI MSP430 USB1" href="connections/TIMSP430-USB.xml" id="TI MSP430 USB1" xml="TIMSP430-USB.xml" xmlpath="connections"/>
+        <connection XML_version="1.2" id="TI MSP430 USB1">
+            <instance XML_version="1.2" href="drivers/msp430_emu.xml" id="drivers" xml="msp430_emu.xml" xmlpath="drivers"/>
+            <platform XML_version="1.2" id="platform_0">
+                <instance XML_version="1.2" desc="MSP430G2452" href="devices/MSP430G2452.xml" id="MSP430G2452" xml="MSP430G2452.xml" xmlpath="devices"/>
+            </platform>
+        </connection>
+    </configuration>
+</configurations>

+ 1 - 0
alarm_clock/matrix_clock/Release/ccsObjs.opt

@@ -0,0 +1 @@
+"./main.obj" -l"libc.a" "../lnk_msp430g2452.cmd" 

+ 1 - 0
alarm_clock/matrix_clock/Release/ccsSrcs.opt

@@ -0,0 +1 @@
+"../main.cpp" 

BIN
alarm_clock/matrix_clock/Release/main.obj


+ 15 - 0
alarm_clock/matrix_clock/Release/main.pp

@@ -0,0 +1,15 @@
+# FIXED
+
+main.obj: ../main.cpp
+main.obj: C:/ti/ccsv5/tools/compiler/msp430_4.1.1/include/stdint.h
+main.obj: C:/ti/ccsv5/ccs_base/msp430/include/msp430g2452.h
+main.obj: C:/ti/ccsv5/ccs_base/msp430/include/in430.h
+main.obj: ../glyphs.h
+main.obj: ../tune.h
+
+../main.cpp: 
+C:/ti/ccsv5/tools/compiler/msp430_4.1.1/include/stdint.h: 
+C:/ti/ccsv5/ccs_base/msp430/include/msp430g2452.h: 
+C:/ti/ccsv5/ccs_base/msp430/include/in430.h: 
+../glyphs.h: 
+../tune.h: 

+ 133 - 0
alarm_clock/matrix_clock/Release/makefile

@@ -0,0 +1,133 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+SHELL = cmd.exe
+
+CG_TOOL_ROOT := C:/ti/ccsv5/tools/compiler/msp430_4.1.1
+
+ORDERED_OBJS += \
+$(GEN_CMDS__FLAG) \
+"./main.obj" \
+-l"libc.a" \
+"../lnk_msp430g2452.cmd" \
+
+-include ../makefile.init
+
+RM := DEL /F
+RMDIR := RMDIR /S/Q
+
+# All of the sources participating in the build are defined here
+-include sources.mk
+-include subdir_vars.mk
+-include subdir_rules.mk
+-include objects.mk
+
+ifneq ($(MAKECMDGOALS),clean)
+ifneq ($(strip $(S_DEPS)),)
+-include $(S_DEPS)
+endif
+ifneq ($(strip $(S_UPPER_DEPS)),)
+-include $(S_UPPER_DEPS)
+endif
+ifneq ($(strip $(S62_DEPS)),)
+-include $(S62_DEPS)
+endif
+ifneq ($(strip $(C64_DEPS)),)
+-include $(C64_DEPS)
+endif
+ifneq ($(strip $(ASM_DEPS)),)
+-include $(ASM_DEPS)
+endif
+ifneq ($(strip $(CC_DEPS)),)
+-include $(CC_DEPS)
+endif
+ifneq ($(strip $(S55_DEPS)),)
+-include $(S55_DEPS)
+endif
+ifneq ($(strip $(C67_DEPS)),)
+-include $(C67_DEPS)
+endif
+ifneq ($(strip $(C??_DEPS)),)
+-include $(C??_DEPS)
+endif
+ifneq ($(strip $(CLA_DEPS)),)
+-include $(CLA_DEPS)
+endif
+ifneq ($(strip $(CPP_DEPS)),)
+-include $(CPP_DEPS)
+endif
+ifneq ($(strip $(S??_DEPS)),)
+-include $(S??_DEPS)
+endif
+ifneq ($(strip $(C_DEPS)),)
+-include $(C_DEPS)
+endif
+ifneq ($(strip $(C62_DEPS)),)
+-include $(C62_DEPS)
+endif
+ifneq ($(strip $(CXX_DEPS)),)
+-include $(CXX_DEPS)
+endif
+ifneq ($(strip $(C++_DEPS)),)
+-include $(C++_DEPS)
+endif
+ifneq ($(strip $(ASM_UPPER_DEPS)),)
+-include $(ASM_UPPER_DEPS)
+endif
+ifneq ($(strip $(K_DEPS)),)
+-include $(K_DEPS)
+endif
+ifneq ($(strip $(C43_DEPS)),)
+-include $(C43_DEPS)
+endif
+ifneq ($(strip $(S67_DEPS)),)
+-include $(S67_DEPS)
+endif
+ifneq ($(strip $(SA_DEPS)),)
+-include $(SA_DEPS)
+endif
+ifneq ($(strip $(S43_DEPS)),)
+-include $(S43_DEPS)
+endif
+ifneq ($(strip $(OPT_DEPS)),)
+-include $(OPT_DEPS)
+endif
+ifneq ($(strip $(S64_DEPS)),)
+-include $(S64_DEPS)
+endif
+ifneq ($(strip $(C_UPPER_DEPS)),)
+-include $(C_UPPER_DEPS)
+endif
+ifneq ($(strip $(C55_DEPS)),)
+-include $(C55_DEPS)
+endif
+endif
+
+-include ../makefile.defs
+
+# Add inputs and outputs from these tool invocations to the build variables 
+
+# All Target
+all: matrix_clock.out
+
+# Tool invocations
+matrix_clock.out: $(OBJS) $(CMD_SRCS) $(GEN_CMDS)
+	@echo 'Building target: $@'
+	@echo 'Invoking: MSP430 Linker'
+	"C:/ti/ccsv5/tools/compiler/msp430_4.1.1/bin/cl430" -vmsp --abi=eabi -O2 --advice:power=all --define=__MSP430G2452__ --diag_warning=225 --display_error_number --diag_wrap=off --printf_support=minimal -z --stack_size=80 -m"matrix_clock.map" --heap_size=80 -i"C:/ti/ccsv5/ccs_base/msp430/include" -i"C:/ti/ccsv5/tools/compiler/msp430_4.1.1/lib" -i"C:/ti/ccsv5/tools/compiler/msp430_4.1.1/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --rom_model -o "matrix_clock.out" $(ORDERED_OBJS)
+	@echo 'Finished building target: $@'
+	@echo ' '
+
+# Other Targets
+clean:
+	-$(RM) $(MSP430_EXECUTABLE_OUTPUTS__QUOTED) "matrix_clock.out"
+	-$(RM) "main.pp" 
+	-$(RM) "main.obj" 
+	-@echo 'Finished clean'
+	-@echo ' '
+
+.PHONY: all clean dependents
+.SECONDARY:
+
+-include ../makefile.targets

+ 489 - 0
alarm_clock/matrix_clock/Release/matrix_clock.map

@@ -0,0 +1,489 @@
+******************************************************************************
+                  MSP430 Linker PC v4.1.1                      
+******************************************************************************
+>> Linked Wed Jun 05 20:18:56 2013
+
+OUTPUT FILE NAME:   <matrix_clock.out>
+ENTRY POINT SYMBOL: "_c_int00"  address: 0000f3e8
+
+
+MEMORY CONFIGURATION
+
+         name            origin    length      used     unused   attr    fill
+----------------------  --------  ---------  --------  --------  ----  --------
+  SFR                   00000000   00000010  00000000  00000010  RWIX
+  PERIPHERALS_8BIT      00000010   000000f0  00000000  000000f0  RWIX
+  PERIPHERALS_16BIT     00000100   00000100  00000000  00000100  RWIX
+  RAM                   00000200   00000100  00000076  0000008a  RWIX
+  INFOD                 00001000   00000040  00000000  00000040  RWIX
+  INFOC                 00001040   00000040  00000000  00000040  RWIX
+  INFOB                 00001080   00000040  00000000  00000040  RWIX
+  INFOA                 000010c0   00000040  00000000  00000040  RWIX
+  FLASH                 0000e000   00001fe0  000014b3  00000b2d  RWIX
+  INT00                 0000ffe0   00000002  00000000  00000002  RWIX
+  INT01                 0000ffe2   00000002  00000000  00000002  RWIX
+  INT02                 0000ffe4   00000002  00000002  00000000  RWIX
+  INT03                 0000ffe6   00000002  00000002  00000000  RWIX
+  INT04                 0000ffe8   00000002  00000002  00000000  RWIX
+  INT05                 0000ffea   00000002  00000002  00000000  RWIX
+  INT06                 0000ffec   00000002  00000000  00000002  RWIX
+  INT07                 0000ffee   00000002  00000000  00000002  RWIX
+  INT08                 0000fff0   00000002  00000002  00000000  RWIX
+  INT09                 0000fff2   00000002  00000002  00000000  RWIX
+  INT10                 0000fff4   00000002  00000002  00000000  RWIX
+  INT11                 0000fff6   00000002  00000002  00000000  RWIX
+  INT12                 0000fff8   00000002  00000000  00000002  RWIX
+  INT13                 0000fffa   00000002  00000000  00000002  RWIX
+  INT14                 0000fffc   00000002  00000002  00000000  RWIX
+  RESET                 0000fffe   00000002  00000002  00000000  RWIX
+
+
+SECTION ALLOCATION MAP
+
+ output                                  attributes/
+section   page    origin      length       input sections
+--------  ----  ----------  ----------   ----------------
+.init_array 
+*          0    0000e000    00000000     UNINITIALIZED
+
+.data      0    00000200    00000016     
+                  00000200    00000016     main.obj (.data)
+
+.TI.persistent 
+*          0    00000200    00000000     UNINITIALIZED
+
+.bss       0    00000216    00000010     UNINITIALIZED
+                  00000216    00000010     main.obj (.bss)
+
+.TI.noinit 
+*          0    00000216    00000000     UNINITIALIZED
+
+.stack     0    000002b0    00000050     UNINITIALIZED
+                  000002b0    00000002     rts430_eabi.lib : boot.obj (.stack)
+                  000002b2    0000004e     --HOLE--
+
+.const     0    0000e000    00000a83     
+                  0000e000    00000a00     main.obj (.const:.string:tune)
+                  0000ea00    00000062     main.obj (.const:scale)
+                  0000ea62    00000021     main.obj (.const:glyph)
+
+.text      0    0000ea84    00000a10     
+                  0000ea84    0000030a     main.obj (.text:_Z7WDT_ISRv)
+                  0000ed8e    000001cc     main.obj (.text:_Z9render_fbv)
+                  0000ef5a    000000be     main.obj (.text:main)
+                  0000f018    0000006a     main.obj (.text:_Z16config_registersv)
+                  0000f082    00000066     main.obj (.text:_Z10display_fbv)
+                  0000f0e8    0000005e     rts430_eabi.lib : copy_decompress_rle.obj (.text:__TI_decompress_rle_core)
+                  0000f146    0000005e                     : autoinit.obj (.text:_auto_init)
+                  0000f1a4    00000056     main.obj (.text:_Z5on_fbv)
+                  0000f1fa    00000054     main.obj (.text:_Z6off_fbv)
+                  0000f24e    00000052     main.obj (.text:_Z5sleepv)
+                  0000f2a0    0000004c     rts430_eabi.lib : lsr16.obj (.text)
+                  0000f2ec    0000003c     main.obj (.text:_Z10select_rowa)
+                  0000f328    0000003c     main.obj (.text:_Z9shift_rowa)
+                  0000f364    0000002c     rts430_eabi.lib : asr16.obj (.text)
+                  0000f390    0000002c                     : div16s.obj (.text)
+                  0000f3bc    0000002c                     : lsl16.obj (.text)
+                  0000f3e8    0000001a                     : boot.obj (.text:_c_int00_noexit)
+                  0000f402    00000016     main.obj (.text:_Z8clear_fbv)
+                  0000f418    00000016     rts430_eabi.lib : div16u.obj (.text)
+                  0000f42e    00000014                     : copy_zero_init.obj (.text:decompress:ZI:__TI_zero_init)
+                  0000f442    00000012                     : copy_decompress_none.obj (.text:decompress:none:__TI_decompress_none)
+                  0000f454    00000012                     : memcpy.obj (.text:memcpy)
+                  0000f466    00000010                     : epilog.obj (.text)
+                  0000f476    00000006                     : copy_decompress_rle.obj (.text:decompress:rle24:__TI_decompress_rle24)
+                  0000f47c    00000004                     : pre_init.obj (.text:_system_pre_init)
+                  0000f480    00000004                     : exit.obj (.text:abort)
+                  0000f484    00000002     main.obj (.text:_Z13TIMER0_A0_ISRv)
+                  0000f486    00000002     main.obj (.text:_Z13TIMER0_A1_ISRv)
+                  0000f488    00000002     main.obj (.text:_Z15COMPARATORA_ISRv)
+                  0000f48a    00000002     main.obj (.text:_Z7NMI_ISRv)
+                  0000f48c    00000002     main.obj (.text:_Z7USI_ISRv)
+                  0000f48e    00000002     main.obj (.text:_Z9ADC10_ISRv)
+                  0000f490    00000002     main.obj (.text:_Z9PORT1_ISRv)
+                  0000f492    00000002     main.obj (.text:_Z9PORT2_ISRv)
+
+.cinit     0    0000f494    00000020     
+                  0000f494    0000000d     (.cinit..data.load) [load image, compression = rle]
+                  0000f4a1    00000001     --HOLE-- [fill = 0]
+                  0000f4a2    00000006     (__TI_handler_table)
+                  0000f4a8    00000004     (.cinit..bss.load) [load image, compression = zero_init]
+                  0000f4ac    00000008     (__TI_cinit_table)
+
+PORT1      0    0000ffe4    00000002     
+                  0000ffe4    00000002     main.obj (.int02)
+
+PORT2      0    0000ffe6    00000002     
+                  0000ffe6    00000002     main.obj (.int03)
+
+USI        0    0000ffe8    00000002     
+                  0000ffe8    00000002     main.obj (.int04)
+
+ADC10      0    0000ffea    00000002     
+                  0000ffea    00000002     main.obj (.int05)
+
+TIMER0_A1 
+*          0    0000fff0    00000002     
+                  0000fff0    00000002     main.obj (.int08)
+
+TIMER0_A0 
+*          0    0000fff2    00000002     
+                  0000fff2    00000002     main.obj (.int09)
+
+WDT        0    0000fff4    00000002     
+                  0000fff4    00000002     main.obj (.int10)
+
+COMPARATORA 
+*          0    0000fff6    00000002     
+                  0000fff6    00000002     main.obj (.int11)
+
+NMI        0    0000fffc    00000002     
+                  0000fffc    00000002     main.obj (.int14)
+
+.reset     0    0000fffe    00000002     
+                  0000fffe    00000002     rts430_eabi.lib : boot.obj (.reset)
+
+
+LINKER GENERATED COPY TABLES
+
+__TI_cinit_table @ 0000f4ac records: 2, size/record: 4, table size: 8
+	.data: load addr=0000f494, load size=0000000d bytes, run addr=00000200, run size=00000016 bytes, compression=rle
+	.bss: load addr=0000f4a8, load size=00000004 bytes, run addr=00000216, run size=00000010 bytes, compression=zero_init
+
+
+LINKER GENERATED HANDLER TABLE
+
+__TI_handler_table @ 0000f4a2 records: 3, size/record: 2, table size: 6
+	index: 0, handler: __TI_zero_init
+	index: 1, handler: __TI_decompress_rle24
+	index: 2, handler: __TI_decompress_none
+
+
+GLOBAL SYMBOLS: SORTED ALPHABETICALLY BY Name 
+
+address    name
+--------   ----
+0000004a   ADC10AE0
+000001b0   ADC10CTL0
+000001b2   ADC10CTL1
+00000048   ADC10DTC0
+00000049   ADC10DTC1
+000001b4   ADC10MEM
+000001bc   ADC10SA
+00000057   BCSCTL1
+00000058   BCSCTL2
+00000053   BCSCTL3
+0000f480   C$$EXIT
+00000059   CACTL1
+0000005a   CACTL2
+000010fb   CALBC1_12MHZ
+000010f9   CALBC1_16MHZ
+000010ff   CALBC1_1MHZ
+000010fd   CALBC1_8MHZ
+000010fa   CALDCO_12MHZ
+000010f8   CALDCO_16MHZ
+000010fe   CALDCO_1MHZ
+000010fc   CALDCO_8MHZ
+0000005b   CAPD
+00000056   DCOCTL
+00000128   FCTL1
+0000012a   FCTL2
+0000012c   FCTL3
+00000000   IE1
+00000002   IFG1
+00000022   P1DIR
+00000025   P1IE
+00000024   P1IES
+00000023   P1IFG
+00000020   P1IN
+00000021   P1OUT
+00000027   P1REN
+00000026   P1SEL
+00000041   P1SEL2
+0000002a   P2DIR
+0000002d   P2IE
+0000002c   P2IES
+0000002b   P2IFG
+00000028   P2IN
+00000029   P2OUT
+0000002f   P2REN
+0000002e   P2SEL
+00000042   P2SEL2
+00000172   TA0CCR0
+00000174   TA0CCR1
+00000176   TA0CCR2
+00000162   TA0CCTL0
+00000164   TA0CCTL1
+00000166   TA0CCTL2
+00000160   TA0CTL
+0000012e   TA0IV
+00000170   TA0R
+0000007a   USICCTL
+0000007a   USICKCTL
+0000007b   USICNT
+00000078   USICTL
+00000078   USICTL0
+00000079   USICTL1
+0000007c   USISR
+0000007d   USISRH
+0000007c   USISRL
+00000120   WDTCTL
+0000f484   _Z13TIMER0_A0_ISRv
+0000f486   _Z13TIMER0_A1_ISRv
+0000f488   _Z15COMPARATORA_ISRv
+0000f48a   _Z7NMI_ISRv
+0000f48c   _Z7USI_ISRv
+0000ea84   _Z7WDT_ISRv
+0000f48e   _Z9ADC10_ISRv
+0000f490   _Z9PORT1_ISRv
+0000f492   _Z9PORT2_ISRv
+00000300   __STACK_END
+00000050   __STACK_SIZE
+0000f4ac   __TI_CINIT_Base
+0000f4b4   __TI_CINIT_Limit
+0000f4a2   __TI_Handler_Table_Base
+0000f4a8   __TI_Handler_Table_Limit
+UNDEFED    __TI_INITARRAY_Base
+UNDEFED    __TI_INITARRAY_Limit
+00000001   __TI_args_main
+0000f442   __TI_decompress_none
+0000f476   __TI_decompress_rle24
+00000001   __TI_exit
+0000f42e   __TI_zero_init
+ffffffff   __binit__
+ffffffff   __c_args__
+0000f390   __mspabi_divi
+0000f418   __mspabi_divu
+0000f472   __mspabi_func_epilog_1
+0000f470   __mspabi_func_epilog_2
+0000f46e   __mspabi_func_epilog_3
+0000f46c   __mspabi_func_epilog_4
+0000f46a   __mspabi_func_epilog_5
+0000f468   __mspabi_func_epilog_6
+0000f466   __mspabi_func_epilog_7
+0000f390   __mspabi_remi
+0000f418   __mspabi_remu
+0000f3bc   __mspabi_slli
+0000f3e4   __mspabi_slli_1
+0000f3d2   __mspabi_slli_10
+0000f3d0   __mspabi_slli_11
+0000f3ce   __mspabi_slli_12
+0000f3cc   __mspabi_slli_13
+0000f3ca   __mspabi_slli_14
+0000f3c8   __mspabi_slli_15
+0000f3e2   __mspabi_slli_2
+0000f3e0   __mspabi_slli_3
+0000f3de   __mspabi_slli_4
+0000f3dc   __mspabi_slli_5
+0000f3da   __mspabi_slli_6
+0000f3d8   __mspabi_slli_7
+0000f3d6   __mspabi_slli_8
+0000f3d4   __mspabi_slli_9
+0000f364   __mspabi_srai
+0000f38c   __mspabi_srai_1
+0000f37a   __mspabi_srai_10
+0000f378   __mspabi_srai_11
+0000f376   __mspabi_srai_12
+0000f374   __mspabi_srai_13
+0000f372   __mspabi_srai_14
+0000f370   __mspabi_srai_15
+0000f38a   __mspabi_srai_2
+0000f388   __mspabi_srai_3
+0000f386   __mspabi_srai_4
+0000f384   __mspabi_srai_5
+0000f382   __mspabi_srai_6
+0000f380   __mspabi_srai_7
+0000f37e   __mspabi_srai_8
+0000f37c   __mspabi_srai_9
+0000f2a0   __mspabi_srli
+0000f2e6   __mspabi_srli_1
+0000f2c2   __mspabi_srli_10
+0000f2be   __mspabi_srli_11
+0000f2ba   __mspabi_srli_12
+0000f2b6   __mspabi_srli_13
+0000f2b2   __mspabi_srli_14
+0000f2ae   __mspabi_srli_15
+0000f2e2   __mspabi_srli_2
+0000f2de   __mspabi_srli_3
+0000f2da   __mspabi_srli_4
+0000f2d6   __mspabi_srli_5
+0000f2d2   __mspabi_srli_6
+0000f2ce   __mspabi_srli_7
+0000f2ca   __mspabi_srli_8
+0000f2c6   __mspabi_srli_9
+0000f146   _auto_init
+0000f3e8   _c_int00
+0000f3e8   _c_int00_noexit
+0000fffe   _reset_vector
+000002b0   _stack
+0000f47c   _system_pre_init
+0000f480   abort
+ffffffff   binit
+0000ef5a   main
+0000f454   memcpy
+
+
+GLOBAL SYMBOLS: SORTED BY Symbol Address 
+
+address    name
+--------   ----
+00000000   IE1
+00000001   __TI_args_main
+00000001   __TI_exit
+00000002   IFG1
+00000020   P1IN
+00000021   P1OUT
+00000022   P1DIR
+00000023   P1IFG
+00000024   P1IES
+00000025   P1IE
+00000026   P1SEL
+00000027   P1REN
+00000028   P2IN
+00000029   P2OUT
+0000002a   P2DIR
+0000002b   P2IFG
+0000002c   P2IES
+0000002d   P2IE
+0000002e   P2SEL
+0000002f   P2REN
+00000041   P1SEL2
+00000042   P2SEL2
+00000048   ADC10DTC0
+00000049   ADC10DTC1
+0000004a   ADC10AE0
+00000050   __STACK_SIZE
+00000053   BCSCTL3
+00000056   DCOCTL
+00000057   BCSCTL1
+00000058   BCSCTL2
+00000059   CACTL1
+0000005a   CACTL2
+0000005b   CAPD
+00000078   USICTL
+00000078   USICTL0
+00000079   USICTL1
+0000007a   USICCTL
+0000007a   USICKCTL
+0000007b   USICNT
+0000007c   USISR
+0000007c   USISRL
+0000007d   USISRH
+00000120   WDTCTL
+00000128   FCTL1
+0000012a   FCTL2
+0000012c   FCTL3
+0000012e   TA0IV
+00000160   TA0CTL
+00000162   TA0CCTL0
+00000164   TA0CCTL1
+00000166   TA0CCTL2
+00000170   TA0R
+00000172   TA0CCR0
+00000174   TA0CCR1
+00000176   TA0CCR2
+000001b0   ADC10CTL0
+000001b2   ADC10CTL1
+000001b4   ADC10MEM
+000001bc   ADC10SA
+000002b0   _stack
+00000300   __STACK_END
+000010f8   CALDCO_16MHZ
+000010f9   CALBC1_16MHZ
+000010fa   CALDCO_12MHZ
+000010fb   CALBC1_12MHZ
+000010fc   CALDCO_8MHZ
+000010fd   CALBC1_8MHZ
+000010fe   CALDCO_1MHZ
+000010ff   CALBC1_1MHZ
+0000ea84   _Z7WDT_ISRv
+0000ef5a   main
+0000f146   _auto_init
+0000f2a0   __mspabi_srli
+0000f2ae   __mspabi_srli_15
+0000f2b2   __mspabi_srli_14
+0000f2b6   __mspabi_srli_13
+0000f2ba   __mspabi_srli_12
+0000f2be   __mspabi_srli_11
+0000f2c2   __mspabi_srli_10
+0000f2c6   __mspabi_srli_9
+0000f2ca   __mspabi_srli_8
+0000f2ce   __mspabi_srli_7
+0000f2d2   __mspabi_srli_6
+0000f2d6   __mspabi_srli_5
+0000f2da   __mspabi_srli_4
+0000f2de   __mspabi_srli_3
+0000f2e2   __mspabi_srli_2
+0000f2e6   __mspabi_srli_1
+0000f364   __mspabi_srai
+0000f370   __mspabi_srai_15
+0000f372   __mspabi_srai_14
+0000f374   __mspabi_srai_13
+0000f376   __mspabi_srai_12
+0000f378   __mspabi_srai_11
+0000f37a   __mspabi_srai_10
+0000f37c   __mspabi_srai_9
+0000f37e   __mspabi_srai_8
+0000f380   __mspabi_srai_7
+0000f382   __mspabi_srai_6
+0000f384   __mspabi_srai_5
+0000f386   __mspabi_srai_4
+0000f388   __mspabi_srai_3
+0000f38a   __mspabi_srai_2
+0000f38c   __mspabi_srai_1
+0000f390   __mspabi_divi
+0000f390   __mspabi_remi
+0000f3bc   __mspabi_slli
+0000f3c8   __mspabi_slli_15
+0000f3ca   __mspabi_slli_14
+0000f3cc   __mspabi_slli_13
+0000f3ce   __mspabi_slli_12
+0000f3d0   __mspabi_slli_11
+0000f3d2   __mspabi_slli_10
+0000f3d4   __mspabi_slli_9
+0000f3d6   __mspabi_slli_8
+0000f3d8   __mspabi_slli_7
+0000f3da   __mspabi_slli_6
+0000f3dc   __mspabi_slli_5
+0000f3de   __mspabi_slli_4
+0000f3e0   __mspabi_slli_3
+0000f3e2   __mspabi_slli_2
+0000f3e4   __mspabi_slli_1
+0000f3e8   _c_int00
+0000f3e8   _c_int00_noexit
+0000f418   __mspabi_divu
+0000f418   __mspabi_remu
+0000f42e   __TI_zero_init
+0000f442   __TI_decompress_none
+0000f454   memcpy
+0000f466   __mspabi_func_epilog_7
+0000f468   __mspabi_func_epilog_6
+0000f46a   __mspabi_func_epilog_5
+0000f46c   __mspabi_func_epilog_4
+0000f46e   __mspabi_func_epilog_3
+0000f470   __mspabi_func_epilog_2
+0000f472   __mspabi_func_epilog_1
+0000f476   __TI_decompress_rle24
+0000f47c   _system_pre_init
+0000f480   C$$EXIT
+0000f480   abort
+0000f484   _Z13TIMER0_A0_ISRv
+0000f486   _Z13TIMER0_A1_ISRv
+0000f488   _Z15COMPARATORA_ISRv
+0000f48a   _Z7NMI_ISRv
+0000f48c   _Z7USI_ISRv
+0000f48e   _Z9ADC10_ISRv
+0000f490   _Z9PORT1_ISRv
+0000f492   _Z9PORT2_ISRv
+0000f4a2   __TI_Handler_Table_Base
+0000f4a8   __TI_Handler_Table_Limit
+0000f4ac   __TI_CINIT_Base
+0000f4b4   __TI_CINIT_Limit
+0000fffe   _reset_vector
+ffffffff   __binit__
+ffffffff   __c_args__
+ffffffff   binit
+UNDEFED    __TI_INITARRAY_Base
+UNDEFED    __TI_INITARRAY_Limit
+
+[158 symbols]

BIN
alarm_clock/matrix_clock/Release/matrix_clock.out


+ 8 - 0
alarm_clock/matrix_clock/Release/objects.mk

@@ -0,0 +1,8 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+USER_OBJS :=
+
+LIBS := $(GEN_CMDS__FLAG) -l"libc.a"
+

+ 99 - 0
alarm_clock/matrix_clock/Release/sources.mk

@@ -0,0 +1,99 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+O_SRCS := 
+CPP_SRCS := 
+K_SRCS := 
+LD_SRCS := 
+S67_SRCS := 
+CMD_SRCS := 
+CXX_SRCS := 
+CMD_UPPER_SRCS := 
+C43_SRCS := 
+S55_SRCS := 
+LD_UPPER_SRCS := 
+C62_SRCS := 
+S_UPPER_SRCS := 
+A_SRCS := 
+C55_SRCS := 
+SA_SRCS := 
+C_UPPER_SRCS := 
+OBJ_SRCS := 
+S62_SRCS := 
+LIB_SRCS := 
+ASM_SRCS := 
+S??_SRCS := 
+C++_SRCS := 
+CLA_SRCS := 
+ASM_UPPER_SRCS := 
+C_SRCS := 
+C67_SRCS := 
+S_SRCS := 
+S43_SRCS := 
+OPT_SRCS := 
+C64_SRCS := 
+C??_SRCS := 
+CC_SRCS := 
+S64_SRCS := 
+OBJS := 
+S_DEPS := 
+S_UPPER_DEPS := 
+S62_DEPS := 
+C64_DEPS := 
+ASM_DEPS := 
+CC_DEPS := 
+S55_DEPS := 
+C67_DEPS := 
+C??_DEPS := 
+CLA_DEPS := 
+CPP_DEPS := 
+S??_DEPS := 
+C_DEPS := 
+MSP430_EXECUTABLE_OUTPUTS := 
+C62_DEPS := 
+CXX_DEPS := 
+C++_DEPS := 
+ASM_UPPER_DEPS := 
+K_DEPS := 
+C43_DEPS := 
+S67_DEPS := 
+SA_DEPS := 
+S43_DEPS := 
+OPT_DEPS := 
+S64_DEPS := 
+C_UPPER_DEPS := 
+C55_DEPS := 
+CPP_DEPS__QUOTED := 
+C67_DEPS__QUOTED := 
+C??_DEPS__QUOTED := 
+S_UPPER_DEPS__QUOTED := 
+CLA_DEPS__QUOTED := 
+ASM_UPPER_DEPS__QUOTED := 
+MSP430_EXECUTABLE_OUTPUTS__QUOTED := 
+C62_DEPS__QUOTED := 
+CXX_DEPS__QUOTED := 
+S67_DEPS__QUOTED := 
+C_DEPS__QUOTED := 
+C_UPPER_DEPS__QUOTED := 
+OPT_DEPS__QUOTED := 
+S_DEPS__QUOTED := 
+S??_DEPS__QUOTED := 
+K_DEPS__QUOTED := 
+C64_DEPS__QUOTED := 
+C++_DEPS__QUOTED := 
+OBJS__QUOTED := 
+S43_DEPS__QUOTED := 
+CC_DEPS__QUOTED := 
+S55_DEPS__QUOTED := 
+C55_DEPS__QUOTED := 
+SA_DEPS__QUOTED := 
+C43_DEPS__QUOTED := 
+S62_DEPS__QUOTED := 
+ASM_DEPS__QUOTED := 
+S64_DEPS__QUOTED := 
+
+# Every subdirectory with source files must be described here
+SUBDIRS := \
+. \
+

+ 13 - 0
alarm_clock/matrix_clock/Release/subdir_rules.mk

@@ -0,0 +1,13 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+# Each subdirectory must supply rules for building sources it contributes
+main.obj: ../main.cpp $(GEN_OPTS) $(GEN_SRCS)
+	@echo 'Building file: $<'
+	@echo 'Invoking: MSP430 Compiler'
+	"C:/ti/ccsv5/tools/compiler/msp430_4.1.1/bin/cl430" -vmsp --abi=eabi -O2 --include_path="C:/ti/ccsv5/ccs_base/msp430/include" --include_path="C:/ti/ccsv5/tools/compiler/msp430_4.1.1/include" --advice:power=all --define=__MSP430G2452__ --diag_warning=225 --display_error_number --diag_wrap=off --printf_support=minimal --preproc_with_compile --preproc_dependency="main.pp" $(GEN_OPTS__FLAG) "$<"
+	@echo 'Finished building: $<'
+	@echo ' '
+
+

+ 27 - 0
alarm_clock/matrix_clock/Release/subdir_vars.mk

@@ -0,0 +1,27 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+# Add inputs and outputs from these tool invocations to the build variables 
+CPP_SRCS += \
+../main.cpp 
+
+CMD_SRCS += \
+../lnk_msp430g2452.cmd 
+
+OBJS += \
+./main.obj 
+
+CPP_DEPS += \
+./main.pp 
+
+CPP_DEPS__QUOTED += \
+"main.pp" 
+
+OBJS__QUOTED += \
+"main.obj" 
+
+CPP_SRCS__QUOTED += \
+"../main.cpp" 
+
+

+ 13 - 0
alarm_clock/matrix_clock/glyphs.h

@@ -0,0 +1,13 @@
+const uint8_t glyph[ 11 ][ 3 ] = {
+    31, 17, 31, // 0
+    00, 00, 31, // 1
+    29, 21, 23, // 2
+    21, 21, 31, // 3
+    07, 04, 31, // 4
+    23, 21, 29, // 5
+    31, 21, 29, // 6
+    01, 01, 31, // 7
+    31, 21, 31, // 8
+    23, 21, 31, // 9
+    00, 00, 00, // none
+};

+ 100 - 0
alarm_clock/matrix_clock/lnk_msp430g2452.cmd

@@ -0,0 +1,100 @@
+/******************************************************************************/
+/* lnk_msp430g2452.cmd - LINKER COMMAND FILE FOR LINKING MSP430G2452 PROGRAMS     */
+/*                                                                            */
+/*   Usage:  lnk430 <obj files...>    -o <out file> -m <map file> lnk.cmd     */
+/*           cl430  <src files...> -z -o <out file> -m <map file> lnk.cmd     */
+/*                                                                            */
+/*----------------------------------------------------------------------------*/
+/* These linker options are for command line linking only.  For IDE linking,  */
+/* you should set your linker options in Project Properties                   */
+/* -c                                               LINK USING C CONVENTIONS  */
+/* -stack  0x0100                                   SOFTWARE STACK SIZE       */
+/* -heap   0x0100                                   HEAP AREA SIZE            */
+/*                                                                            */
+/*----------------------------------------------------------------------------*/
+
+
+/****************************************************************************/
+/* SPECIFY THE SYSTEM MEMORY MAP                                            */
+/****************************************************************************/
+
+MEMORY
+{
+    SFR                     : origin = 0x0000, length = 0x0010
+    PERIPHERALS_8BIT        : origin = 0x0010, length = 0x00F0
+    PERIPHERALS_16BIT       : origin = 0x0100, length = 0x0100
+    RAM                     : origin = 0x0200, length = 0x0100
+    INFOA                   : origin = 0x10C0, length = 0x0040
+    INFOB                   : origin = 0x1080, length = 0x0040
+    INFOC                   : origin = 0x1040, length = 0x0040
+    INFOD                   : origin = 0x1000, length = 0x0040
+    FLASH                   : origin = 0xE000, length = 0x1FE0
+    INT00                   : origin = 0xFFE0, length = 0x0002
+    INT01                   : origin = 0xFFE2, length = 0x0002
+    INT02                   : origin = 0xFFE4, length = 0x0002
+    INT03                   : origin = 0xFFE6, length = 0x0002
+    INT04                   : origin = 0xFFE8, length = 0x0002
+    INT05                   : origin = 0xFFEA, length = 0x0002
+    INT06                   : origin = 0xFFEC, length = 0x0002
+    INT07                   : origin = 0xFFEE, length = 0x0002
+    INT08                   : origin = 0xFFF0, length = 0x0002
+    INT09                   : origin = 0xFFF2, length = 0x0002
+    INT10                   : origin = 0xFFF4, length = 0x0002
+    INT11                   : origin = 0xFFF6, length = 0x0002
+    INT12                   : origin = 0xFFF8, length = 0x0002
+    INT13                   : origin = 0xFFFA, length = 0x0002
+    INT14                   : origin = 0xFFFC, length = 0x0002
+    RESET                   : origin = 0xFFFE, length = 0x0002
+}
+
+/****************************************************************************/
+/* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY                              */
+/****************************************************************************/
+
+SECTIONS
+{
+    .bss        : {} > RAM                /* GLOBAL & STATIC VARS              */
+    .data       : {} > RAM                /* GLOBAL & STATIC VARS              */
+    .sysmem     : {} > RAM                /* DYNAMIC MEMORY ALLOCATION AREA    */
+    .stack      : {} > RAM (HIGH)         /* SOFTWARE SYSTEM STACK             */
+
+    .text       : {} > FLASH              /* CODE                              */
+    .cinit      : {} > FLASH              /* INITIALIZATION TABLES             */
+    .const      : {} > FLASH              /* CONSTANT DATA                     */
+    .cio        : {} > RAM                /* C I/O BUFFER                      */
+
+    .pinit      : {} > FLASH              /* C++ CONSTRUCTOR TABLES            */
+    .init_array : {} > FLASH              /* C++ CONSTRUCTOR TABLES            */
+    .mspabi.exidx : {} > FLASH            /* C++ CONSTRUCTOR TABLES            */
+    .mspabi.extab : {} > FLASH            /* C++ CONSTRUCTOR TABLES            */
+
+    .infoA     : {} > INFOA              /* MSP430 INFO FLASH MEMORY SEGMENTS */
+    .infoB     : {} > INFOB
+    .infoC     : {} > INFOC
+    .infoD     : {} > INFOD
+
+    /* MSP430 INTERRUPT VECTORS          */
+    .int00       : {}               > INT00
+    .int01       : {}               > INT01
+    PORT1        : { * ( .int02 ) } > INT02 type = VECT_INIT
+    PORT2        : { * ( .int03 ) } > INT03 type = VECT_INIT
+    USI          : { * ( .int04 ) } > INT04 type = VECT_INIT
+    ADC10        : { * ( .int05 ) } > INT05 type = VECT_INIT
+    .int06       : {}               > INT06
+    .int07       : {}               > INT07
+    TIMER0_A1    : { * ( .int08 ) } > INT08 type = VECT_INIT
+    TIMER0_A0    : { * ( .int09 ) } > INT09 type = VECT_INIT
+    WDT          : { * ( .int10 ) } > INT10 type = VECT_INIT
+    COMPARATORA   : { * ( .int11 ) } > INT11 type = VECT_INIT
+    .int12       : {}               > INT12
+    .int13       : {}               > INT13
+    NMI          : { * ( .int14 ) } > INT14 type = VECT_INIT
+    .reset       : {}               > RESET  /* MSP430 RESET VECTOR         */ 
+}
+
+/****************************************************************************/
+/* INCLUDE PERIPHERALS MEMORY MAP                                           */
+/****************************************************************************/
+
+-l msp430g2452.cmd
+

+ 619 - 0
alarm_clock/matrix_clock/main.cpp

@@ -0,0 +1,619 @@
+//
+//   ^ Vcc   MSP430G2452      GND              ^ Vcc                   ^ Vcc
+//   |     /-------------\     |               |                       |
+//   +--- -| Vcc  U  GND |- ---+              | | 47 k                === 100 nF
+//      0 -| P1.0   XTAL |- ------+ Crystal   | |                      |
+//      1 -| P1.1   XTAL |- --|O|-+ 32768 Hz   |                      --- GND
+//      2 -| P1.2   TEST |- -------------------|--o TEST   +--------+
+//      3 -| P1.3   ~RST |- -------------------+--o ~RST   |        |
+//      4 -| P1.4   P1.7 |- BUTTON_1 connected to Vcc      |       === 10 uF
+//      5 -| P1.5   P1.6 |---------------------------------+        |
+//      6 -| P2.0   P2.5 |- BUTTON_2 connected to Vcc      | LED    - /| Coil-
+//      7 -| P2.1   P2.4 |- SR_RCK (latch clock)        / \|/      | | | Speaker
+//  SR_SI -| P2.2   P2.3 |- SR_SCK (shift clock)       v/ ---       - \| (16 R)
+//         \-------------/                             v   |        |
+//   0..7 LED row select                                  --- GND  --- GND
+//
+//
+//   Vcc               Vcc  +----------------+         Vcc
+//     ^     SI   RCK    ^  |      Vcc ^     |    RCK    ^
+//     |  Al | GND | SCK |  |          |  Ar | GND | SCK |
+//     |  |  |  |  |  |  |  |          |  |  |  |  |  |  |  |
+//   /------------------------\      /------------------------\
+//   |Vcc QA SI OE      RST H |      |Vcc QA SI OE      RST H |
+//   |>       MC74HC595       |      |>       MC74HC595       |
+//   |QB QC QD QE QF QG QH GND|      |QB QC QD QE QF QG QH GND|
+//   \------------------------/      \------------------------/
+//     |  |  |  |  |  |  |  |          |  |  |  |  |  |  |  |
+//     Bl Cl Dl El Fl Gl Hl GND        Br Cr Dr Er Fr Gr Hr GND
+//      (left 8 LED columns)            (right 8 LED columns)
+//
+//
+//     A B C D E F G H
+//   0 o o o o o o o o         * A      C *
+//   1 o o o o o o o o       4 *        F *
+//   2 o o o o o o o o       2 *          * 3   the label is on
+//   3 o o o o o o o o         * D      H *     the right side:
+//   4 o o o o o o o o       7 *          * 5   (LD788BS-SS22)
+//   5 o o o o o o o o         * B        * 6
+//   6 o o o o o o o o       1 *        G *
+//   7 o o o o o o o o       0 *        E *
+//
+//   0..7 (-) cathode        pin assignment as
+//   A..H (+) anode          seen from the top
+
+#include <stdint.h>
+
+#include <msp430g2452.h>
+
+#include "glyphs.h"
+#include "tune.h"
+
+#define SR_SI BIT2 // Serial Data Input
+#define SR_SCK BIT3 // Clock Input
+#define SR_RCK BIT4 // Storage Register Clock Input
+
+#define BUZZER BIT6
+#define BUTTON_1 BIT7
+#define BUTTON_2 BIT5
+
+#define DISPLAYING_LIMIT 3 // Seconds
+#define SHINING_LIMIT 60 // Seconds
+#define SHINING_WARN_TICKS 4
+
+static uint8_t fb[ 16 ]; // LED frame buffer
+static volatile uint8_t ticks = 0, seconds = 0, minutes = 0, hours = 0;
+static volatile uint8_t alarm_hour = 0, alarm_minute = 0;
+static volatile uint8_t ticks_at_button_press = 0;
+static volatile uint8_t displaying_watchdog = 0;
+static volatile uint8_t shining_watchdog = 0;
+static volatile bool alarm_is_active = false;
+static volatile bool go_to_sleep = false;
+static volatile bool tick_happened = false;
+static volatile uint16_t tune_index = 0;
+static volatile uint8_t tune_count = 0;
+
+enum TState { SLEEPING, SHINING,
+			  TIME_DISPLAYING, TIME_HOUR_EDITING, TIME_MINUTE_EDITING,
+			  ALARM_DISPLAYING, ALARM_HOUR_EDITING, ALARM_MINUTE_EDITING,
+			  ALARM_IS_ACTIVE_DISPLAYING, ALARM_IS_ACTIVE_EDITING,
+			  BLINKING, PLAYING };
+static volatile TState state = TIME_DISPLAYING;
+
+static void config_registers()
+{
+	WDTCTL = WDTPW | WDTHOLD;
+
+	DCOCTL = CALDCO_16MHZ;
+	BCSCTL1 = CALBC1_16MHZ;
+
+	BCSCTL3 |= LFXT1S_0 | XCAP_3; // Use Crystal as ACLK + 12.5 pF caps
+
+	WDTCTL = WDT_ADLY_16; // Interval timer mode using ACLK clock source
+	IE1 |= WDTIE;
+
+	P1OUT = 0x00;
+	P2OUT = 0x00;
+	P1DIR = 0xFF & ~BUTTON_1 & ~BUZZER; // All output except BUTTON_1 and BUZZER
+	P2DIR = 0xFF & ~BUTTON_2; // All output except BUTTON_2
+
+	P1OUT &= ~BUTTON_1; // select resistor to be pull-down
+	P2OUT &= ~BUTTON_2;
+	P1REN |= BUTTON_1; // enable resistor
+	P2REN |= BUTTON_2;
+	//P1IES &= ~BUTTON_1; // select the positive edge (low -> high transition) to cause an interrupt
+	//P2IES &= ~BUTTON_2;
+	//P1IFG &= ~BUTTON_1; // Clear any pending interrupt flags
+	//P2IFG &= ~BUTTON_2;
+	//P1IE |= BUTTON_1; // enable button interrupt
+	//P2IE |= BUTTON_2;
+
+	P1SEL |= BIT6; // enable Timer0_A Out1 function
+	TACCTL1 = OUTMOD_7; // Reset/set  |~~|_____
+	TACTL = TASSEL_2 | MC_1 | TACLR; // SMCLK + Up mode + Clear timer
+
+	TACCR0 = 1; // period
+	TACCR1 = 0; // 2 is permanent on, 0 is off when TACCR0 is 1.
+}
+
+static uint8_t shift_row( int8_t y )
+{
+	uint8_t on_led_count = 0;
+	P2OUT &= ~SR_RCK;
+	for ( uint8_t x = 0; x < 16; ++x ) {
+		P2OUT &= ~SR_SCK;
+		if ( fb[ 15 - x ] & ( 0x01 << y ) ) {
+			P2OUT |= SR_SI;
+			++on_led_count;
+		} else {
+			P2OUT &= ~SR_SI;
+		}
+		P2OUT |= SR_SCK;
+	}
+	return on_led_count;
+}
+
+static void select_row( int8_t  y )
+{
+	// Turn all rows off:
+	P1OUT |= 0x3F;
+	P2OUT |= 0x03;
+	// Strobe columns:
+	P2OUT |= SR_RCK;
+	// Select respective row:
+	if ( y >= 0 ) {
+		if ( y < 6 ) {
+			P1OUT &= ~( 0x01 << y );
+		} else {
+			P2OUT &= ~( 0x01 << ( y - 6 ) );
+		}
+	}
+}
+
+static void sleep()
+{
+	// Set columns low:
+	P2OUT &= ~SR_RCK;
+	for ( uint8_t x = 0; x < 16; ++x ) {
+		P2OUT &= ~SR_SCK;
+		P2OUT &= ~SR_SI;
+		P2OUT |= SR_SCK;
+	}
+	// Strobe columns:
+	P2OUT |= SR_RCK;
+	// Set rows low:
+	P1OUT &= ~0x3F;
+	P2OUT &= ~0x03;
+	// Set the rest low:
+	P2OUT &= ~( SR_SI | SR_SCK | SR_RCK );
+	TACCR0 = 1;
+	TACCR1 = 0;              // Discharge the 10 uF capacitor, otherwise the
+	__delay_cycles( 16000 ); // device consumes over 40 uA in sleep mode.
+	// Change Buzzer to input:
+	P1DIR &= ~BUZZER;
+	// Go to sleep:
+	LPM3;
+}
+
+static void clear_fb()
+{
+	for ( uint8_t i = 0; i < sizeof( fb ); ++i ) {
+		fb[ i ] = 0;
+	}
+}
+
+static void on_fb()
+{
+	fb[  0 ] = 0x00;
+	fb[  1 ] = 0x3C;
+	fb[  2 ] = 0x24;
+	fb[  3 ] = 0x3C;
+	fb[  4 ] = 0x42;
+	fb[  5 ] = 0x81;
+	fb[  6 ] = 0xFF;
+	fb[  7 ] = 0x00;
+	fb[  8 ] = 0x00;
+	fb[  9 ] = 0x24;
+	fb[ 10 ] = 0x18;
+	fb[ 11 ] = 0x42;
+	fb[ 12 ] = 0x3C;
+	fb[ 13 ] = 0x81;
+	fb[ 14 ] = 0x7E;
+	fb[ 15 ] = 0x00;
+}
+
+static void off_fb()
+{
+	fb[  0 ] = 0x00;
+	fb[  1 ] = 0x3C;
+	fb[  2 ] = 0x24;
+	fb[  3 ] = 0x3C;
+	fb[  4 ] = 0x42;
+	fb[  5 ] = 0x81;
+	fb[  6 ] = 0xFF;
+	fb[  7 ] = 0x00;
+	fb[  8 ] = 0x00;
+	fb[  9 ] = 0x42;
+	fb[ 10 ] = 0x24;
+	fb[ 11 ] = 0x18;
+	fb[ 12 ] = 0x18;
+	fb[ 13 ] = 0x24;
+	fb[ 14 ] = 0x42;
+	fb[ 15 ] = 0x00;
+}
+
+static void render_fb()
+{
+	const bool is_off_interval = ( ticks - ticks_at_button_press + 64 ) % 64 > 32;
+
+	if ( ( state == PLAYING && ticks > 32 ) ||
+		 ( state == ALARM_IS_ACTIVE_EDITING && is_off_interval ) )
+	{
+		clear_fb();
+		return;
+	}
+
+	uint8_t hour, minute;
+	bool display_blinking_point = false;
+	switch ( state ) {
+	case TIME_DISPLAYING:
+	case TIME_HOUR_EDITING:
+	case TIME_MINUTE_EDITING:
+	case BLINKING:
+	case PLAYING:
+		hour = hours;
+		minute = minutes;
+		display_blinking_point = true;
+		break;
+	case ALARM_DISPLAYING:
+	case ALARM_HOUR_EDITING:
+	case ALARM_MINUTE_EDITING:
+		hour = alarm_hour;
+		minute = alarm_minute;
+		break;
+	}
+	if ( state == ALARM_IS_ACTIVE_DISPLAYING || state == ALARM_IS_ACTIVE_EDITING ) {
+		if ( alarm_is_active ) {
+			on_fb();
+		} else {
+			off_fb();
+		}
+	} else {
+		uint8_t digit_1 = hour / 10;
+		uint8_t digit_2 = hour % 10;
+		uint8_t digit_3 = minute / 10;
+		uint8_t digit_4 = minute % 10;
+		if ( ( state == TIME_HOUR_EDITING || state == ALARM_HOUR_EDITING ) && is_off_interval ) {
+			digit_1 = digit_2 = 10; // none
+		} else if ( digit_1 == 0 ) {
+			digit_1 = 10; // none
+		}
+		if ( ( state == TIME_MINUTE_EDITING || state == ALARM_MINUTE_EDITING ) && is_off_interval ) {
+			digit_3 = digit_4 = 10; // none
+		}
+		fb[  0 ] = glyph[ digit_1 ][ 0 ];
+		fb[  1 ] = glyph[ digit_1 ][ 1 ];
+		fb[  2 ] = glyph[ digit_1 ][ 2 ];
+		fb[  3 ] = 0;
+		fb[  4 ] = glyph[ digit_2 ][ 0 ];
+		fb[  5 ] = glyph[ digit_2 ][ 1 ];
+		fb[  6 ] = glyph[ digit_2 ][ 2 ];
+		fb[  7 ] = 0;
+		fb[  8 ] = 0;
+		fb[  9 ] = glyph[ digit_3 ][ 0 ];
+		fb[ 10 ] = glyph[ digit_3 ][ 1 ];
+		fb[ 11 ] = glyph[ digit_3 ][ 2 ];
+		fb[ 12 ] = 0;
+		fb[ 13 ] = glyph[ digit_4 ][ 0 ];
+		fb[ 14 ] = glyph[ digit_4 ][ 1 ];
+		fb[ 15 ] = glyph[ digit_4 ][ 2 ];
+
+		if ( display_blinking_point && ticks < 32 ) {
+			fb[ seconds >> 2 ] |= 192;
+		}
+
+		if ( alarm_is_active ) {
+			fb[ 15 ] |= 192;
+		}
+	}
+}
+
+static void display_fb()
+{
+	for ( int8_t y = 7; y >= 0; --y ) {
+		uint8_t on_led_count = shift_row( y ) + 2; // Without adding some value, single dots are to dark.
+		const uint8_t max_led_count = 14;
+		if ( on_led_count > max_led_count ) {
+			on_led_count = max_led_count;
+		}
+		select_row( y );
+		const uint16_t delay = 357; // 16E6 / ( 300 * 14(=max_led_count) ) / 8 rows = 400.16 Hz
+		for ( uint8_t i = 0; i < on_led_count; ++i ) {
+			__delay_cycles( delay );
+		}
+		select_row( -1 );
+		for ( uint8_t i = 0; i < max_led_count - on_led_count; ++i ) {
+			__delay_cycles( delay );
+		}
+	}
+}
+
+int main( void )
+{
+	config_registers();
+	clear_fb();
+	_enable_interrupts();
+
+	while ( true ) {
+		if ( go_to_sleep ) {
+			go_to_sleep = false;
+			state = SLEEPING;
+			sleep();
+		}
+		if ( tick_happened ) {
+			tick_happened = false;
+			switch ( state ) {
+			case SHINING:
+				if ( shining_watchdog + SHINING_WARN_TICKS > SHINING_LIMIT ) {
+					TACCR1 = ticks == 0 ? 0 : 2;
+				}
+				break;
+			case BLINKING:
+				if ( seconds < 30 ) {
+					TACCR1 = seconds % 2 ? 0 : 2;
+				} else {
+					TACCR1 = ( ticks & 0x0F ) == 0 ? 2 : 0;
+				}
+				break;
+			case PLAYING:
+				if ( ( ticks & 0x01 ) == 0 ) {
+					const uint16_t period = scale[ tune[ tune_index ] ];
+					TACCR0 = period;
+					TACCR1 = period >> 1;
+					++tune_index;
+					if ( tune_index == sizeof( tune ) ) {
+						tune_index = 0; // be kind, rewind :)
+						++tune_count;
+						if ( tune_count == 2 ) {
+							tune_count = 0 ;
+							go_to_sleep = true; // All attempts were in vain.
+						}
+					}
+				}
+				break;
+			}
+			render_fb();
+		}
+		if ( state != SHINING ) {
+			display_fb(); // Does busy waiting.
+		}
+	}
+}
+
+#pragma vector = WDT_VECTOR
+__interrupt void WDT_ISR( void )
+{
+	// called 64 times per second.  Consumes about 2.6 uA @ 3.3 V.  Device works down to 2.4 V.
+
+	tick_happened = true;
+	++ticks;
+	if ( ticks == 64 ) {
+		ticks = 0;
+		++seconds;
+		if ( seconds == 60 ) {
+			seconds = 0;
+			++minutes;
+			if ( minutes == 60 ) {
+				minutes = 0;
+				++hours;
+				if ( hours == 24 ) {
+					hours = 0;
+					//seconds = 1; // correction for too slow quarz
+					__delay_cycles( 16000000 ); // correction for too fast quarz
+				}
+			}
+			if ( alarm_is_active && hours == alarm_hour && minutes == alarm_minute ) {
+				state = BLINKING;
+				P1DIR |= BUZZER;
+				TACCR0 = 1;
+				TACCR1 = 0; // 2 is permanent on, 0 is off when TACCR0 is 1.
+				LPM3_EXIT;
+			} else if ( state == BLINKING ) {
+				state = PLAYING; // Play a delightful tune.
+				tune_index = 0;
+			}
+		}
+		switch ( state ) {
+		case TIME_DISPLAYING:
+		case ALARM_IS_ACTIVE_DISPLAYING:
+		case ALARM_DISPLAYING:
+			++displaying_watchdog;
+			if ( displaying_watchdog > DISPLAYING_LIMIT ) {
+				go_to_sleep = true;
+			}
+			break;
+		case SHINING:
+			++shining_watchdog;
+			if ( shining_watchdog > SHINING_LIMIT ) {
+				go_to_sleep = true;
+			}
+			break;
+		}
+
+	}
+
+	enum TButtonState { RELEASED, PRESSED, HELD };
+	static volatile TButtonState button1_state = RELEASED;
+	if ( ( P1IN & BUTTON_1 ) == BUTTON_1 ) {
+		if ( button1_state == RELEASED ) {
+			button1_state = PRESSED;
+			switch ( state ) {
+			case SLEEPING:
+				state = TIME_DISPLAYING;
+				LPM3_EXIT;
+				break;
+			case SHINING:
+				if ( shining_watchdog + SHINING_WARN_TICKS > SHINING_LIMIT ) {
+					shining_watchdog = 0;
+				} else {
+					go_to_sleep = true;
+				}
+				break;
+			case TIME_DISPLAYING:
+				state = alarm_is_active ? ALARM_DISPLAYING : ALARM_IS_ACTIVE_DISPLAYING;
+				break;
+			case ALARM_IS_ACTIVE_DISPLAYING:
+			case ALARM_DISPLAYING:
+				go_to_sleep = true;
+				break;
+			case TIME_HOUR_EDITING:
+				hours = ++hours;
+				if ( hours == 24 ) {
+					hours = 0;
+				}
+				break;
+			case TIME_MINUTE_EDITING:
+				minutes = ++minutes;
+				if ( minutes == 60 ) {
+					minutes = 0;
+				}
+				seconds = 0;
+				ticks = 0;
+				break;
+			case ALARM_IS_ACTIVE_EDITING:
+				alarm_is_active ^= 1;
+				break;
+			case ALARM_HOUR_EDITING:
+				alarm_hour = ++alarm_hour;
+				if ( alarm_hour == 24 ) {
+					alarm_hour = 0;
+				}
+				break;
+			case ALARM_MINUTE_EDITING:
+				alarm_minute = alarm_minute + 5;
+				if ( alarm_minute == 60 ) {
+					alarm_minute = 0;
+				}
+				break;
+			case BLINKING:
+			case PLAYING:
+				go_to_sleep = true;
+				break;
+			}
+			displaying_watchdog = 0;
+			ticks_at_button_press = ticks;
+		} else if ( button1_state == HELD && ( ( ticks & 0x07 ) == 0 ) ) {
+			switch ( state ) {
+			case TIME_HOUR_EDITING:
+				hours = ++hours;
+				if ( hours == 24 ) {
+					hours = 0;
+				}
+				break;
+			case TIME_MINUTE_EDITING:
+				minutes = ++minutes;
+				if ( minutes == 60 ) {
+					minutes = 0;
+				}
+				seconds = 0;
+				ticks = 0;
+				break;
+			case ALARM_HOUR_EDITING:
+				alarm_hour = ++alarm_hour;
+				if ( alarm_hour == 24 ) {
+					alarm_hour = 0;
+				}
+				break;
+			case ALARM_MINUTE_EDITING:
+				alarm_minute = alarm_minute + 5;
+				if ( alarm_minute == 60 ) {
+					alarm_minute = 0;
+				}
+				break;
+			}
+			displaying_watchdog = 0;
+			ticks_at_button_press = ticks;
+		} else if ( ( ticks - ticks_at_button_press + 64 ) % 64 > 24 ) {
+			button1_state = HELD;
+		}
+	} else {
+		button1_state = RELEASED;
+	}
+
+	static volatile TButtonState button2_state = RELEASED;
+	if ( ( P2IN & BUTTON_2 ) == BUTTON_2 ) {
+		if ( button2_state == RELEASED ) {
+			button2_state = PRESSED;
+			bool start_blinking_with_OFF_period = true;
+			switch ( state ) {
+			case SLEEPING:
+				state = SHINING; // Consumes about 20 mA in SHINING state.
+				P1DIR |= BUZZER;
+				TACCR0 = 1;
+				TACCR1 = 2; // 2 is permanent on, 0 is off when TACCR0 is 1.
+				shining_watchdog = 0;
+				LPM3_EXIT;
+				break;
+			case SHINING:
+				if ( shining_watchdog + SHINING_WARN_TICKS > SHINING_LIMIT ) {
+					shining_watchdog = 0;
+				} else {
+					go_to_sleep = true;
+				}
+				break;
+			case TIME_DISPLAYING:
+				state = TIME_HOUR_EDITING;
+				break;
+			case TIME_HOUR_EDITING:
+				state = TIME_MINUTE_EDITING;
+				break;
+			case TIME_MINUTE_EDITING:
+				state = TIME_DISPLAYING;
+				break;
+			case ALARM_DISPLAYING:
+				start_blinking_with_OFF_period = false;
+				// Fall through intended.
+			case ALARM_IS_ACTIVE_DISPLAYING:
+				state = ALARM_IS_ACTIVE_EDITING;
+				break;
+			case ALARM_IS_ACTIVE_EDITING:
+				state = alarm_is_active ? ALARM_HOUR_EDITING : ALARM_IS_ACTIVE_DISPLAYING;
+				start_blinking_with_OFF_period = false;
+				break;
+			case ALARM_HOUR_EDITING:
+				state = ALARM_MINUTE_EDITING;
+				break;
+			case ALARM_MINUTE_EDITING:
+				//state = ALARM_IS_ACTIVE_DISPLAYING;
+				state = ALARM_DISPLAYING;
+				break;
+			case BLINKING:
+			case PLAYING:
+				go_to_sleep = true;
+				break;
+			}
+			displaying_watchdog = 0;
+			if ( start_blinking_with_OFF_period ) {
+				//ticks_at_button_press = ( ticks + 31 ) % 64; // immediately off for 1/2 second           ____|~~~~|____|~~
+				ticks_at_button_press = ( ticks + 16 ) % 64; // first off time is 1/4 second             __|~~~~|____|~~~~
+			} else {
+				//ticks_at_button_press = ticks;               // immediately on for 1/2 second            ~~~~|____|~~~~|__
+				ticks_at_button_press = ( ticks + 48 ) % 64; // 1/4 second delay before blinking starts  ~~|____|~~~~|____
+			}
+		}
+	} else {
+		button2_state = RELEASED;
+	}
+
+	// The interrupt flag is cleared automatically.
+}
+
+#pragma vector = PORT1_VECTOR
+__interrupt void PORT1_ISR( void )
+{
+	//P1IFG &= ~BUTTON_1; // clear the interrupt flag
+}
+
+#pragma vector = PORT2_VECTOR
+__interrupt void PORT2_ISR( void )
+{
+	//P2IFG &= ~BUTTON_2; // clear the interrupt flag
+}
+
+#pragma vector = USI_VECTOR
+__interrupt void USI_ISR( void ) {}
+
+#pragma vector = ADC10_VECTOR
+__interrupt void ADC10_ISR( void ) {}
+
+#pragma vector = TIMER0_A1_VECTOR
+__interrupt void TIMER0_A1_ISR( void ) {}
+
+#pragma vector = TIMER0_A0_VECTOR
+__interrupt void TIMER0_A0_ISR( void ) {}
+
+#pragma vector = COMPARATORA_VECTOR
+__interrupt void COMPARATORA_ISR( void ) {}
+
+#pragma vector = NMI_VECTOR
+__interrupt void NMI_ISR( void ) {}

+ 90 - 0
alarm_clock/matrix_clock/tune.h

@@ -0,0 +1,90 @@
+const uint16_t scale[ 49 ] = {
+    61156, 57724, 54484, 51426, 48540, 45815, 43244, 40817, 38526, 36364, 34323, 32396,
+    30578, 28862, 27242, 25713, 24270, 22908, 21622, 20408, 19263, 18182, 17161, 16198,
+    15289, 14431, 13621, 12856, 12135, 11454, 10811, 10204, 9631, 9091, 8581, 8099,
+    7645, 7215, 6810, 6428, 6067, 5727, 5405, 5102, 4816, 4545, 4290, 4050,
+    3822
+};
+
+const uint8_t tune[ 2560 ] = {
+    15, 12, 7, 12, 15, 12, 7, 12, 15, 12, 7, 12, 15, 12, 7, 12, 15, 12, 7, 12, 15, 12, 7, 12, 17, 12, 9, 12, 17, 12, 9, 12,
+    17, 12, 9, 12, 17, 12, 9, 12, 17, 12, 9, 12, 17, 12, 9, 12, 17, 12, 9, 12, 17, 12, 9, 12, 17, 12, 9, 12, 17, 12, 9, 12,
+    15, 12, 7, 12, 15, 12, 7, 12, 15, 12, 7, 12, 15, 12, 7, 12, 15, 12, 7, 12, 15, 12, 7, 12, 14, 10, 7, 10, 14, 10, 7, 10,
+    14, 10, 7, 10, 14, 10, 7, 10, 14, 10, 7, 10, 14, 10, 7, 10, 14, 10, 7, 10, 14, 10, 7, 10, 14, 10, 7, 10, 14, 10, 7, 10,
+    15, 12, 7, 12, 15, 12, 7, 12, 15, 12, 7, 12, 15, 12, 7, 12, 15, 12, 7, 12, 15, 12, 7, 12, 17, 12, 9, 12, 17, 12, 9, 12,
+    17, 12, 9, 12, 17, 12, 9, 12, 17, 12, 9, 12, 17, 12, 9, 12, 17, 12, 9, 12, 17, 12, 9, 12, 17, 12, 9, 12, 17, 12, 9, 12,
+    15, 12, 8, 12, 15, 12, 8, 12, 15, 12, 8, 12, 15, 12, 8, 12, 15, 12, 8, 12, 15, 12, 8, 12, 17, 14, 10, 14, 17, 14, 10, 14,
+    17, 14, 10, 14, 17, 14, 10, 14, 17, 14, 10, 14, 17, 14, 10, 14, 17, 14, 10, 14, 17, 14, 10, 14, 17, 14, 10, 14, 17, 14, 10, 14,
+    15, 12, 7, 12, 15, 12, 7, 12, 15, 12, 7, 12, 15, 12, 7, 12, 15, 12, 7, 12, 15, 12, 7, 12, 17, 12, 9, 12, 17, 12, 9, 12,
+    17, 12, 9, 12, 17, 12, 9, 12, 17, 12, 9, 12, 17, 12, 9, 12, 17, 12, 9, 12, 17, 12, 9, 12, 17, 12, 9, 12, 17, 12, 9, 12,
+    15, 12, 7, 12, 15, 12, 7, 12, 15, 12, 7, 12, 15, 12, 7, 12, 15, 12, 7, 12, 15, 12, 7, 12, 14, 10, 7, 10, 14, 10, 7, 10,
+    14, 10, 7, 10, 14, 10, 7, 10, 14, 10, 7, 10, 14, 10, 7, 10, 14, 10, 7, 10, 14, 10, 7, 10, 14, 10, 7, 10, 14, 10, 7, 10,
+    15, 12, 7, 12, 15, 12, 7, 12, 15, 12, 7, 12, 15, 12, 7, 12, 15, 12, 7, 12, 15, 12, 7, 12, 17, 12, 9, 12, 17, 12, 9, 12,
+    17, 12, 9, 12, 17, 12, 9, 12, 17, 12, 9, 12, 17, 12, 9, 12, 17, 12, 9, 12, 17, 12, 9, 12, 17, 12, 9, 12, 17, 12, 9, 12,
+    15, 12, 8, 12, 15, 12, 8, 12, 15, 12, 8, 12, 15, 12, 8, 12, 15, 12, 8, 12, 15, 12, 8, 12, 17, 14, 10, 14, 17, 14, 10, 14,
+    17, 14, 10, 14, 17, 14, 10, 14, 17, 14, 10, 14, 17, 14, 10, 14, 17, 14, 10, 14, 17, 14, 10, 14, 17, 14, 10, 14, 17, 14, 10, 14,
+    24, 12, 7, 12, 15, 12, 7, 12, 26, 12, 7, 12, 15, 12, 7, 12, 27, 12, 7, 12, 15, 12, 7, 12, 31, 12, 9, 12, 29, 12, 9, 12,
+    17, 12, 9, 12, 17, 12, 9, 12, 27, 12, 9, 12, 17, 12, 9, 12, 26, 12, 9, 12, 17, 12, 9, 12, 27, 12, 9, 12, 26, 12, 9, 12,
+    15, 12, 7, 12, 15, 12, 7, 12, 24, 12, 7, 12, 15, 12, 7, 12, 26, 12, 7, 12, 15, 12, 7, 12, 24, 10, 7, 10, 22, 10, 7, 10,
+    14, 10, 7, 10, 14, 10, 7, 10, 19, 10, 7, 10, 14, 10, 7, 10, 22, 10, 7, 10, 14, 10, 7, 10, 27, 10, 7, 10, 24, 10, 7, 10,
+    15, 12, 7, 12, 15, 12, 7, 12, 24, 12, 7, 12, 15, 12, 7, 12, 26, 12, 7, 12, 15, 12, 7, 12, 27, 12, 9, 12, 29, 12, 9, 12,
+    17, 12, 9, 12, 17, 12, 9, 12, 27, 12, 9, 12, 17, 12, 9, 12, 26, 12, 9, 12, 17, 12, 9, 12, 27, 12, 9, 12, 31, 12, 9, 12,
+    15, 12, 8, 12, 15, 12, 8, 12, 29, 12, 8, 12, 15, 12, 8, 12, 31, 12, 8, 12, 15, 12, 8, 12, 34, 14, 10, 14, 31, 14, 10, 14,
+    17, 14, 10, 14, 34, 14, 10, 14, 31, 14, 10, 14, 17, 14, 10, 14, 34, 14, 10, 14, 31, 14, 10, 14, 17, 14, 10, 14, 17, 14, 10, 14,
+    24, 12, 7, 12, 15, 12, 7, 12, 26, 12, 7, 12, 15, 12, 7, 12, 27, 12, 7, 12, 15, 12, 7, 12, 31, 12, 9, 12, 29, 12, 9, 12,
+    17, 12, 9, 12, 17, 12, 9, 12, 27, 12, 9, 12, 17, 12, 9, 12, 26, 12, 9, 12, 17, 12, 9, 12, 27, 12, 9, 12, 26, 12, 9, 12,
+    15, 12, 7, 12, 15, 12, 7, 12, 24, 12, 7, 12, 15, 12, 7, 12, 26, 12, 7, 12, 15, 12, 7, 12, 24, 10, 7, 10, 22, 10, 7, 10,
+    14, 10, 7, 10, 14, 10, 7, 10, 19, 10, 7, 10, 14, 10, 7, 10, 22, 10, 7, 10, 14, 10, 7, 10, 27, 10, 7, 10, 24, 10, 7, 10,
+    15, 12, 7, 12, 15, 12, 7, 12, 24, 12, 7, 12, 15, 12, 7, 12, 26, 12, 7, 12, 15, 12, 7, 12, 27, 12, 9, 12, 29, 12, 9, 12,
+    17, 12, 9, 12, 17, 12, 9, 12, 27, 12, 9, 12, 17, 12, 9, 12, 26, 12, 9, 12, 17, 12, 9, 12, 27, 12, 9, 12, 31, 12, 9, 12,
+    15, 12, 8, 12, 15, 12, 8, 12, 29, 12, 8, 12, 15, 12, 8, 12, 31, 12, 8, 12, 15, 12, 8, 12, 34, 14, 10, 14, 31, 14, 10, 14,
+    17, 14, 10, 14, 34, 14, 10, 14, 31, 14, 10, 14, 17, 14, 10, 14, 34, 14, 10, 14, 31, 14, 10, 14, 17, 14, 10, 14, 17, 14, 10, 14,
+    24, 12, 24, 12, 15, 12, 7, 12, 26, 12, 26, 12, 15, 12, 7, 12, 27, 12, 27, 12, 15, 12, 7, 12, 31, 12, 31, 12, 29, 12, 29, 12,
+    17, 12, 9, 12, 17, 12, 9, 12, 27, 12, 27, 12, 17, 12, 9, 12, 26, 12, 26, 12, 17, 12, 9, 12, 27, 12, 27, 12, 26, 12, 26, 12,
+    15, 12, 7, 12, 15, 12, 7, 12, 24, 12, 24, 12, 15, 12, 7, 12, 26, 12, 26, 12, 15, 12, 7, 12, 24, 10, 24, 10, 22, 10, 22, 10,
+    14, 10, 7, 10, 14, 10, 7, 10, 19, 10, 19, 10, 14, 10, 7, 10, 22, 10, 22, 10, 14, 10, 7, 10, 27, 10, 27, 10, 24, 10, 24, 10,
+    15, 12, 7, 12, 15, 12, 7, 12, 24, 12, 24, 12, 15, 12, 7, 12, 26, 12, 26, 12, 15, 12, 7, 12, 27, 12, 27, 12, 29, 12, 29, 12,
+    17, 12, 9, 12, 17, 12, 9, 12, 27, 12, 27, 12, 17, 12, 9, 12, 26, 12, 26, 12, 17, 12, 9, 12, 27, 12, 27, 12, 31, 12, 31, 12,
+    15, 12, 8, 12, 15, 12, 8, 12, 29, 12, 29, 12, 15, 12, 8, 12, 31, 12, 31, 12, 15, 12, 8, 12, 34, 14, 34, 14, 31, 14, 31, 14,
+    17, 14, 10, 14, 34, 14, 34, 14, 31, 14, 31, 14, 17, 14, 10, 14, 34, 14, 34, 14, 31, 14, 31, 14, 17, 14, 10, 14, 17, 14, 10, 14,
+    24, 12, 24, 12, 15, 12, 7, 12, 26, 12, 26, 12, 15, 12, 7, 12, 27, 12, 27, 12, 15, 12, 7, 12, 31, 12, 31, 12, 29, 12, 29, 12,
+    17, 12, 9, 12, 17, 12, 9, 12, 27, 12, 27, 12, 17, 12, 9, 12, 26, 12, 26, 12, 17, 12, 9, 12, 27, 12, 27, 12, 26, 12, 26, 12,
+    15, 12, 7, 12, 15, 12, 7, 12, 24, 12, 24, 12, 15, 12, 7, 12, 26, 12, 26, 12, 15, 12, 7, 12, 24, 10, 24, 10, 22, 10, 22, 10,
+    14, 10, 7, 10, 14, 10, 7, 10, 19, 10, 19, 10, 14, 10, 7, 10, 22, 10, 22, 10, 14, 10, 7, 10, 27, 10, 27, 10, 24, 10, 24, 10,
+    15, 12, 7, 12, 15, 12, 7, 12, 24, 12, 24, 12, 15, 12, 7, 12, 26, 12, 26, 12, 15, 12, 7, 12, 27, 12, 27, 12, 29, 12, 29, 12,
+    17, 12, 9, 12, 17, 12, 9, 12, 27, 12, 27, 12, 17, 12, 9, 12, 26, 12, 26, 12, 17, 12, 9, 12, 27, 12, 27, 12, 31, 12, 31, 12,
+    15, 12, 8, 12, 15, 12, 8, 12, 29, 12, 29, 12, 15, 12, 8, 12, 31, 12, 31, 12, 15, 12, 8, 12, 34, 14, 34, 14, 31, 14, 31, 14,
+    17, 14, 10, 14, 34, 14, 34, 14, 31, 14, 31, 14, 17, 14, 10, 14, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19,
+    15, 12, 7, 12, 15, 12, 7, 12, 24, 24, 24, 24, 15, 12, 7, 12, 19, 19, 19, 19, 15, 12, 7, 12, 24, 24, 24, 24, 17, 12, 9, 12,
+    24, 24, 24, 24, 17, 12, 9, 12, 21, 21, 21, 21, 17, 12, 9, 12, 24, 24, 24, 24, 17, 12, 9, 12, 21, 21, 21, 21, 17, 12, 9, 12,
+    15, 12, 7, 12, 15, 12, 7, 12, 24, 24, 24, 24, 15, 12, 7, 12, 19, 19, 19, 19, 15, 12, 7, 12, 24, 24, 24, 24, 14, 10, 7, 10,
+    22, 22, 22, 22, 14, 10, 7, 10, 19, 19, 19, 19, 14, 10, 7, 10, 22, 22, 22, 22, 14, 10, 7, 10, 19, 19, 19, 19, 14, 10, 7, 10,
+    15, 12, 7, 12, 15, 12, 7, 12, 24, 24, 24, 24, 15, 12, 7, 12, 19, 19, 19, 19, 15, 12, 7, 12, 24, 24, 24, 24, 17, 12, 9, 12,
+    24, 24, 24, 24, 17, 12, 9, 12, 21, 21, 21, 21, 17, 12, 9, 12, 24, 24, 24, 24, 17, 12, 9, 12, 21, 21, 21, 21, 17, 12, 9, 12,
+    17, 12, 9, 12, 15, 12, 8, 12, 24, 24, 24, 24, 15, 12, 8, 12, 20, 20, 20, 20, 15, 12, 8, 12, 24, 24, 24, 24, 17, 14, 10, 14,
+    26, 26, 26, 26, 17, 14, 10, 14, 22, 22, 22, 22, 17, 14, 10, 14, 26, 26, 26, 26, 17, 14, 10, 14, 22, 22, 22, 22, 17, 14, 10, 14,
+    15, 12, 7, 12, 15, 12, 7, 12, 24, 24, 24, 24, 15, 12, 7, 12, 19, 19, 19, 19, 15, 12, 7, 12, 24, 24, 24, 24, 17, 12, 9, 12,
+    24, 24, 24, 24, 17, 12, 9, 12, 21, 21, 21, 21, 17, 12, 9, 12, 24, 24, 24, 24, 17, 12, 9, 12, 21, 21, 21, 21, 17, 12, 9, 12,
+    15, 12, 7, 12, 15, 12, 7, 12, 24, 24, 24, 24, 15, 12, 7, 12, 19, 19, 19, 19, 15, 12, 7, 12, 24, 24, 24, 24, 14, 10, 7, 10,
+    22, 22, 22, 22, 14, 10, 7, 10, 19, 19, 19, 19, 14, 10, 7, 10, 22, 22, 22, 22, 14, 10, 7, 10, 19, 19, 19, 19, 14, 10, 7, 10,
+    15, 12, 7, 12, 15, 12, 7, 12, 24, 24, 24, 24, 15, 12, 7, 12, 19, 19, 19, 19, 15, 12, 7, 12, 24, 24, 24, 24, 17, 12, 9, 12,
+    24, 24, 24, 24, 17, 12, 9, 12, 21, 21, 21, 21, 17, 12, 9, 12, 24, 24, 24, 24, 17, 12, 9, 12, 21, 21, 21, 21, 17, 12, 9, 12,
+    17, 12, 9, 12, 15, 12, 8, 12, 24, 24, 24, 24, 15, 12, 8, 12, 20, 20, 20, 20, 15, 12, 8, 12, 24, 24, 24, 24, 17, 14, 10, 14,
+    26, 26, 26, 26, 17, 14, 10, 14, 22, 22, 22, 22, 17, 14, 10, 14, 26, 26, 26, 26, 17, 14, 10, 14, 22, 22, 22, 22, 17, 14, 10, 14,
+    15, 12, 7, 12, 15, 12, 7, 12, 24, 36, 24, 36, 15, 12, 7, 12, 19, 31, 19, 31, 15, 12, 7, 12, 24, 36, 24, 36, 17, 12, 9, 12,
+    24, 36, 24, 36, 17, 12, 9, 12, 21, 33, 21, 33, 17, 12, 9, 12, 24, 36, 24, 36, 17, 12, 9, 12, 21, 33, 21, 33, 17, 12, 9, 12,
+    15, 12, 7, 12, 15, 12, 7, 12, 24, 36, 24, 36, 15, 12, 7, 12, 19, 31, 19, 31, 15, 12, 7, 12, 24, 36, 24, 36, 14, 10, 7, 10,
+    22, 34, 22, 34, 14, 10, 7, 10, 19, 31, 19, 31, 14, 10, 7, 10, 22, 34, 22, 34, 14, 10, 7, 10, 19, 31, 19, 31, 14, 10, 7, 10,
+    15, 12, 7, 12, 15, 12, 7, 12, 24, 36, 24, 36, 15, 12, 7, 12, 19, 31, 19, 31, 15, 12, 7, 12, 24, 36, 24, 36, 17, 12, 9, 12,
+    24, 36, 24, 36, 17, 12, 9, 12, 21, 33, 21, 33, 17, 12, 9, 12, 24, 36, 24, 36, 17, 12, 9, 12, 21, 33, 21, 33, 17, 12, 9, 12,
+    17, 12, 9, 12, 15, 12, 8, 12, 24, 36, 24, 36, 15, 12, 8, 12, 20, 32, 20, 32, 15, 12, 8, 12, 24, 36, 24, 36, 17, 14, 10, 14,
+    26, 38, 26, 38, 17, 14, 10, 14, 22, 34, 22, 34, 17, 14, 10, 14, 26, 38, 26, 38, 17, 14, 10, 14, 22, 34, 22, 34, 17, 14, 10, 14,
+    15, 12, 7, 12, 15, 12, 7, 12, 24, 36, 24, 36, 15, 12, 7, 12, 19, 31, 19, 31, 15, 12, 7, 12, 24, 36, 24, 36, 17, 12, 9, 12,
+    24, 36, 24, 36, 17, 12, 9, 12, 21, 33, 21, 33, 17, 12, 9, 12, 24, 36, 24, 36, 17, 12, 9, 12, 21, 33, 21, 33, 17, 12, 9, 12,
+    15, 12, 7, 12, 15, 12, 7, 12, 24, 36, 24, 36, 15, 12, 7, 12, 19, 31, 19, 31, 15, 12, 7, 12, 24, 36, 24, 36, 14, 10, 7, 10,
+    22, 34, 22, 34, 14, 10, 7, 10, 19, 31, 19, 31, 14, 10, 7, 10, 22, 34, 22, 34, 14, 10, 7, 10, 19, 31, 19, 31, 14, 10, 7, 10,
+    15, 12, 7, 12, 15, 12, 7, 12, 24, 36, 24, 36, 15, 12, 7, 12, 19, 31, 19, 31, 15, 12, 7, 12, 24, 36, 24, 36, 17, 12, 9, 12,
+    24, 36, 24, 36, 17, 12, 9, 12, 21, 33, 21, 33, 17, 12, 9, 12, 24, 36, 24, 36, 17, 12, 9, 12, 21, 33, 21, 33, 17, 12, 9, 12,
+    17, 12, 9, 12, 15, 12, 8, 12, 24, 36, 24, 36, 15, 12, 8, 12, 20, 32, 20, 32, 15, 12, 8, 12, 24, 36, 24, 36, 17, 14, 10, 14,
+    26, 38, 26, 38, 17, 14, 10, 14, 22, 34, 22, 34, 17, 14, 10, 14, 26, 38, 26, 38, 17, 14, 10, 14, 22, 34, 22, 34, 17, 14, 10, 14,
+};

BIN
alarm_clock/source.zip


+ 19 - 0
blink/Makefile

@@ -0,0 +1,19 @@
+CC=msp430-gcc
+CFLAGS=-Os -Wall -g -mmcu=msp430g2553
+
+OBJS=main.o
+  
+   
+all: $(OBJS)
+	$(CC) $(CFLAGS) -o main.elf $(OBJS)
+	 
+%.o: %.c
+	$(CC) $(CFLAGS) -c $<
+	 
+clean:
+	rm -fr main.elf $(OBJS)
+	 
+upload:
+	mspdebug rf2500 "prog main.elf"
+
+

+ 23 - 0
blink/main.c

@@ -0,0 +1,23 @@
+
+
+#include <msp430g2553.h>
+ 
+#define LED1 BIT6
+#define LED0 BIT0
+  
+void delay_cycles(unsigned long long delay) {
+volatile unsigned long long i;
+for (i = 0; i < delay; i++);
+}
+		 
+int main(void)
+{
+	  
+P1DIR |= (LED1 | LED0);
+P1OUT &= (LED1 | LED0);
+while (1){
+P1OUT ^= (LED1 | LED0);
+delay_cycles(1000000000000);
+}
+return 0;
+}

BIN
blink/main.elf


BIN
blink/main.o


+ 19 - 0
bp_led/Makefile

@@ -0,0 +1,19 @@
+CC=msp430-gcc
+CFLAGS=-Os -Wall -g -mmcu=msp430g2553
+
+OBJS=main.o
+  
+   
+all: $(OBJS)
+	$(CC) $(CFLAGS) -o main.elf $(OBJS)
+	 
+%.o: %.c
+	$(CC) $(CFLAGS) -c $<
+	 
+clean:
+	rm -fr main.elf $(OBJS)
+	 
+upload:
+	mspdebug rf2500 "prog main.elf"
+
+

+ 29 - 0
bp_led/main.c

@@ -0,0 +1,29 @@
+#include <msp430g2553.h>
+
+void main(void) {
+
+	WDTCTL = WDTPW + WDTHOLD;	//desactiver le watchdog
+	P1DIR |= 0x41;			//passage de p1.0 et p1.6 en sortie
+	P1OUT &= ~0x41;			//on met les 2 sorties a 0
+
+	P1REN |= BIT3;  
+	P1IE |= BIT3;			//P1.3 activer interruption
+	P1IFG &= ~BIT3;		//P1.3 IFG cleared
+
+	__enable_interrupt();
+
+
+
+}
+
+// Port 1 interrupt service routine
+#pragma vector=PORT1_VECTOR
+__interrupt void Port_1(void)
+{
+
+P1OUT ^= 0x41; // P1.0 = toggle
+P1IFG &= ~BIT3; // P1.3 IFG cleared
+P1IES ^= BIT3; // toggle the interrupt edge,
+// the interrupt vector will be called
+//when P1.3 goes from HitoLow as well as LowtoHigh
+}

BIN
bp_led/main.elf


BIN
bp_led/main.o


BIN
clock/.main.c.swp


+ 19 - 0
clock/Makefile

@@ -0,0 +1,19 @@
+CC=msp430-gcc
+CFLAGS=-Os -Wall -g -mmcu=msp430g2553
+
+OBJS=main.o
+  
+   
+all: $(OBJS)
+	$(CC) $(CFLAGS) -o main.elf $(OBJS)
+	 
+%.o: %.c
+	$(CC) $(CFLAGS) -c $<
+	 
+clean:
+	rm -fr main.elf $(OBJS)
+	 
+upload:
+	mspdebug rf2500 "prog main.elf"
+
+

+ 174 - 0
clock/main.c

@@ -0,0 +1,174 @@
+#include <msp430g2553.h>
+
+#define TRIGGER 12000
+
+#define DATA BIT0 //DS 1.0
+#define CLOCK BIT4 // SH_CP 1.4
+#define LATCH BIT5 // ST_CP 1.5
+#define ENABLE BIT6 // OE 1.6
+#define BUTTON BIT3 // BP 1.3
+#define DIGIT1 BIT3
+#define DIGIT2 BIT2
+#define DIGIT3 BIT1
+#define DIGIT4 BIT0
+
+#define B0 0b11111100
+#define B1 0b01100000
+#define B2 0b11011010
+#define B3 0b11110010
+#define B4 0b01100110
+#define B5 0b10110110
+#define B6 0b10111110
+#define B7 0b11100000
+#define B8 0b11111110
+#define B9 0b11110110
+
+
+//Declaration des prototypes de fonctions
+void delay(unsigned int ms);
+void enable(void);
+void shiftOut(unsigned char val);
+void pinWrite(unsigned int bit, unsigned char val);
+void pulseClock(void);
+
+void configTimerA2(void);
+
+void main(void) {
+	WDTCTL = WDTPW + WDTHOLD;			//stop watchdog
+	P1DIR |= (DATA + CLOCK + LATCH + ENABLE);	//mise en sortie
+	P2DIR |= (DIGIT1 + DIGIT2 + DIGIT3 + DIGIT4);
+
+	P1OUT |= ENABLE;		//activer le OE sur shift
+	P2OUT &= ~DIGIT1;
+	P2OUT &= ~DIGIT2;
+	P2OUT &= ~DIGIT3;
+	P2OUT &= ~DIGIT4;
+
+
+	int i, m=0, c=0, d=0, u=0;
+	for(;;) {
+		P2OUT |= DIGIT1;
+		switch(u) {
+			case 0: { shiftOut(B0); break;}
+			case 1: { shiftOut(B1); break;}
+			case 2: { shiftOut(B2); break;}
+			case 3: { shiftOut(B3); break;}
+			case 4: { shiftOut(B4); break;}
+			case 5: { shiftOut(B5); break;}
+			case 6: { shiftOut(B6); break;}
+			case 7: { shiftOut(B7); break;}
+			case 8: { shiftOut(B8); break;}
+			case 9: { shiftOut(B9); break;}
+		}
+		u++;
+		if(u>9) {
+			d++;
+			u=0;
+		}
+		
+		P2OUT &= ~DIGIT1;
+		P2OUT |= DIGIT2;
+                switch(d) {
+	                case 0: { shiftOut(B0); break;}
+			case 1: { shiftOut(B1); break;}
+                        case 2: { shiftOut(B2); break;}
+			case 3: { shiftOut(B3); break;}
+			case 4: { shiftOut(B4); break;}
+			case 5: { shiftOut(B5); break;}
+			case 6: { shiftOut(B6); break;}
+			case 7: { shiftOut(B7); break;}
+			case 8: { shiftOut(B8); break;}
+			case 9: { shiftOut(B9); break;}
+		}
+		
+		if(d>9) {
+			c++;
+			d=0;
+		}
+		
+		P2OUT &= ~DIGIT2;
+		P2OUT |= DIGIT3;	
+
+		switch(c) {
+			case 0: { shiftOut(B0); break;}
+			case 1: { shiftOut(B1); break;}
+                        case 2: { shiftOut(B2); break;}
+			case 3: { shiftOut(B3); break;}
+			case 4: { shiftOut(B4); break;}
+			case 5: { shiftOut(B5); break;}
+			case 6: { shiftOut(B6); break;}
+			case 7: { shiftOut(B7); break;}
+			case 8: { shiftOut(B8); break;}
+			case 9: { shiftOut(B9); break;}
+		}
+		P2OUT &= ~DIGIT3;
+		P2OUT |= DIGIT4;	
+
+		switch(m) {
+			case 0: { shiftOut(B0); break;}
+			case 1: { shiftOut(B1); break;}
+                        case 2: { shiftOut(B2); break;}
+			case 3: { shiftOut(B3); break;}
+			case 4: { shiftOut(B4); break;}
+			case 5: { shiftOut(B5); break;}
+			case 6: { shiftOut(B6); break;}
+			case 7: { shiftOut(B7); break;}
+			case 8: { shiftOut(B8); break;}
+			case 9: { shiftOut(B9); break;}
+		}
+		P2OUT &= ~DIGIT4;
+	}
+
+
+
+
+}
+	
+
+void configTimerA2(void) {
+	CCTL0 = CCIE;
+	CCR0 = 12000;
+	TACTL = TASSEL_1 + MC_2; // TimerA control register = select ACLK2 + Continous mode
+	_BIS_SR(GIE);
+	
+}
+
+
+void delay(unsigned int ms) {
+	while(ms--) {
+		__delay_cycles(1000);
+	}
+}
+
+void shiftOut(unsigned char val) {
+
+	P1OUT &= ~LATCH;
+
+	int i;
+
+	for(i=0; i<8; i++) {
+		pinWrite(DATA, (val & (1 << i)));
+		pulseClock();
+	}
+
+	P1OUT |= LATCH;
+	P1OUT &= ~LATCH;
+
+}
+
+void pinWrite(unsigned int bit, unsigned char val) {
+	if(val) P1OUT |= bit;
+	else P1OUT &= ~bit;
+}
+
+void pulseClock(void) {
+	P1OUT |= CLOCK;
+	P1OUT &= ~CLOCK;
+}
+
+
+#pragma vector=TIMERA0_VECTOR
+      __interrupt void Timer_A(void) {
+
+}
+

BIN
clock/main.o


+ 19 - 0
clock_test/Makefile

@@ -0,0 +1,19 @@
+CC=msp430-gcc
+CFLAGS=-Os -Wall -g -mmcu=msp430g2553
+
+OBJS=main.o
+  
+   
+all: $(OBJS)
+	$(CC) $(CFLAGS) -o main.elf $(OBJS)
+	 
+%.o: %.c
+	$(CC) $(CFLAGS) -c $<
+	 
+clean:
+	rm -fr main.elf $(OBJS)
+	 
+upload:
+	mspdebug rf2500 "prog main.elf"
+
+

+ 26 - 0
clock_test/main.c

@@ -0,0 +1,26 @@
+#include <msp430g2553.h>
+
+void main (void)
+{
+	WDTCTL = WDTPW + WDTHOLD;
+
+	P1DIR = 0x41;
+	P1OUT = 0x01;
+
+	BCSCTL3 |= LFXT1S_2;
+	IFG1 &= ~OFIFG;
+	__bis_SR_register(SCG1 + SCG0);
+	BCSCTL2 |= SELM_3 + DIVM_3;
+
+	while (1)
+	{
+		P1OUT = 0x41;
+		__delay_cycles(100);
+                P1OUT = 0x00;
+		__delay_cycles(100);
+                P1OUT = 0x40;
+		__delay_cycles(100);
+		P1OUT = 0x00;
+		__delay_cycles(1000);
+	}
+}

BIN
clock_test/main.elf


BIN
clock_test/main.o


+ 19 - 0
led_matrix_pattern/Makefile

@@ -0,0 +1,19 @@
+CC=msp430-gcc
+CFLAGS=-Os -Wall -g -mmcu=msp430g2553
+
+OBJS=main.o
+  
+   
+all: $(OBJS)
+	$(CC) $(CFLAGS) -o main.elf $(OBJS)
+	 
+%.o: %.c
+	$(CC) $(CFLAGS) -c $<
+	 
+clean:
+	rm -fr main.elf $(OBJS)
+	 
+upload:
+	mspdebug rf2500 "prog main.elf"
+
+

+ 79 - 0
led_matrix_pattern/main.c

@@ -0,0 +1,79 @@
+#include <msp430g2553.h>
+
+// 74HC Pins
+#define DATA BIT0 //DS 1.0
+#define CLOCK BIT4 // SH_CP 1.4
+#define LATCH BIT5 // ST_CP 1.5
+
+//4017 Pins
+#define CLOCKCP	BIT6	// Clock 1.2
+#define RESET	BIT3	// Reset 1.3
+
+
+//Declaration des prototypes de fonctions
+void delay(unsigned int ms);
+void pushRegister(int val);
+void pinWrite(unsigned int bit, unsigned char val);
+
+
+void main(void) {
+	WDTCTL = WDTPW + WDTHOLD;				//stop watchdog
+	P1DIR |= (DATA + CLOCK + LATCH + CLOCKCP + RESET);	//mise en sortie
+
+	P1OUT |= RESET;		//on reset le 4017
+	P1OUT &= ~RESET;
+
+	for(;;) {
+
+		pushRegister(0b11111100);		
+		pushRegister(0b11111000);
+		pushRegister(0b11110000);
+		pushRegister(0b11100000);
+		pushRegister(0b11000000);
+		pushRegister(0b10000000);
+		pushRegister(0b00000000);
+		pushRegister(0b11111111);
+		P1OUT |= RESET;
+		P1OUT &= ~RESET;
+	}
+
+}
+
+void delay(unsigned int ms) {
+	while(ms--) {
+		__delay_cycles(1000);
+	}
+}
+
+void pushRegister(int val) {
+
+	P1OUT &= ~LATCH;
+
+	int i;
+
+	for(i=0; i<8; i++) {
+		pinWrite(DATA, (val & (1 << i)));
+		P1OUT |= CLOCK;		//clock 74HC
+		P1OUT &= ~CLOCK;
+	}
+
+	P1OUT |= LATCH;
+	P1OUT &= ~LATCH;
+	
+	for(i=0; i<8; i++) {
+		pinWrite(DATA, 0);
+		P1OUT |= CLOCK;		//clock 74hc
+		P1OUT &= ~CLOCK;
+	}
+
+	P1OUT |= LATCH;
+	P1OUT |= CLOCKCP;		//clock 4017
+	P1OUT &= ~CLOCKCP;
+
+
+}
+
+void pinWrite(unsigned int bit, unsigned char val) {
+	if(val) P1OUT |= bit;
+	else P1OUT &= ~bit;
+}

BIN
led_matrix_pattern/main.elf


BIN
led_matrix_pattern/main.o


+ 19 - 0
led_matrix_scroll/Makefile

@@ -0,0 +1,19 @@
+CC=msp430-gcc
+CFLAGS=-Os -Wall -g -mmcu=msp430g2553
+
+OBJS=main.o
+  
+   
+all: $(OBJS)
+	$(CC) $(CFLAGS) -o main.elf $(OBJS)
+	 
+%.o: %.c
+	$(CC) $(CFLAGS) -c $<
+	 
+clean:
+	rm -fr main.elf $(OBJS)
+	 
+upload:
+	mspdebug rf2500 "prog main.elf"
+
+

+ 98 - 0
led_matrix_scroll/char.c

@@ -0,0 +1,98 @@
+const unsigned short CharData[][8] ={
+{0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000},
+{0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000000, 0b00000100},
+{0b00001010, 0b00001010, 0b00001010, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000},
+{0b00000000, 0b00001010, 0b00011111, 0b00001010, 0b00011111, 0b00001010, 0b00011111, 0b00001010},
+{0b00000111, 0b00001100, 0b00010100, 0b00001100, 0b00000110, 0b00000101, 0b00000110, 0b00011100},
+{0b00011001, 0b00011010, 0b00000010, 0b00000100, 0b00000100, 0b00001000, 0b00001011, 0b00010011},
+{0b00000110, 0b00001010, 0b00010010, 0b00010100, 0b00001001, 0b00010110, 0b00010110, 0b00001001},
+{0b00000100, 0b00000100, 0b00000100, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000},
+{0b00000010, 0b00000100, 0b00001000, 0b00001000, 0b00001000, 0b00001000, 0b00000100, 0b00000010},
+{0b00001000, 0b00000100, 0b00000010, 0b00000010, 0b00000010, 0b00000010, 0b00000100, 0b00001000},
+{0b00010101, 0b00001110, 0b00011111, 0b00001110, 0b00010101, 0b00000000, 0b00000000, 0b00000000},
+{0b00000000, 0b00000000, 0b00000100, 0b00000100, 0b00011111, 0b00000100, 0b00000100, 0b00000000},
+{0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000110, 0b00000100, 0b00001000},
+{0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00001110, 0b00000000, 0b00000000, 0b00000000},
+{0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000100},
+{0b00000001, 0b00000010, 0b00000010, 0b00000100, 0b00000100, 0b00001000, 0b00001000, 0b00010000},
+{0b00001110, 0b00010001, 0b00010011, 0b00010001, 0b00010101, 0b00010001, 0b00011001, 0b00001110},
+{0b00000100, 0b00001100, 0b00010100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00011111},
+{0b00001110, 0b00010001, 0b00010001, 0b00000010, 0b00000100, 0b00001000, 0b00010000, 0b00011111},
+{0b00001110, 0b00010001, 0b00000001, 0b00001110, 0b00000001, 0b00000001, 0b00010001, 0b00001110},
+{0b00010000, 0b00010000, 0b00010100, 0b00010100, 0b00011111, 0b00000100, 0b00000100, 0b00000100},
+{0b00011111, 0b00010000, 0b00010000, 0b00011110, 0b00000001, 0b00000001, 0b00000001, 0b00011110},
+{0b00000111, 0b00001000, 0b00010000, 0b00011110, 0b00010001, 0b00010001, 0b00010001, 0b00001110},
+{0b00011111, 0b00000001, 0b00000001, 0b00000001, 0b00000010, 0b00000100, 0b00001000, 0b00010000},
+{0b00001110, 0b00010001, 0b00010001, 0b00001110, 0b00010001, 0b00010001, 0b00010001, 0b00001110},
+{0b00001110, 0b00010001, 0b00010001, 0b00001111, 0b00000001, 0b00000001, 0b00000001, 0b00000001},
+{0b00000000, 0b00000100, 0b00000100, 0b00000000, 0b00000000, 0b00000100, 0b00000100, 0b00000000},
+{0b00000000, 0b00000100, 0b00000100, 0b00000000, 0b00000000, 0b00000100, 0b00000100, 0b00001000},
+{0b00000001, 0b00000010, 0b00000100, 0b00001000, 0b00001000, 0b00000100, 0b00000010, 0b00000001},
+{0b00000000, 0b00000000, 0b00000000, 0b00011110, 0b00000000, 0b00011110, 0b00000000, 0b00000000},
+{0b00010000, 0b00001000, 0b00000100, 0b00000010, 0b00000010, 0b00000100, 0b00001000, 0b00010000},
+{0b00001110, 0b00010001, 0b00010001, 0b00000010, 0b00000100, 0b00000100, 0b00000000, 0b00000100},
+{0b00001110, 0b00010001, 0b00010001, 0b00010101, 0b00010101, 0b00010001, 0b00010001, 0b00011110},
+{0b00001110, 0b00010001, 0b00010001, 0b00010001, 0b00011111, 0b00010001, 0b00010001, 0b00010001},
+{0b00011110, 0b00010001, 0b00010001, 0b00011110, 0b00010001, 0b00010001, 0b00010001, 0b00011110},
+{0b00000111, 0b00001000, 0b00010000, 0b00010000, 0b00010000, 0b00010000, 0b00001000, 0b00000111},
+{0b00011100, 0b00010010, 0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00010010, 0b00011100},
+{0b00011111, 0b00010000, 0b00010000, 0b00011110, 0b00010000, 0b00010000, 0b00010000, 0b00011111},
+{0b00011111, 0b00010000, 0b00010000, 0b00011110, 0b00010000, 0b00010000, 0b00010000, 0b00010000},
+{0b00001110, 0b00010001, 0b00010000, 0b00010000, 0b00010111, 0b00010001, 0b00010001, 0b00001110},
+{0b00010001, 0b00010001, 0b00010001, 0b00011111, 0b00010001, 0b00010001, 0b00010001, 0b00010001},
+{0b00011111, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00011111},
+{0b00011111, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00010100, 0b00001000},
+{0b00010001, 0b00010010, 0b00010100, 0b00011000, 0b00010100, 0b00010010, 0b00010001, 0b00010001},
+{0b00010000, 0b00010000, 0b00010000, 0b00010000, 0b00010000, 0b00010000, 0b00010000, 0b00011111},
+{0b00010001, 0b00011011, 0b00011111, 0b00010101, 0b00010001, 0b00010001, 0b00010001, 0b00010001},
+{0b00010001, 0b00011001, 0b00011001, 0b00010101, 0b00010101, 0b00010011, 0b00010011, 0b00010001},
+{0b00001110, 0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00001110},
+{0b00011110, 0b00010001, 0b00010001, 0b00011110, 0b00010000, 0b00010000, 0b00010000, 0b00010000},
+{0b00001110, 0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00010101, 0b00010011, 0b00001111},
+{0b00011110, 0b00010001, 0b00010001, 0b00011110, 0b00010100, 0b00010010, 0b00010001, 0b00010001},
+{0b00001110, 0b00010001, 0b00010000, 0b00001000, 0b00000110, 0b00000001, 0b00010001, 0b00001110},
+{0b00011111, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100},
+{0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00001110},
+{0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00001010, 0b00000100},
+{0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00010101, 0b00010101, 0b00001010},
+{0b00010001, 0b00010001, 0b00001010, 0b00000100, 0b00000100, 0b00001010, 0b00010001, 0b00010001},
+{0b00010001, 0b00010001, 0b00001010, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100},
+{0b00011111, 0b00000001, 0b00000010, 0b00000100, 0b00001000, 0b00010000, 0b00010000, 0b00011111},
+{0b00001110, 0b00001000, 0b00001000, 0b00001000, 0b00001000, 0b00001000, 0b00001000, 0b00001110},
+{0b00010000, 0b00001000, 0b00001000, 0b00000100, 0b00000100, 0b00000010, 0b00000010, 0b00000001},
+{0b00001110, 0b00000010, 0b00000010, 0b00000010, 0b00000010, 0b00000010, 0b00000010, 0b00001110},
+{0b00000100, 0b00001010, 0b00010001, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000},
+{0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00011111},
+{0b00001000, 0b00000100, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000},
+{0b00000000, 0b00000000, 0b00000000, 0b00001110, 0b00010010, 0b00010010, 0b00010010, 0b00001111},
+{0b00000000, 0b00010000, 0b00010000, 0b00010000, 0b00011100, 0b00010010, 0b00010010, 0b00011100},
+{0b00000000, 0b00000000, 0b00000000, 0b00001110, 0b00010000, 0b00010000, 0b00010000, 0b00001110},
+{0b00000000, 0b00000001, 0b00000001, 0b00000001, 0b00000111, 0b00001001, 0b00001001, 0b00000111},
+{0b00000000, 0b00000000, 0b00000000, 0b00011100, 0b00010010, 0b00011110, 0b00010000, 0b00001110},
+{0b00000000, 0b00000011, 0b00000100, 0b00000100, 0b00000110, 0b00000100, 0b00000100, 0b00000100},
+{0b00000000, 0b00001110, 0b00001010, 0b00001010, 0b00001110, 0b00000010, 0b00000010, 0b00001100},
+{0b00000000, 0b00010000, 0b00010000, 0b00010000, 0b00011100, 0b00010010, 0b00010010, 0b00010010},
+{0b00000000, 0b00000000, 0b00000100, 0b00000000, 0b00000100, 0b00000100, 0b00000100, 0b00000100},
+{0b00000000, 0b00000010, 0b00000000, 0b00000010, 0b00000010, 0b00000010, 0b00000010, 0b00001100},
+{0b00000000, 0b00010000, 0b00010000, 0b00010100, 0b00011000, 0b00011000, 0b00010100, 0b00010000},
+{0b00000000, 0b00010000, 0b00010000, 0b00010000, 0b00010000, 0b00010000, 0b00010000, 0b00001100},
+{0b00000000, 0b00000000, 0b00000000, 0b00001010, 0b00010101, 0b00010001, 0b00010001, 0b00010001},
+{0b00000000, 0b00000000, 0b00000000, 0b00010100, 0b00011010, 0b00010010, 0b00010010, 0b00010010},
+{0b00000000, 0b00000000, 0b00000000, 0b00001100, 0b00010010, 0b00010010, 0b00010010, 0b00001100},
+{0b00000000, 0b00011100, 0b00010010, 0b00010010, 0b00011100, 0b00010000, 0b00010000, 0b00010000},
+{0b00000000, 0b00001110, 0b00010010, 0b00010010, 0b00001110, 0b00000010, 0b00000010, 0b00000001},
+{0b00000000, 0b00000000, 0b00000000, 0b00001010, 0b00001100, 0b00001000, 0b00001000, 0b00001000},
+{0b00000000, 0b00000000, 0b00001110, 0b00010000, 0b00001000, 0b00000100, 0b00000010, 0b00011110},
+{0b00000000, 0b00010000, 0b00010000, 0b00011100, 0b00010000, 0b00010000, 0b00010000, 0b00001100},
+{0b00000000, 0b00000000, 0b00000000, 0b00010010, 0b00010010, 0b00010010, 0b00010010, 0b00001100},
+{0b00000000, 0b00000000, 0b00000000, 0b00010001, 0b00010001, 0b00010001, 0b00001010, 0b00000100},
+{0b00000000, 0b00000000, 0b00000000, 0b00010001, 0b00010001, 0b00010001, 0b00010101, 0b00001010},
+{0b00000000, 0b00000000, 0b00000000, 0b00010001, 0b00001010, 0b00000100, 0b00001010, 0b00010001},
+{0b00000000, 0b00000000, 0b00010001, 0b00001010, 0b00000100, 0b00001000, 0b00001000, 0b00010000},
+{0b00000000, 0b00000000, 0b00000000, 0b00011111, 0b00000010, 0b00000100, 0b00001000, 0b00011111},
+{0b00000010, 0b00000100, 0b00000100, 0b00000100, 0b00001000, 0b00000100, 0b00000100, 0b00000010},
+{0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100},
+{0b00001000, 0b00000100, 0b00000100, 0b00000100, 0b00000010, 0b00000100, 0b00000100, 0b00001000},
+{0b00000000, 0b00000000, 0b00000000, 0b00001010, 0b00011110, 0b00010100, 0b00000000, 0b00000000}
+};
+

+ 105 - 0
led_matrix_scroll/main.c

@@ -0,0 +1,105 @@
+#include <msp430g2553.h>
+#include "char.c"
+
+// 74HC Pins
+#define DATA BIT0 //DS 1.0
+#define CLOCK BIT4 // SH_CP 1.4
+#define LATCH BIT5 // ST_CP 1.5
+
+//4017 Pins
+#define CLOCKCP	BIT6	// Clock 1.2
+#define RESET	BIT3	// Reset 1.3
+
+
+//Declaration des prototypes de fonctions
+void pushRegister(int val);
+void pinWrite(int bit, int val);
+void clearAll(void);
+
+//Declaration des vaiables
+unsigned int DisplayBuffer[]={0,0,0,0,0,0,0,0};
+unsigned int speed;
+short i, l, k, ShiftAmount, scroll, temp, shift_step=1;
+char message[]="Powered by MSP430";
+char index;
+
+
+void clearAll(void) {
+	int i;
+	P1OUT |= RESET;
+	P1OUT &= ~RESET;
+
+	P1OUT &= ~LATCH;
+	for(i=0; i<8; i++) {
+		pinWrite(DATA, 0);
+		P1OUT |= CLOCK;
+		P1OUT &= ~CLOCK;
+	}
+	P1OUT |= LATCH;
+}
+
+
+void main(void) {
+	WDTCTL = WDTPW + WDTHOLD;				//stop watchdog
+	P1DIR |= (DATA + CLOCK + LATCH + CLOCKCP + RESET);	//mise en sortie
+
+	clearAll();
+
+	while(1) {
+
+		for(k=0; k<strlen(message); k++) {
+			for(scroll=0; scroll<(8/shift_step); scroll++) {
+				for(ShiftAmount=0; ShiftAmount<8; ShiftAmount++) {
+					index = message[k];
+					temp = CharData[index-32][ShiftAmount];
+					DisplayBuffer[ShiftAmount] = (DisplayBuffer[ShiftAmount] << shift_step) | (temp >> ((8-shift_step)-scroll*shift_step));
+
+				}
+				speed = 15;
+				for(l=0; l<speed; l++) {
+					for(i=0; i<8; i++) {
+						pushRegister(DisplayBuffer[i]);
+					}
+					P1OUT |= RESET;
+					P1OUT &= ~RESET;
+
+				}
+			}
+		}
+
+	}
+
+}
+
+void pushRegister(int val) {
+
+	P1OUT &= ~LATCH;
+
+	int i;
+
+	for(i=8; i>0; i--) {
+		pinWrite(DATA, (val & (1 << i)));
+		P1OUT |= CLOCK;		//clock 74HC
+		P1OUT &= ~CLOCK;
+	}
+
+	P1OUT |= LATCH;
+	P1OUT &= ~LATCH;
+	
+	for(i=0; i<8; i++) {
+		pinWrite(DATA, 0);
+		P1OUT |= CLOCK;		//clock 74hc
+		P1OUT &= ~CLOCK;
+	}
+
+	P1OUT |= LATCH;
+	P1OUT |= CLOCKCP;		//clock 4017
+	P1OUT &= ~CLOCKCP;
+
+
+}
+
+void pinWrite(int bit, int val) {
+	if(val) P1OUT |= bit;
+	else P1OUT &= ~bit;
+}

BIN
led_matrix_scroll/main.elf


BIN
led_matrix_scroll/main.o


+ 5 - 0
msp430-harduart/CHANGELOG

@@ -0,0 +1,5 @@
+CHANGELOG HArdware UART example for MSP430 using mps430-gcc on Linux 
+===============================================================================
+
+Initial version 0.1 
+07.03.2012, sw@kaltpost.de

+ 676 - 0
msp430-harduart/LICENSE

@@ -0,0 +1,676 @@
+
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+ 
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+  
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+

+ 57 - 0
msp430-harduart/Makefile

@@ -0,0 +1,57 @@
+##
+# Toplevel Makefile MSP40 hardware UART
+#
+# Stefan Wendler, sw@kaltpost.de 
+##
+
+BASEDIR 	= .
+SRCDIR  	= src
+DEPLOYDIR	= deploy
+TMPDIR		= /tmp
+VERSION		= 0.1
+TARGET		= msp430_harduart_v$(VERSION)
+
+all: target
+
+world: target gen-docs
+
+target: 
+	make -C $(SRCDIR)
+
+gen-docs: target
+	cd $(SRCDIR) && make gen-docs 
+
+style:
+	cd $(SRCDIR) && make style
+
+check: 
+	make -C $(SRCDIR) check
+
+deploy-src: target check style clean gen-docs
+	rm -fr $(TMPDIR)/$(TARGET)_src
+	mkdir $(TMPDIR)/$(TARGET)_src
+	cp -a ./* $(TMPDIR)/$(TARGET)_src/.
+	rm -fr $(TMPDIR)/$(TARGET)_src/deploy
+	rm -fr $(TMPDIR)/$(TARGET)_src/tools
+	mkdir $(TMPDIR)/$(TARGET)_src/deploy
+	(cd $(TMPDIR); tar --exclude=".svn" -jcvf $(TARGET)_src.tar.bz2  $(TARGET)_src)
+	mv $(TMPDIR)/$(TARGET)_src.tar.bz2 $(DEPLOYDIR)/. 
+
+deploy-bin: clean target 
+	rm -fr $(TMPDIR)/$(TARGET)_bin
+	mkdir $(TMPDIR)/$(TARGET)_bin
+	cp CHANGELOG LICENSE README $(TMPDIR)/$(TARGET)_bin/.
+	cp -a ./bin $(TMPDIR)/$(TARGET)_bin/.
+	cp -a ./doc $(TMPDIR)/$(TARGET)_bin/.
+	(cd $(TMPDIR); tar --exclude=".svn" -jcvf $(TARGET)_bin.tar.bz2  $(TARGET)_bin)
+	mv $(TMPDIR)/$(TARGET)_bin.tar.bz2 $(DEPLOYDIR)/. 
+	
+deploy: deploy-src deploy-bin
+
+flash-target: target
+	mspdebug rf2500 "prog ./bin/firmware.elf"
+
+clean: 
+	make -C $(SRCDIR) clean
+	rm -fr doc/gen	
+	rm -f bin/firmware.*

+ 62 - 0
msp430-harduart/README

@@ -0,0 +1,62 @@
+Hardware UART example for MSP430 using mps430-gcc on Linux  
+sw@kaltpost.de
+http://gpio.kaltpost.de/
+
+
+Introduction
+------------
+
+This example shows how to use hardware UART through USCI_A on the TI Launchpad with a MSP430G2553 MCU. 
+
+
+Hardware Setup
+--------------
+
+The wiring for this example is as follows:
+
+MSP430      To
+----------------------------------------
+RXD P1.1    TXD serial line
+TXD P1.2    RXD serial line
+
+NOTE: When using the TI Launchpad, "/dev/ttyACM0" could be used as serial port at 9600 Bauds, but RX/TX must be crossed on the jumper bridge of the Launchpad.
+
+
+Compilation
+------------
+
+This project is written for msp430-gcc on Linux (I used v4.5.3 which is available as package on ubuntu). For flashing the "mspdebug" tool was used (also from the Ubuntu package).
+
+To compile the source just issue a:
+
+make
+
+This builds the firmware in the "bin" subdirectory in various formats.
+
+
+Flashing
+------------
+
+To flash the firmware to your Launchpad you could use the "flash-target" make target:
+
+make flash-target
+
+
+Doxygen Docs
+------------
+
+If you installed doxygen on your system, you could generate the HTML-based documentation by calling:
+
+make gen-docs
+
+This will create the documentation under "doc/gen/html".
+
+
+Usage
+------------
+
+Connecting your Launchpad should give you a new serial device "/dev/ttyACM0". Connect to this port at 9600 bauds - e.g. by using screen:
+
+screen /dev/ttyACM0 9600
+
+A greeter is shown on the serial line, and you are prompted to press any key to start the echo demo. After the first keypress, "OK" is printed, and from then on, every character you type is echoed back. Every time, a character is received, the red LED on the launchpad is toggled. The green LED stadily blinks.

+ 0 - 0
msp430-harduart/bin/emptyfile.txt


BIN
msp430-harduart/bin/firmware.bin


BIN
msp430-harduart/bin/firmware.elf


+ 34 - 0
msp430-harduart/bin/firmware.hex

@@ -0,0 +1,34 @@
+:10C000005542200135D0085A8245020231400004D1
+:10C010003F4000000F9308249242020220012F8328
+:10C020009F4FD6C10002F8233F4002000F93072420
+:10C030009242020220011F83CF430002F923218292
+:10C04000B240805A2001D242FF105700D242FE1067
+:10C050005600F24041002200F24041002100B0129F
+:10C06000E2C03F40D8C0B01212C132D23F406CC1D2
+:10C07000B01234C13F4080C1B01234C13F4092C1C0
+:10C08000B01234C13F40A6C1B01234C1B01218C1C1
+:10C09000B01226C13F40CFC1B01234C1F2E040001F
+:10C0A0002100B14050C30000814302002E411F41D6
+:10C0B00002003E533F63814E0000814F02002E413B
+:10C0C0001F4102000E93F2230F93F023E73F32D07B
+:10C0D000F000FD3F30406AC1B01226C1D2E321001A
+:10C0E000304182430002F24006002600F240060082
+:10C0F0004100F2D080FF6100F24068006200C2435C
+:10C100006300E2436400F2F0FEFF6100D2D301005D
+:10C110003041824F000230415F4203001FF3FC2791
+:10C120005F42660030415E4203002EF3FC27C24F9F
+:10C13000670030410B120B4F033C1B53B01226C15A
+:10C140006F4B4F93FA233B4130410F120E120D12E9
+:10C150000C121E4200020E9303245F4266008E12F0
+:0CC160003C413D413E413F4100130013B3
+:10C16C000A0D2A2A2A2A2A2A2A2A2A2A2A2A2A2A60
+:10C17C002A0A0D004D5350343330206861726475B7
+:10C18C006172740A0D002A2A2A2A2A2A2A2A2A2AA1
+:10C19C002A2A2A2A2A0A0D0A0D00505245535320E6
+:10C1AC00616E79206B657920746F20737461727481
+:10C1BC00206563686F206578616D706C65202E2E2C
+:0AC1CC002E20000A0D4F4B0A0D0053
+:10FFE000D4C0D4C0D4C0D4C0D4C0D4C0D4C04AC1FA
+:10FFF000D4C0D4C0D4C0D4C0D4C0D4C0D4C000C035
+:040000030000C00039
+:00000001FF

+ 262 - 0
msp430-harduart/bin/firmware.list

@@ -0,0 +1,262 @@
+
+firmware.elf:     file format elf32-msp430
+
+
+Disassembly of section .text:
+
+0000c000 <__watchdog_support>:
+    c000:	55 42 20 01 	mov.b	&0x0120,r5	
+    c004:	35 d0 08 5a 	bis	#23048,	r5	;#0x5a08
+    c008:	82 45 02 02 	mov	r5,	&0x0202	
+
+0000c00c <__init_stack>:
+    c00c:	31 40 00 04 	mov	#1024,	r1	;#0x0400
+
+0000c010 <__do_copy_data>:
+    c010:	3f 40 00 00 	mov	#0,	r15	;#0x0000
+    c014:	0f 93       	tst	r15		
+    c016:	08 24       	jz	$+18     	;abs 0xc028
+    c018:	92 42 02 02 	mov	&0x0202,&0x0120	
+    c01c:	20 01 
+    c01e:	2f 83       	decd	r15		
+    c020:	9f 4f d6 c1 	mov	-15914(r15),512(r15);0xc1d6(r15), 0x0200(r15)
+    c024:	00 02 
+    c026:	f8 23       	jnz	$-14     	;abs 0xc018
+
+0000c028 <__do_clear_bss>:
+    c028:	3f 40 02 00 	mov	#2,	r15	;#0x0002
+    c02c:	0f 93       	tst	r15		
+    c02e:	07 24       	jz	$+16     	;abs 0xc03e
+    c030:	92 42 02 02 	mov	&0x0202,&0x0120	
+    c034:	20 01 
+    c036:	1f 83       	dec	r15		
+    c038:	cf 43 00 02 	mov.b	#0,	512(r15);r3 As==00, 0x0200(r15)
+    c03c:	f9 23       	jnz	$-12     	;abs 0xc030
+
+0000c03e <main>:
+ 
+/**
+ * Main routine
+ */
+int main(void)
+{
+    c03e:	21 82       	sub	#4,	r1	;r2 As==10
+    WDTCTL  = WDTPW + WDTHOLD; 	// Stop WDT
+    c040:	b2 40 80 5a 	mov	#23168,	&0x0120	;#0x5a80
+    c044:	20 01 
+	BCSCTL1 = CALBC1_1MHZ;      // Set DCO
+    c046:	d2 42 ff 10 	mov.b	&0x10ff,&0x0057	
+    c04a:	57 00 
+  	DCOCTL  = CALDCO_1MHZ;
+    c04c:	d2 42 fe 10 	mov.b	&0x10fe,&0x0056	
+    c050:	56 00 
+ 
+	P1DIR  = BIT0 + BIT6; 		// P1.0 and P1.6 are the red+green LEDs	
+    c052:	f2 40 41 00 	mov.b	#65,	&0x0022	;#0x0041
+    c056:	22 00 
+	P1OUT  = BIT0 + BIT6; 		// All LEDs off
+    c058:	f2 40 41 00 	mov.b	#65,	&0x0021	;#0x0041
+    c05c:	21 00 
+
+    uart_init();
+    c05e:	b0 12 e2 c0 	call	#0xc0e2	
+
+	// register ISR called when data was received
+    uart_set_rx_isr_ptr(uart_rx_isr);
+    c062:	3f 40 d8 c0 	mov	#-16168,r15	;#0xc0d8
+    c066:	b0 12 12 c1 	call	#0xc112	
+
+    __bis_SR_register(GIE);
+    c06a:	32 d2       	eint			
+
+    uart_puts((char *)"\n\r***************\n\r");
+    c06c:	3f 40 6c c1 	mov	#-16020,r15	;#0xc16c
+    c070:	b0 12 34 c1 	call	#0xc134	
+    uart_puts((char *)"MSP430 harduart\n\r");
+    c074:	3f 40 80 c1 	mov	#-16000,r15	;#0xc180
+    c078:	b0 12 34 c1 	call	#0xc134	
+    uart_puts((char *)"***************\n\r\n\r");
+    c07c:	3f 40 92 c1 	mov	#-15982,r15	;#0xc192
+    c080:	b0 12 34 c1 	call	#0xc134	
+
+	uart_puts((char *)"PRESS any key to start echo example ... ");
+    c084:	3f 40 a6 c1 	mov	#-15962,r15	;#0xc1a6
+    c088:	b0 12 34 c1 	call	#0xc134	
+
+	unsigned char c = uart_getc();
+    c08c:	b0 12 18 c1 	call	#0xc118	
+
+	uart_putc(c);
+    c090:	b0 12 26 c1 	call	#0xc126	
+	uart_puts((char *)"\n\rOK\n\r");
+    c094:	3f 40 cf c1 	mov	#-15921,r15	;#0xc1cf
+    c098:	b0 12 34 c1 	call	#0xc134	
+
+    volatile unsigned long i;
+
+    while(1) {
+
+	   P1OUT ^= BIT6; 			// Toggle P1.6 output (green LED) using exclusive-OR
+    c09c:	f2 e0 40 00 	xor.b	#64,	&0x0021	;#0x0040
+    c0a0:	21 00 
+	   i = 50000;             	// Delay
+    c0a2:	b1 40 50 c3 	mov	#-15536,0(r1)	;#0xc350, 0x0000(r1)
+    c0a6:	00 00 
+    c0a8:	81 43 02 00 	mov	#0,	2(r1)	;r3 As==00, 0x0002(r1)
+
+	   do (i--);				// busy waiting (bad)
+    c0ac:	2e 41       	mov	@r1,	r14	
+    c0ae:	1f 41 02 00 	mov	2(r1),	r15	;0x0002(r1)
+    c0b2:	3e 53       	add	#-1,	r14	;r3 As==11
+    c0b4:	3f 63       	addc	#-1,	r15	;r3 As==11
+    c0b6:	81 4e 00 00 	mov	r14,	0(r1)	;0x0000(r1)
+    c0ba:	81 4f 02 00 	mov	r15,	2(r1)	;0x0002(r1)
+	   while (i != 0);
+    c0be:	2e 41       	mov	@r1,	r14	
+    c0c0:	1f 41 02 00 	mov	2(r1),	r15	;0x0002(r1)
+    c0c4:	0e 93       	tst	r14		
+    c0c6:	f2 23       	jnz	$-26     	;abs 0xc0ac
+    c0c8:	0f 93       	tst	r15		
+    c0ca:	f0 23       	jnz	$-30     	;abs 0xc0ac
+    c0cc:	e7 3f       	jmp	$-48     	;abs 0xc09c
+
+0000c0ce <__stop_progExec__>:
+    c0ce:	32 d0 f0 00 	bis	#240,	r2	;#0x00f0
+    c0d2:	fd 3f       	jmp	$-4      	;abs 0xc0ce
+
+0000c0d4 <__ctors_end>:
+    c0d4:	30 40 6a c1 	br	#0xc16a	
+
+0000c0d8 <uart_rx_isr>:
+
+#include <msp430g2553.h>
+#include "uart.h"
+
+void uart_rx_isr(unsigned char c) {
+	uart_putc(c);
+    c0d8:	b0 12 26 c1 	call	#0xc126	
+	P1OUT ^= BIT0;		// toggle P1.0 (red led)
+    c0dc:	d2 e3 21 00 	xor.b	#1,	&0x0021	;r3 As==01
+}
+    c0e0:	30 41       	ret			
+
+0000c0e2 <uart_init>:
+  	IE2 |= UCA0RXIE;                          // Enable USCI_A0 RX interrupt
+}
+
+void uart_set_rx_isr_ptr(void (*isr_ptr)(unsigned char c)) 
+{
+	uart_rx_isr_ptr = isr_ptr;	
+    c0e2:	82 43 00 02 	mov	#0,	&0x0200	;r3 As==00
+
+void uart_init(void)
+{
+	uart_set_rx_isr_ptr(0L);
+
+	P1SEL  = RXD + TXD;                       
+    c0e6:	f2 40 06 00 	mov.b	#6,	&0x0026	;#0x0006
+    c0ea:	26 00 
+  	P1SEL2 = RXD + TXD;                       
+    c0ec:	f2 40 06 00 	mov.b	#6,	&0x0041	;#0x0006
+    c0f0:	41 00 
+  	UCA0CTL1 |= UCSSEL_2;                     // SMCLK
+    c0f2:	f2 d0 80 ff 	bis.b	#-128,	&0x0061	;#0xff80
+    c0f6:	61 00 
+  	UCA0BR0 = 104;                            // 1MHz 9600
+    c0f8:	f2 40 68 00 	mov.b	#104,	&0x0062	;#0x0068
+    c0fc:	62 00 
+  	UCA0BR1 = 0;                              // 1MHz 9600
+    c0fe:	c2 43 63 00 	mov.b	#0,	&0x0063	;r3 As==00
+  	UCA0MCTL = UCBRS0;                        // Modulation UCBRSx = 1
+    c102:	e2 43 64 00 	mov.b	#2,	&0x0064	;r3 As==10
+  	UCA0CTL1 &= ~UCSWRST;                     // Initialize USCI state machine
+    c106:	f2 f0 fe ff 	and.b	#-2,	&0x0061	;#0xfffe
+    c10a:	61 00 
+  	IE2 |= UCA0RXIE;                          // Enable USCI_A0 RX interrupt
+    c10c:	d2 d3 01 00 	bis.b	#1,	&0x0001	;r3 As==01
+}
+    c110:	30 41       	ret			
+
+0000c112 <uart_set_rx_isr_ptr>:
+
+void uart_set_rx_isr_ptr(void (*isr_ptr)(unsigned char c)) 
+{
+	uart_rx_isr_ptr = isr_ptr;	
+    c112:	82 4f 00 02 	mov	r15,	&0x0200	
+}
+    c116:	30 41       	ret			
+
+0000c118 <uart_getc>:
+
+unsigned char uart_getc()
+{
+    while (!(IFG2&UCA0RXIFG));                // USCI_A0 RX buffer ready?
+    c118:	5f 42 03 00 	mov.b	&0x0003,r15	
+    c11c:	1f f3       	and	#1,	r15	;r3 As==01
+    c11e:	fc 27       	jz	$-6      	;abs 0xc118
+	return UCA0RXBUF;
+    c120:	5f 42 66 00 	mov.b	&0x0066,r15	
+}
+    c124:	30 41       	ret			
+
+0000c126 <uart_putc>:
+
+void uart_putc(unsigned char c)
+{
+	while (!(IFG2&UCA0TXIFG));              // USCI_A0 TX buffer ready?
+    c126:	5e 42 03 00 	mov.b	&0x0003,r14	
+    c12a:	2e f3       	and	#2,	r14	;r3 As==10
+    c12c:	fc 27       	jz	$-6      	;abs 0xc126
+  	UCA0TXBUF = c;                    		// TX
+    c12e:	c2 4f 67 00 	mov.b	r15,	&0x0067	
+}
+    c132:	30 41       	ret			
+
+0000c134 <uart_puts>:
+
+void uart_puts(const char *str)
+{
+    c134:	0b 12       	push	r11		
+    c136:	0b 4f       	mov	r15,	r11	
+     while(*str) uart_putc(*str++);
+    c138:	03 3c       	jmp	$+8      	;abs 0xc140
+    c13a:	1b 53       	inc	r11		
+    c13c:	b0 12 26 c1 	call	#0xc126	
+    c140:	6f 4b       	mov.b	@r11,	r15	
+    c142:	4f 93       	tst.b	r15		
+    c144:	fa 23       	jnz	$-10     	;abs 0xc13a
+}
+    c146:	3b 41       	pop	r11		
+    c148:	30 41       	ret			
+
+0000c14a <USCI0RX_ISR>:
+
+interrupt(USCIAB0RX_VECTOR) USCI0RX_ISR(void)
+{
+    c14a:	0f 12       	push	r15		
+    c14c:	0e 12       	push	r14		
+    c14e:	0d 12       	push	r13		
+    c150:	0c 12       	push	r12		
+	if(uart_rx_isr_ptr != 0L) {
+    c152:	1e 42 00 02 	mov	&0x0200,r14	
+    c156:	0e 93       	tst	r14		
+    c158:	03 24       	jz	$+8      	;abs 0xc160
+		(uart_rx_isr_ptr)(UCA0RXBUF);
+    c15a:	5f 42 66 00 	mov.b	&0x0066,r15	
+    c15e:	8e 12       	call	r14		
+	}
+}
+    c160:	3c 41       	pop	r12		
+    c162:	3d 41       	pop	r13		
+    c164:	3e 41       	pop	r14		
+    c166:	3f 41       	pop	r15		
+    c168:	00 13       	reti			
+
+0000c16a <_unexpected_>:
+    c16a:	00 13       	reti			
+
+Disassembly of section .vectors:
+
+0000ffe0 <__ivtbl_16>:
+    ffe0:	d4 c0 d4 c0 d4 c0 d4 c0 d4 c0 d4 c0 d4 c0 4a c1     ..............J.
+    fff0:	d4 c0 d4 c0 d4 c0 d4 c0 d4 c0 d4 c0 d4 c0 00 c0     ................

+ 34 - 0
msp430-harduart/bin/firmware.srec

@@ -0,0 +1,34 @@
+S01000006669726D776172652E73726563B7
+S113C0005542200135D0085A8245020231400004CD
+S113C0103F4000000F9308249242020220012F8324
+S113C0209F4FD6C10002F8233F4002000F9307241C
+S113C0309242020220011F83CF430002F92321828E
+S113C040B240805A2001D242FF105700D242FE1063
+S113C0505600F24041002200F24041002100B0129B
+S113C060E2C03F40D8C0B01212C132D23F406CC1CE
+S113C070B01234C13F4080C1B01234C13F4092C1BC
+S113C080B01234C13F40A6C1B01234C1B01218C1BD
+S113C090B01226C13F40CFC1B01234C1F2E040001B
+S113C0A02100B14050C30000814302002E411F41D2
+S113C0B002003E533F63814E0000814F02002E4137
+S113C0C01F4102000E93F2230F93F023E73F32D077
+S113C0D0F000FD3F30406AC1B01226C1D2E3210016
+S113C0E0304182430002F24006002600F24006007E
+S113C0F04100F2D080FF6100F24068006200C24358
+S113C1006300E2436400F2F0FEFF6100D2D3010059
+S113C1103041824F000230415F4203001FF3FC278D
+S113C1205F42660030415E4203002EF3FC27C24F9B
+S113C130670030410B120B4F033C1B53B01226C156
+S113C1406F4B4F93FA233B4130410F120E120D12E5
+S113C1500C121E4200020E9303245F4266008E12EC
+S10FC1603C413D413E413F4100130013AF
+S113C16C0A0D2A2A2A2A2A2A2A2A2A2A2A2A2A2A5C
+S113C17C2A0A0D004D5350343330206861726475B3
+S113C18C6172740A0D002A2A2A2A2A2A2A2A2A2A9D
+S113C19C2A2A2A2A2A0A0D0A0D00505245535320E2
+S113C1AC616E79206B657920746F2073746172747D
+S113C1BC206563686F206578616D706C65202E2E28
+S10DC1CC2E20000A0D4F4B0A0D004F
+S113FFE0D4C0D4C0D4C0D4C0D4C0D4C0D4C04AC1F6
+S113FFF0D4C0D4C0D4C0D4C0D4C0D4C0D4C000C031
+S903C0003C

+ 102 - 0
msp430-harduart/common.mk

@@ -0,0 +1,102 @@
+##
+# Common settings for Makefiles
+#
+# Stefan Wendler, sw@kaltpost.de
+##
+
+# compiler prefix
+PREFIX		?= msp430-
+
+CC			 = $(PREFIX)gcc
+LD			 = $(PREFIX)gcc
+OBJCOPY		 = $(PREFIX)objcopy
+OBJDUMP		 = $(PREFIX)objdump
+
+INCDIR		+= -I./include 
+CFLAGS		+= -Os -mmcu=msp430g2553 -g -Wall -Wextra $(INCDIR) 
+
+LIBDIR		 =  
+LIBS		 =  
+LDFLAGS		+= -mmcu=msp430g2553 $(LIBDIR) $(LIBS) 
+
+# where to put generated binaries to 
+BINDIR		?= ../bin
+
+# doxygen executable
+DOXYGEN = doxygen
+
+# doxygen flags
+DOXYGENFLAGS = ../doxygen.conf
+
+# styler to use
+STYLER = astyle
+
+# which c-style to use
+# - see man astyle
+STYLERFLAGS = --style=stroustrup
+
+# cpp checker
+CHECKER = cppcheck
+
+# flags for checker
+# CHECKERFLAGS = --error-exitcode=1 --enable=all
+CHECKERFLAGS = --enable=all --error-exitcode=1
+
+.SUFFIXES: .elf .bin .hex .srec .list .images
+.SECONDEXPANSION:
+.SECONDARY:
+
+all: images
+
+images: $(BINARY).images
+
+%.images: %.bin %.hex %.srec %.list
+	@#echo "*** $* images generated ***"
+
+%.bin: %.elf
+	@#printf "  OBJCOPY $(*).bin\n"
+	$(OBJCOPY) -Obinary $(*).elf $(*).bin && cp $(*).bin $(BINDIR)/.
+
+%.hex: %.elf
+	@#printf "  OBJCOPY $(*).hex\n"
+	$(OBJCOPY) -Oihex $(*).elf $(*).hex && cp $(*).hex $(BINDIR)/.
+
+%.srec: %.elf
+	@#printf "  OBJCOPY $(*).srec\n"
+	$(OBJCOPY) -Osrec $(*).elf $(*).srec && cp $(*).srec $(BINDIR)/.
+
+%.list: %.elf
+	@#printf "  OBJDUMP $(*).list\n"
+	$(OBJDUMP) -S $(*).elf > $(*).list && cp $(*).list $(BINDIR)/.
+
+%.elf: $(OBJS) $(LDSCRIPT)
+	@#printf "  LD      $(subst $(shell pwd)/,,$(@))\n"
+	$(LD) $(OBJS) $(LDFLAGS) -o $(*).elf && cp $(*).elf $(BINDIR)/.
+
+%.o: %.c Makefile
+	@#printf "  CC      $(subst $(shell pwd)/,,$(@))\n"
+	$(CC) $(CFLAGS) -o $@ -c $<
+
+%.o: %.cpp Makefile
+	@#printf "  CC      $(subst $(shell pwd)/,,$(@))\n"
+	$(CC) $(CFLAGS) -o $@ -c $<
+
+SRC = $(wildcard *.c)
+HDR = $(wildcard include/*.h)
+
+style: 
+	$(STYLER) $(STYLERFLAGS) $(SRC) 
+	$(STYLER) $(STYLERFLAGS) $(HDR) 
+	
+clean:
+	rm -f *.o
+	rm -f *.d
+	rm -f *.elf
+	rm -f *.bin
+	rm -f *.hex
+	rm -f *.srec
+	rm -f *.list
+	rm -f *.orig
+
+.PHONY: images clean
+

+ 0 - 0
msp430-harduart/deploy/emptyfile.txt


+ 0 - 0
msp430-harduart/doc/emptyfile.txt


+ 1551 - 0
msp430-harduart/doxygen.conf

@@ -0,0 +1,1551 @@
+# Doxyfile 1.6.3
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = msp430-harduart 
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER         =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = ../doc/gen
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH        =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 4
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it parses.
+# With this tag you can assign which parser to use for a given extension.
+# Doxygen has a built-in mapping, but you can override or extend it using this tag.
+# The format is ext=language, where ext is a file extension, and language is one of
+# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP,
+# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat
+# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran),
+# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING      =
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter
+# and setter methods for a property. Setting this option to YES (the default)
+# will make doxygen to replace the get and set methods by a property in the
+# documentation. This will only work if the methods are indeed getting or
+# setting a simple type. If this is not the case, or you want to show the
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is
+# probably good enough. For larger projects a too small cache size can cause
+# doxygen to be busy swapping symbols to and from disk most of the time
+# causing a significant performance penality.
+# If the system has enough physical memory increasing the cache will improve the
+# performance by keeping more symbols in memory. Note that the value works on
+# a logarithmic scale so increasing the size by one will rougly double the
+# memory usage. The cache size is given by this formula:
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = YES 
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
+# anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES   = YES
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
+# will list include files with double quotes in the documentation
+# rather than with sharp brackets.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES       = NO
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+# Namespaces page.
+# This will remove the Namespaces entry from the Quick Index
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by
+# doxygen. The layout file controls the global structure of the generated output files
+# in an output format independent way. The create the layout file that represents
+# doxygen's defaults, run doxygen with the -l option. You can optionally specify a
+# file name after the option, if omitted DoxygenLayout.xml will be used as the name
+# of the layout file.
+
+LAYOUT_FILE            =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE           =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT                  =
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
+# the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
+FILE_PATTERNS          = *.h *.c
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE              = YES 
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                =
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS        =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH           =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS       =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH             =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output.
+# If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER           =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis.
+# Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match.
+# The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# is applied to all files.
+
+FILTER_PATTERNS        =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code.
+# Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER            =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER            =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        =
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting
+# this to NO can help when comparing the output of multiple runs.
+
+HTML_TIMESTAMP         = YES
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files
+# will be generated that can be used as input for Apple's Xcode 3
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
+
+GENERATE_DOCSET        = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
+# can be grouped.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE               =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
+# content.
+
+CHM_INDEX_ENCODING     =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER
+# are set, an additional index file will be generated that can be used as input for
+# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated
+# HTML documentation.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+# be used to specify the file name of the resulting .qch file.
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE               =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add.
+# For more information please see
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME   =
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS  =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's
+# filter section matches.
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS  =
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+# be used to specify the location of Qt's qhelpgenerator.
+# If non-empty doxygen will try to run qhelpgenerator on the generated
+# .qhp file.
+
+QHG_LOCATION           =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
+#  will be generated, which together with the HTML files, form an Eclipse help
+#  plugin. To install this plugin and make it available under the help contents
+# menu in Eclipse, the contents of the directory containing the HTML and XML
+# files needs to be copied into the plugins directory of eclipse. The name of
+# the directory within the plugins directory should be the same as
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before the help appears.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have
+# this name.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to YES, a side panel will be generated
+# containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
+# Windows users are probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = NO
+
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES       = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+# Use this tag to change the font size of Latex formulas included
+# as images in the HTML documentation. The default is 10. Note that
+# when you change the font size after a successful doxygen run you need
+# to manually remove any form_*.png images from the HTML output directory
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE       = 10
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for the HTML output. The underlying search engine uses javascript
+# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) there is already a search function so this one should
+# typically be disabled. For large projects the javascript based search engine
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+
+SEARCHENGINE           = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be implemented using a PHP enabled web server instead of at the web client using Javascript. Doxygen will generate the search PHP script and index
+# file to put on the web server. The advantage of the server based approach is that it scales better to large projects and allows full text search. The disadvances is that it is more difficult to setup
+# and does not have live searching capabilities.
+
+SERVER_BASED_SEARCH    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+# Note that when enabling USE_PDFLATEX this option is only used for
+# generating bitmaps for formulas in the HTML output, but not in the
+# Makefile that is written to the output directory.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE      = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA             =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD                =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader.
+# This is useful
+# if you want to understand what is going on.
+# On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH           =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS  =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+PREDEFINED             =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+#
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+#
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option is superseded by the HAVE_DOT option below. This is only a
+# fallback. It is recommended to install and use dot, since it yields more
+# powerful graphs.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH            =
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = NO
+
+# By default doxygen will write a font called FreeSans.ttf to the output
+# directory and reference it in all dot files that doxygen generates. This
+# font does not include all possible unicode characters however, so when you need
+# these (or just want a differently looking font) you can specify the font name
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
+# which can be done by putting it in a standard location or by setting the
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
+# containing the font.
+
+DOT_FONTNAME           = FreeSans
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
+# The default size is 10pt.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the output directory to look for the
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a
+# different font using DOT_FONTNAME you can set the path where dot
+# can find it using this tag.
+
+DOT_FONTPATH           =
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS           =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = YES
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP            = YES

+ 10 - 0
msp430-harduart/src/Makefile

@@ -0,0 +1,10 @@
+BINARY		 = firmware
+OBJS		+= main.o uart.o 
+
+include ../common.mk
+
+check: $(SRC)
+	$(CHECKER) $(CHECKERFLAGS) $(SRC)
+
+gen-docs: $(HDR) $(SRC) 
+	$(DOXYGEN) $(DOXYGENFLAGS)

BIN
msp430-harduart/src/firmware.bin


BIN
msp430-harduart/src/firmware.elf


+ 34 - 0
msp430-harduart/src/firmware.hex

@@ -0,0 +1,34 @@
+:10C000005542200135D0085A8245020231400004D1
+:10C010003F4000000F9308249242020220012F8328
+:10C020009F4FD6C10002F8233F4002000F93072420
+:10C030009242020220011F83CF430002F923218292
+:10C04000B240805A2001D242FF105700D242FE1067
+:10C050005600F24041002200F24041002100B0129F
+:10C06000E2C03F40D8C0B01212C132D23F406CC1D2
+:10C07000B01234C13F4080C1B01234C13F4092C1C0
+:10C08000B01234C13F40A6C1B01234C1B01218C1C1
+:10C09000B01226C13F40CFC1B01234C1F2E040001F
+:10C0A0002100B14050C30000814302002E411F41D6
+:10C0B00002003E533F63814E0000814F02002E413B
+:10C0C0001F4102000E93F2230F93F023E73F32D07B
+:10C0D000F000FD3F30406AC1B01226C1D2E321001A
+:10C0E000304182430002F24006002600F240060082
+:10C0F0004100F2D080FF6100F24068006200C2435C
+:10C100006300E2436400F2F0FEFF6100D2D301005D
+:10C110003041824F000230415F4203001FF3FC2791
+:10C120005F42660030415E4203002EF3FC27C24F9F
+:10C13000670030410B120B4F033C1B53B01226C15A
+:10C140006F4B4F93FA233B4130410F120E120D12E9
+:10C150000C121E4200020E9303245F4266008E12F0
+:0CC160003C413D413E413F4100130013B3
+:10C16C000A0D2A2A2A2A2A2A2A2A2A2A2A2A2A2A60
+:10C17C002A0A0D004D5350343330206861726475B7
+:10C18C006172740A0D002A2A2A2A2A2A2A2A2A2AA1
+:10C19C002A2A2A2A2A0A0D0A0D00505245535320E6
+:10C1AC00616E79206B657920746F20737461727481
+:10C1BC00206563686F206578616D706C65202E2E2C
+:0AC1CC002E20000A0D4F4B0A0D0053
+:10FFE000D4C0D4C0D4C0D4C0D4C0D4C0D4C04AC1FA
+:10FFF000D4C0D4C0D4C0D4C0D4C0D4C0D4C000C035
+:040000030000C00039
+:00000001FF

+ 262 - 0
msp430-harduart/src/firmware.list

@@ -0,0 +1,262 @@
+
+firmware.elf:     file format elf32-msp430
+
+
+Disassembly of section .text:
+
+0000c000 <__watchdog_support>:
+    c000:	55 42 20 01 	mov.b	&0x0120,r5	
+    c004:	35 d0 08 5a 	bis	#23048,	r5	;#0x5a08
+    c008:	82 45 02 02 	mov	r5,	&0x0202	
+
+0000c00c <__init_stack>:
+    c00c:	31 40 00 04 	mov	#1024,	r1	;#0x0400
+
+0000c010 <__do_copy_data>:
+    c010:	3f 40 00 00 	mov	#0,	r15	;#0x0000
+    c014:	0f 93       	tst	r15		
+    c016:	08 24       	jz	$+18     	;abs 0xc028
+    c018:	92 42 02 02 	mov	&0x0202,&0x0120	
+    c01c:	20 01 
+    c01e:	2f 83       	decd	r15		
+    c020:	9f 4f d6 c1 	mov	-15914(r15),512(r15);0xc1d6(r15), 0x0200(r15)
+    c024:	00 02 
+    c026:	f8 23       	jnz	$-14     	;abs 0xc018
+
+0000c028 <__do_clear_bss>:
+    c028:	3f 40 02 00 	mov	#2,	r15	;#0x0002
+    c02c:	0f 93       	tst	r15		
+    c02e:	07 24       	jz	$+16     	;abs 0xc03e
+    c030:	92 42 02 02 	mov	&0x0202,&0x0120	
+    c034:	20 01 
+    c036:	1f 83       	dec	r15		
+    c038:	cf 43 00 02 	mov.b	#0,	512(r15);r3 As==00, 0x0200(r15)
+    c03c:	f9 23       	jnz	$-12     	;abs 0xc030
+
+0000c03e <main>:
+ 
+/**
+ * Main routine
+ */
+int main(void)
+{
+    c03e:	21 82       	sub	#4,	r1	;r2 As==10
+    WDTCTL  = WDTPW + WDTHOLD; 	// Stop WDT
+    c040:	b2 40 80 5a 	mov	#23168,	&0x0120	;#0x5a80
+    c044:	20 01 
+	BCSCTL1 = CALBC1_1MHZ;      // Set DCO
+    c046:	d2 42 ff 10 	mov.b	&0x10ff,&0x0057	
+    c04a:	57 00 
+  	DCOCTL  = CALDCO_1MHZ;
+    c04c:	d2 42 fe 10 	mov.b	&0x10fe,&0x0056	
+    c050:	56 00 
+ 
+	P1DIR  = BIT0 + BIT6; 		// P1.0 and P1.6 are the red+green LEDs	
+    c052:	f2 40 41 00 	mov.b	#65,	&0x0022	;#0x0041
+    c056:	22 00 
+	P1OUT  = BIT0 + BIT6; 		// All LEDs off
+    c058:	f2 40 41 00 	mov.b	#65,	&0x0021	;#0x0041
+    c05c:	21 00 
+
+    uart_init();
+    c05e:	b0 12 e2 c0 	call	#0xc0e2	
+
+	// register ISR called when data was received
+    uart_set_rx_isr_ptr(uart_rx_isr);
+    c062:	3f 40 d8 c0 	mov	#-16168,r15	;#0xc0d8
+    c066:	b0 12 12 c1 	call	#0xc112	
+
+    __bis_SR_register(GIE);
+    c06a:	32 d2       	eint			
+
+    uart_puts((char *)"\n\r***************\n\r");
+    c06c:	3f 40 6c c1 	mov	#-16020,r15	;#0xc16c
+    c070:	b0 12 34 c1 	call	#0xc134	
+    uart_puts((char *)"MSP430 harduart\n\r");
+    c074:	3f 40 80 c1 	mov	#-16000,r15	;#0xc180
+    c078:	b0 12 34 c1 	call	#0xc134	
+    uart_puts((char *)"***************\n\r\n\r");
+    c07c:	3f 40 92 c1 	mov	#-15982,r15	;#0xc192
+    c080:	b0 12 34 c1 	call	#0xc134	
+
+	uart_puts((char *)"PRESS any key to start echo example ... ");
+    c084:	3f 40 a6 c1 	mov	#-15962,r15	;#0xc1a6
+    c088:	b0 12 34 c1 	call	#0xc134	
+
+	unsigned char c = uart_getc();
+    c08c:	b0 12 18 c1 	call	#0xc118	
+
+	uart_putc(c);
+    c090:	b0 12 26 c1 	call	#0xc126	
+	uart_puts((char *)"\n\rOK\n\r");
+    c094:	3f 40 cf c1 	mov	#-15921,r15	;#0xc1cf
+    c098:	b0 12 34 c1 	call	#0xc134	
+
+    volatile unsigned long i;
+
+    while(1) {
+
+	   P1OUT ^= BIT6; 			// Toggle P1.6 output (green LED) using exclusive-OR
+    c09c:	f2 e0 40 00 	xor.b	#64,	&0x0021	;#0x0040
+    c0a0:	21 00 
+	   i = 50000;             	// Delay
+    c0a2:	b1 40 50 c3 	mov	#-15536,0(r1)	;#0xc350, 0x0000(r1)
+    c0a6:	00 00 
+    c0a8:	81 43 02 00 	mov	#0,	2(r1)	;r3 As==00, 0x0002(r1)
+
+	   do (i--);				// busy waiting (bad)
+    c0ac:	2e 41       	mov	@r1,	r14	
+    c0ae:	1f 41 02 00 	mov	2(r1),	r15	;0x0002(r1)
+    c0b2:	3e 53       	add	#-1,	r14	;r3 As==11
+    c0b4:	3f 63       	addc	#-1,	r15	;r3 As==11
+    c0b6:	81 4e 00 00 	mov	r14,	0(r1)	;0x0000(r1)
+    c0ba:	81 4f 02 00 	mov	r15,	2(r1)	;0x0002(r1)
+	   while (i != 0);
+    c0be:	2e 41       	mov	@r1,	r14	
+    c0c0:	1f 41 02 00 	mov	2(r1),	r15	;0x0002(r1)
+    c0c4:	0e 93       	tst	r14		
+    c0c6:	f2 23       	jnz	$-26     	;abs 0xc0ac
+    c0c8:	0f 93       	tst	r15		
+    c0ca:	f0 23       	jnz	$-30     	;abs 0xc0ac
+    c0cc:	e7 3f       	jmp	$-48     	;abs 0xc09c
+
+0000c0ce <__stop_progExec__>:
+    c0ce:	32 d0 f0 00 	bis	#240,	r2	;#0x00f0
+    c0d2:	fd 3f       	jmp	$-4      	;abs 0xc0ce
+
+0000c0d4 <__ctors_end>:
+    c0d4:	30 40 6a c1 	br	#0xc16a	
+
+0000c0d8 <uart_rx_isr>:
+
+#include <msp430g2553.h>
+#include "uart.h"
+
+void uart_rx_isr(unsigned char c) {
+	uart_putc(c);
+    c0d8:	b0 12 26 c1 	call	#0xc126	
+	P1OUT ^= BIT0;		// toggle P1.0 (red led)
+    c0dc:	d2 e3 21 00 	xor.b	#1,	&0x0021	;r3 As==01
+}
+    c0e0:	30 41       	ret			
+
+0000c0e2 <uart_init>:
+  	IE2 |= UCA0RXIE;                          // Enable USCI_A0 RX interrupt
+}
+
+void uart_set_rx_isr_ptr(void (*isr_ptr)(unsigned char c)) 
+{
+	uart_rx_isr_ptr = isr_ptr;	
+    c0e2:	82 43 00 02 	mov	#0,	&0x0200	;r3 As==00
+
+void uart_init(void)
+{
+	uart_set_rx_isr_ptr(0L);
+
+	P1SEL  = RXD + TXD;                       
+    c0e6:	f2 40 06 00 	mov.b	#6,	&0x0026	;#0x0006
+    c0ea:	26 00 
+  	P1SEL2 = RXD + TXD;                       
+    c0ec:	f2 40 06 00 	mov.b	#6,	&0x0041	;#0x0006
+    c0f0:	41 00 
+  	UCA0CTL1 |= UCSSEL_2;                     // SMCLK
+    c0f2:	f2 d0 80 ff 	bis.b	#-128,	&0x0061	;#0xff80
+    c0f6:	61 00 
+  	UCA0BR0 = 104;                            // 1MHz 9600
+    c0f8:	f2 40 68 00 	mov.b	#104,	&0x0062	;#0x0068
+    c0fc:	62 00 
+  	UCA0BR1 = 0;                              // 1MHz 9600
+    c0fe:	c2 43 63 00 	mov.b	#0,	&0x0063	;r3 As==00
+  	UCA0MCTL = UCBRS0;                        // Modulation UCBRSx = 1
+    c102:	e2 43 64 00 	mov.b	#2,	&0x0064	;r3 As==10
+  	UCA0CTL1 &= ~UCSWRST;                     // Initialize USCI state machine
+    c106:	f2 f0 fe ff 	and.b	#-2,	&0x0061	;#0xfffe
+    c10a:	61 00 
+  	IE2 |= UCA0RXIE;                          // Enable USCI_A0 RX interrupt
+    c10c:	d2 d3 01 00 	bis.b	#1,	&0x0001	;r3 As==01
+}
+    c110:	30 41       	ret			
+
+0000c112 <uart_set_rx_isr_ptr>:
+
+void uart_set_rx_isr_ptr(void (*isr_ptr)(unsigned char c)) 
+{
+	uart_rx_isr_ptr = isr_ptr;	
+    c112:	82 4f 00 02 	mov	r15,	&0x0200	
+}
+    c116:	30 41       	ret			
+
+0000c118 <uart_getc>:
+
+unsigned char uart_getc()
+{
+    while (!(IFG2&UCA0RXIFG));                // USCI_A0 RX buffer ready?
+    c118:	5f 42 03 00 	mov.b	&0x0003,r15	
+    c11c:	1f f3       	and	#1,	r15	;r3 As==01
+    c11e:	fc 27       	jz	$-6      	;abs 0xc118
+	return UCA0RXBUF;
+    c120:	5f 42 66 00 	mov.b	&0x0066,r15	
+}
+    c124:	30 41       	ret			
+
+0000c126 <uart_putc>:
+
+void uart_putc(unsigned char c)
+{
+	while (!(IFG2&UCA0TXIFG));              // USCI_A0 TX buffer ready?
+    c126:	5e 42 03 00 	mov.b	&0x0003,r14	
+    c12a:	2e f3       	and	#2,	r14	;r3 As==10
+    c12c:	fc 27       	jz	$-6      	;abs 0xc126
+  	UCA0TXBUF = c;                    		// TX
+    c12e:	c2 4f 67 00 	mov.b	r15,	&0x0067	
+}
+    c132:	30 41       	ret			
+
+0000c134 <uart_puts>:
+
+void uart_puts(const char *str)
+{
+    c134:	0b 12       	push	r11		
+    c136:	0b 4f       	mov	r15,	r11	
+     while(*str) uart_putc(*str++);
+    c138:	03 3c       	jmp	$+8      	;abs 0xc140
+    c13a:	1b 53       	inc	r11		
+    c13c:	b0 12 26 c1 	call	#0xc126	
+    c140:	6f 4b       	mov.b	@r11,	r15	
+    c142:	4f 93       	tst.b	r15		
+    c144:	fa 23       	jnz	$-10     	;abs 0xc13a
+}
+    c146:	3b 41       	pop	r11		
+    c148:	30 41       	ret			
+
+0000c14a <USCI0RX_ISR>:
+
+interrupt(USCIAB0RX_VECTOR) USCI0RX_ISR(void)
+{
+    c14a:	0f 12       	push	r15		
+    c14c:	0e 12       	push	r14		
+    c14e:	0d 12       	push	r13		
+    c150:	0c 12       	push	r12		
+	if(uart_rx_isr_ptr != 0L) {
+    c152:	1e 42 00 02 	mov	&0x0200,r14	
+    c156:	0e 93       	tst	r14		
+    c158:	03 24       	jz	$+8      	;abs 0xc160
+		(uart_rx_isr_ptr)(UCA0RXBUF);
+    c15a:	5f 42 66 00 	mov.b	&0x0066,r15	
+    c15e:	8e 12       	call	r14		
+	}
+}
+    c160:	3c 41       	pop	r12		
+    c162:	3d 41       	pop	r13		
+    c164:	3e 41       	pop	r14		
+    c166:	3f 41       	pop	r15		
+    c168:	00 13       	reti			
+
+0000c16a <_unexpected_>:
+    c16a:	00 13       	reti			
+
+Disassembly of section .vectors:
+
+0000ffe0 <__ivtbl_16>:
+    ffe0:	d4 c0 d4 c0 d4 c0 d4 c0 d4 c0 d4 c0 d4 c0 4a c1     ..............J.
+    fff0:	d4 c0 d4 c0 d4 c0 d4 c0 d4 c0 d4 c0 d4 c0 00 c0     ................

+ 34 - 0
msp430-harduart/src/firmware.srec

@@ -0,0 +1,34 @@
+S01000006669726D776172652E73726563B7
+S113C0005542200135D0085A8245020231400004CD
+S113C0103F4000000F9308249242020220012F8324
+S113C0209F4FD6C10002F8233F4002000F9307241C
+S113C0309242020220011F83CF430002F92321828E
+S113C040B240805A2001D242FF105700D242FE1063
+S113C0505600F24041002200F24041002100B0129B
+S113C060E2C03F40D8C0B01212C132D23F406CC1CE
+S113C070B01234C13F4080C1B01234C13F4092C1BC
+S113C080B01234C13F40A6C1B01234C1B01218C1BD
+S113C090B01226C13F40CFC1B01234C1F2E040001B
+S113C0A02100B14050C30000814302002E411F41D2
+S113C0B002003E533F63814E0000814F02002E4137
+S113C0C01F4102000E93F2230F93F023E73F32D077
+S113C0D0F000FD3F30406AC1B01226C1D2E3210016
+S113C0E0304182430002F24006002600F24006007E
+S113C0F04100F2D080FF6100F24068006200C24358
+S113C1006300E2436400F2F0FEFF6100D2D3010059
+S113C1103041824F000230415F4203001FF3FC278D
+S113C1205F42660030415E4203002EF3FC27C24F9B
+S113C130670030410B120B4F033C1B53B01226C156
+S113C1406F4B4F93FA233B4130410F120E120D12E5
+S113C1500C121E4200020E9303245F4266008E12EC
+S10FC1603C413D413E413F4100130013AF
+S113C16C0A0D2A2A2A2A2A2A2A2A2A2A2A2A2A2A5C
+S113C17C2A0A0D004D5350343330206861726475B3
+S113C18C6172740A0D002A2A2A2A2A2A2A2A2A2A9D
+S113C19C2A2A2A2A2A0A0D0A0D00505245535320E2
+S113C1AC616E79206B657920746F2073746172747D
+S113C1BC206563686F206578616D706C65202E2E28
+S10DC1CC2E20000A0D4F4B0A0D004F
+S113FFE0D4C0D4C0D4C0D4C0D4C0D4C0D4C04AC1F6
+S113FFF0D4C0D4C0D4C0D4C0D4C0D4C0D4C000C031
+S903C0003C

+ 66 - 0
msp430-harduart/src/include/uart.h

@@ -0,0 +1,66 @@
+/*
+ * This file is part of the MSP430 hardware UART example.
+ *
+ * Copyright (C) 2012 Stefan Wendler <sw@kaltpost.de>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/******************************************************************************
+ * Hardware UART example for MSP430.
+ *
+ * Stefan Wendler
+ * sw@kaltpost.de
+ * http://gpio.kaltpost.de
+ *
+ *****************************************************************************/
+
+#ifndef __UART_H
+#define __UART_H
+
+/**
+ * Initialize soft UART
+ */
+void uart_init(void);
+
+/**
+ * Set pointer for ISR to call when data was received.
+ *
+ * @param[in]	*isr_ptr	pointer to ISR
+ */
+void uart_set_rx_isr_ptr(void (*isr_ptr)(unsigned char c));
+
+/**
+ * Read one character from UART blocking.
+ *
+ * @return	character received 
+ */
+unsigned char uart_getc();
+
+/**
+ * Write one chracter to the UART blocking.
+ *
+ * @param[in]	*c	the character to write
+ */
+void uart_putc(unsigned char c);
+
+/**
+ * Write string to the UART blocking.
+ *
+ * @param[in]	*str	the 0 terminated string to write
+ */
+void uart_puts(const char *str);
+
+#endif
+

+ 86 - 0
msp430-harduart/src/main.c

@@ -0,0 +1,86 @@
+/*
+ * This file is part of the MSP430 hardware UART example.
+ *
+ * Copyright (C) 2012 Stefan Wendler <sw@kaltpost.de>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/******************************************************************************
+ * Hardware UART example for MSP430.
+ *
+ * Stefan Wendler
+ * sw@kaltpost.de
+ * http://gpio.kaltpost.de
+ *
+ * Echos back each character received. Blinks green LED in main loop. Toggles
+ * red LED on RX.
+ *
+ * Use /dev/ttyACM0 at 9600 Bauds (and 8,N,1).
+ *
+ * Note: RX-TX must be swaped when using the MSPg2553 with the Launchpad! 
+ *       You could easliy do so by crossing RX/TX on the jumpers of the 
+ *       Launchpad.
+ ******************************************************************************/
+
+#include <msp430g2553.h>
+#include "uart.h"
+
+void uart_rx_isr(unsigned char c) {
+	uart_putc(c);
+	P1OUT ^= BIT0;		// toggle P1.0 (red led)
+}
+ 
+/**
+ * Main routine
+ */
+int main(void)
+{
+    WDTCTL  = WDTPW + WDTHOLD; 	// Stop WDT
+	BCSCTL1 = CALBC1_1MHZ;      // Set DCO
+  	DCOCTL  = CALDCO_1MHZ;
+ 
+	P1DIR  = BIT0 + BIT6; 		// P1.0 and P1.6 are the red+green LEDs	
+	P1OUT  = BIT0 + BIT6; 		// All LEDs off
+
+    uart_init();
+
+	// register ISR called when data was received
+    uart_set_rx_isr_ptr(uart_rx_isr);
+
+    __bis_SR_register(GIE);
+
+    uart_puts((char *)"\n\r***************\n\r");
+    uart_puts((char *)"MSP430 harduart\n\r");
+    uart_puts((char *)"***************\n\r\n\r");
+
+	uart_puts((char *)"PRESS any key to start echo example ... ");
+
+	unsigned char c = uart_getc();
+
+	uart_putc(c);
+	uart_puts((char *)"\n\rOK\n\r");
+
+    volatile unsigned long i;
+
+    while(1) {
+
+	   P1OUT ^= BIT6; 			// Toggle P1.6 output (green LED) using exclusive-OR
+	   i = 50000;             	// Delay
+
+	   do (i--);				// busy waiting (bad)
+	   while (i != 0);
+    } 
+}
+

BIN
msp430-harduart/src/main.o


+ 89 - 0
msp430-harduart/src/uart.c

@@ -0,0 +1,89 @@
+/*
+ * This file is part of the MSP430 hardware UART example.
+ *
+ * Copyright (C) 2012 Stefan Wendler <sw@kaltpost.de>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/******************************************************************************
+ * Hardware UART example for MSP430.
+ *
+ * Stefan Wendler
+ * sw@kaltpost.de
+ * http://gpio.kaltpost.de
+ ******************************************************************************/
+
+#include <msp430.h>
+#include <legacymsp430.h>
+
+#include "uart.h"
+
+/**
+ * Receive Data (RXD) at P1.1
+ */
+#define RXD		BIT1
+
+/**
+ * Transmit Data (TXD) at P1.2
+ */
+#define TXD		BIT2
+
+/**
+ * Callback handler for receive
+ */
+void (*uart_rx_isr_ptr)(unsigned char c);
+
+void uart_init(void)
+{
+	uart_set_rx_isr_ptr(0L);
+
+	P1SEL  = RXD + TXD;                       
+  	P1SEL2 = RXD + TXD;                       
+  	UCA0CTL1 |= UCSSEL_2;                     // SMCLK
+  	UCA0BR0 = 104;                            // 1MHz 9600
+  	UCA0BR1 = 0;                              // 1MHz 9600
+  	UCA0MCTL = UCBRS0;                        // Modulation UCBRSx = 1
+  	UCA0CTL1 &= ~UCSWRST;                     // Initialize USCI state machine
+  	IE2 |= UCA0RXIE;                          // Enable USCI_A0 RX interrupt
+}
+
+void uart_set_rx_isr_ptr(void (*isr_ptr)(unsigned char c)) 
+{
+	uart_rx_isr_ptr = isr_ptr;	
+}
+
+unsigned char uart_getc()
+{
+    while (!(IFG2&UCA0RXIFG));                // USCI_A0 RX buffer ready?
+	return UCA0RXBUF;
+}
+
+void uart_putc(unsigned char c)
+{
+	while (!(IFG2&UCA0TXIFG));              // USCI_A0 TX buffer ready?
+  	UCA0TXBUF = c;                    		// TX
+}
+
+void uart_puts(const char *str)
+{
+     while(*str) uart_putc(*str++);
+}
+
+interrupt(USCIAB0RX_VECTOR) USCI0RX_ISR(void)
+{
+	if(uart_rx_isr_ptr != 0L) {
+		(uart_rx_isr_ptr)(UCA0RXBUF);
+	}
+}

BIN
msp430-harduart/src/uart.o


+ 27 - 0
rfid_read/Makefile

@@ -0,0 +1,27 @@
+##
+# Toplevel Makefile MSP40 hardware UART
+#
+# Stefan Wendler, sw@kaltpost.de 
+##
+
+BASEDIR 	= .
+SRCDIR  	= src
+TMPDIR		= /tmp
+VERSION		= 0.1
+TARGET		= msp430_harduart_v$(VERSION)
+
+all: target
+target: 
+	make -C $(SRCDIR)
+style:
+	cd $(SRCDIR) && make style
+
+check: 
+	make -C $(SRCDIR) check
+
+flash-target: target
+	mspdebug rf2500 "prog ./bin/firmware.elf"
+clean: 
+	make -C $(SRCDIR) clean
+	rm -fr doc/gen	
+	rm -f bin/firmware.*

+ 0 - 0
rfid_read/bin/emptyfile.txt


BIN
rfid_read/bin/firmware.bin


BIN
rfid_read/bin/firmware.elf


+ 25 - 0
rfid_read/bin/firmware.hex

@@ -0,0 +1,25 @@
+:10C000005542200135D0085A8245020231400004D1
+:10C010003F4000000F9308249242020220012F8328
+:10C020009F4F45C10002F8233F4002000F930724B1
+:10C030009242020220011F83CF430002F923B24043
+:10C04000805A2001D242FF105700D242FE10560003
+:10C05000F24041002200F24041002100B01292C0A3
+:10C060003F4088C0B012C2C032D23F401CC1B012A3
+:10C07000E4C03F402EC1B012E4C0B012C8C032D0FC
+:10C08000F000FD3F30401AC1B012D6C0D2E321000B
+:10C09000304182430002F24006002600F2400600D2
+:10C0A0004100F2D080FF6100F24068006200C243AC
+:10C0B0006300E2436400F2F0FEFF6100D2D30100AE
+:10C0C0003041824F000230415F4203001FF3FC27E2
+:10C0D0005F42660030415E4203002EF3FC27C24FF0
+:10C0E000670030410B120B4F033C1B53B012D6C0FC
+:10C0F0006F4B4F93FA233B4130410F120E120D123A
+:10C100000C121E4200020E9303245F4266008E1240
+:0CC110003C413D413E413F410013001303
+:10C11C004D53503433302068617264756172740A07
+:10C12C000D0057616974696E6720666F722061201B
+:09C13C00746167202E2E2E2000F4
+:10FFE00084C084C084C084C084C084C084C0FAC07B
+:10FFF00084C084C084C084C084C084C084C000C065
+:040000030000C00039
+:00000001FF

+ 218 - 0
rfid_read/bin/firmware.list

@@ -0,0 +1,218 @@
+
+firmware.elf:     file format elf32-msp430
+
+
+Disassembly of section .text:
+
+0000c000 <__watchdog_support>:
+    c000:	55 42 20 01 	mov.b	&0x0120,r5	
+    c004:	35 d0 08 5a 	bis	#23048,	r5	;#0x5a08
+    c008:	82 45 02 02 	mov	r5,	&0x0202	
+
+0000c00c <__init_stack>:
+    c00c:	31 40 00 04 	mov	#1024,	r1	;#0x0400
+
+0000c010 <__do_copy_data>:
+    c010:	3f 40 00 00 	mov	#0,	r15	;#0x0000
+    c014:	0f 93       	tst	r15		
+    c016:	08 24       	jz	$+18     	;abs 0xc028
+    c018:	92 42 02 02 	mov	&0x0202,&0x0120	
+    c01c:	20 01 
+    c01e:	2f 83       	decd	r15		
+    c020:	9f 4f 45 c1 	mov	-16059(r15),512(r15);0xc145(r15), 0x0200(r15)
+    c024:	00 02 
+    c026:	f8 23       	jnz	$-14     	;abs 0xc018
+
+0000c028 <__do_clear_bss>:
+    c028:	3f 40 02 00 	mov	#2,	r15	;#0x0002
+    c02c:	0f 93       	tst	r15		
+    c02e:	07 24       	jz	$+16     	;abs 0xc03e
+    c030:	92 42 02 02 	mov	&0x0202,&0x0120	
+    c034:	20 01 
+    c036:	1f 83       	dec	r15		
+    c038:	cf 43 00 02 	mov.b	#0,	512(r15);r3 As==00, 0x0200(r15)
+    c03c:	f9 23       	jnz	$-12     	;abs 0xc030
+
+0000c03e <main>:
+	P1OUT ^= BIT0;		// toggle P1.0 (red led)
+}
+ 
+int main(void)
+{
+	WDTCTL  = WDTPW + WDTHOLD; 	// Stop WDT
+    c03e:	b2 40 80 5a 	mov	#23168,	&0x0120	;#0x5a80
+    c042:	20 01 
+	BCSCTL1 = CALBC1_1MHZ;      // Set DCO
+    c044:	d2 42 ff 10 	mov.b	&0x10ff,&0x0057	
+    c048:	57 00 
+  	DCOCTL  = CALDCO_1MHZ;
+    c04a:	d2 42 fe 10 	mov.b	&0x10fe,&0x0056	
+    c04e:	56 00 
+ 
+	P1DIR  = BIT0 + BIT6; 		// P1.0 and P1.6 are the red+green LEDs	
+    c050:	f2 40 41 00 	mov.b	#65,	&0x0022	;#0x0041
+    c054:	22 00 
+	P1OUT  = BIT0 + BIT6; 		// All LEDs off
+    c056:	f2 40 41 00 	mov.b	#65,	&0x0021	;#0x0041
+    c05a:	21 00 
+
+	uart_init();
+    c05c:	b0 12 92 c0 	call	#0xc092	
+
+	// register ISR called when data was received
+	uart_set_rx_isr_ptr(uart_rx_isr);
+    c060:	3f 40 88 c0 	mov	#-16248,r15	;#0xc088
+    c064:	b0 12 c2 c0 	call	#0xc0c2	
+
+	__bis_SR_register(GIE);
+    c068:	32 d2       	eint			
+
+	uart_puts((char *)"MSP430 harduart\n\r");
+    c06a:	3f 40 1c c1 	mov	#-16100,r15	;#0xc11c
+    c06e:	b0 12 e4 c0 	call	#0xc0e4	
+	uart_puts((char *)"Waiting for a tag ... ");
+    c072:	3f 40 2e c1 	mov	#-16082,r15	;#0xc12e
+    c076:	b0 12 e4 c0 	call	#0xc0e4	
+
+	unsigned char c = uart_getc();
+    c07a:	b0 12 c8 c0 	call	#0xc0c8	
+
+0000c07e <__stop_progExec__>:
+    c07e:	32 d0 f0 00 	bis	#240,	r2	;#0x00f0
+    c082:	fd 3f       	jmp	$-4      	;abs 0xc07e
+
+0000c084 <__ctors_end>:
+    c084:	30 40 1a c1 	br	#0xc11a	
+
+0000c088 <uart_rx_isr>:
+#include <msp430g2553.h>
+#include "uart.h"
+
+void uart_rx_isr(unsigned char c) {
+	uart_putc(c);
+    c088:	b0 12 d6 c0 	call	#0xc0d6	
+	P1OUT ^= BIT0;		// toggle P1.0 (red led)
+    c08c:	d2 e3 21 00 	xor.b	#1,	&0x0021	;r3 As==01
+}
+    c090:	30 41       	ret			
+
+0000c092 <uart_init>:
+  	IE2 |= UCA0RXIE;                          // Enable USCI_A0 RX interrupt
+}
+
+void uart_set_rx_isr_ptr(void (*isr_ptr)(unsigned char c)) 
+{
+	uart_rx_isr_ptr = isr_ptr;	
+    c092:	82 43 00 02 	mov	#0,	&0x0200	;r3 As==00
+
+void uart_init(void)
+{
+	uart_set_rx_isr_ptr(0L);
+
+	P1SEL  = RXD + TXD;                       
+    c096:	f2 40 06 00 	mov.b	#6,	&0x0026	;#0x0006
+    c09a:	26 00 
+  	P1SEL2 = RXD + TXD;                       
+    c09c:	f2 40 06 00 	mov.b	#6,	&0x0041	;#0x0006
+    c0a0:	41 00 
+  	UCA0CTL1 |= UCSSEL_2;                     // SMCLK
+    c0a2:	f2 d0 80 ff 	bis.b	#-128,	&0x0061	;#0xff80
+    c0a6:	61 00 
+  	UCA0BR0 = 104;                            // 1MHz 9600
+    c0a8:	f2 40 68 00 	mov.b	#104,	&0x0062	;#0x0068
+    c0ac:	62 00 
+  	UCA0BR1 = 0;                              // 1MHz 9600
+    c0ae:	c2 43 63 00 	mov.b	#0,	&0x0063	;r3 As==00
+  	UCA0MCTL = UCBRS0;                        // Modulation UCBRSx = 1
+    c0b2:	e2 43 64 00 	mov.b	#2,	&0x0064	;r3 As==10
+  	UCA0CTL1 &= ~UCSWRST;                     // Initialize USCI state machine
+    c0b6:	f2 f0 fe ff 	and.b	#-2,	&0x0061	;#0xfffe
+    c0ba:	61 00 
+  	IE2 |= UCA0RXIE;                          // Enable USCI_A0 RX interrupt
+    c0bc:	d2 d3 01 00 	bis.b	#1,	&0x0001	;r3 As==01
+}
+    c0c0:	30 41       	ret			
+
+0000c0c2 <uart_set_rx_isr_ptr>:
+
+void uart_set_rx_isr_ptr(void (*isr_ptr)(unsigned char c)) 
+{
+	uart_rx_isr_ptr = isr_ptr;	
+    c0c2:	82 4f 00 02 	mov	r15,	&0x0200	
+}
+    c0c6:	30 41       	ret			
+
+0000c0c8 <uart_getc>:
+
+unsigned char uart_getc()
+{
+    while (!(IFG2&UCA0RXIFG));                // USCI_A0 RX buffer ready?
+    c0c8:	5f 42 03 00 	mov.b	&0x0003,r15	
+    c0cc:	1f f3       	and	#1,	r15	;r3 As==01
+    c0ce:	fc 27       	jz	$-6      	;abs 0xc0c8
+	return UCA0RXBUF;
+    c0d0:	5f 42 66 00 	mov.b	&0x0066,r15	
+}
+    c0d4:	30 41       	ret			
+
+0000c0d6 <uart_putc>:
+
+void uart_putc(unsigned char c)
+{
+	while (!(IFG2&UCA0TXIFG));              // USCI_A0 TX buffer ready?
+    c0d6:	5e 42 03 00 	mov.b	&0x0003,r14	
+    c0da:	2e f3       	and	#2,	r14	;r3 As==10
+    c0dc:	fc 27       	jz	$-6      	;abs 0xc0d6
+  	UCA0TXBUF = c;                    		// TX
+    c0de:	c2 4f 67 00 	mov.b	r15,	&0x0067	
+}
+    c0e2:	30 41       	ret			
+
+0000c0e4 <uart_puts>:
+
+void uart_puts(const char *str)
+{
+    c0e4:	0b 12       	push	r11		
+    c0e6:	0b 4f       	mov	r15,	r11	
+     while(*str) uart_putc(*str++);
+    c0e8:	03 3c       	jmp	$+8      	;abs 0xc0f0
+    c0ea:	1b 53       	inc	r11		
+    c0ec:	b0 12 d6 c0 	call	#0xc0d6	
+    c0f0:	6f 4b       	mov.b	@r11,	r15	
+    c0f2:	4f 93       	tst.b	r15		
+    c0f4:	fa 23       	jnz	$-10     	;abs 0xc0ea
+}
+    c0f6:	3b 41       	pop	r11		
+    c0f8:	30 41       	ret			
+
+0000c0fa <USCI0RX_ISR>:
+
+interrupt(USCIAB0RX_VECTOR) USCI0RX_ISR(void)
+{
+    c0fa:	0f 12       	push	r15		
+    c0fc:	0e 12       	push	r14		
+    c0fe:	0d 12       	push	r13		
+    c100:	0c 12       	push	r12		
+	if(uart_rx_isr_ptr != 0L) {
+    c102:	1e 42 00 02 	mov	&0x0200,r14	
+    c106:	0e 93       	tst	r14		
+    c108:	03 24       	jz	$+8      	;abs 0xc110
+		(uart_rx_isr_ptr)(UCA0RXBUF);
+    c10a:	5f 42 66 00 	mov.b	&0x0066,r15	
+    c10e:	8e 12       	call	r14		
+	}
+}
+    c110:	3c 41       	pop	r12		
+    c112:	3d 41       	pop	r13		
+    c114:	3e 41       	pop	r14		
+    c116:	3f 41       	pop	r15		
+    c118:	00 13       	reti			
+
+0000c11a <_unexpected_>:
+    c11a:	00 13       	reti			
+
+Disassembly of section .vectors:
+
+0000ffe0 <__ivtbl_16>:
+    ffe0:	84 c0 84 c0 84 c0 84 c0 84 c0 84 c0 84 c0 fa c0     ................
+    fff0:	84 c0 84 c0 84 c0 84 c0 84 c0 84 c0 84 c0 00 c0     ................

+ 25 - 0
rfid_read/bin/firmware.srec

@@ -0,0 +1,25 @@
+S01000006669726D776172652E73726563B7
+S113C0005542200135D0085A8245020231400004CD
+S113C0103F4000000F9308249242020220012F8324
+S113C0209F4F45C10002F8233F4002000F930724AD
+S113C0309242020220011F83CF430002F923B2403F
+S113C040805A2001D242FF105700D242FE105600FF
+S113C050F24041002200F24041002100B01292C09F
+S113C0603F4088C0B012C2C032D23F401CC1B0129F
+S113C070E4C03F402EC1B012E4C0B012C8C032D0F8
+S113C080F000FD3F30401AC1B012D6C0D2E3210007
+S113C090304182430002F24006002600F2400600CE
+S113C0A04100F2D080FF6100F24068006200C243A8
+S113C0B06300E2436400F2F0FEFF6100D2D30100AA
+S113C0C03041824F000230415F4203001FF3FC27DE
+S113C0D05F42660030415E4203002EF3FC27C24FEC
+S113C0E0670030410B120B4F033C1B53B012D6C0F8
+S113C0F06F4B4F93FA233B4130410F120E120D1236
+S113C1000C121E4200020E9303245F4266008E123C
+S10FC1103C413D413E413F4100130013FF
+S113C11C4D53503433302068617264756172740A03
+S113C12C0D0057616974696E6720666F7220612017
+S10CC13C746167202E2E2E2000F0
+S113FFE084C084C084C084C084C084C084C0FAC077
+S113FFF084C084C084C084C084C084C084C000C061
+S903C0003C

+ 102 - 0
rfid_read/common.mk

@@ -0,0 +1,102 @@
+##
+# Common settings for Makefiles
+#
+# Stefan Wendler, sw@kaltpost.de
+##
+
+# compiler prefix
+PREFIX		?= msp430-
+
+CC			 = $(PREFIX)gcc
+LD			 = $(PREFIX)gcc
+OBJCOPY		 = $(PREFIX)objcopy
+OBJDUMP		 = $(PREFIX)objdump
+
+INCDIR		+= -I./include 
+CFLAGS		+= -Os -mmcu=msp430g2553 -g -Wall -Wextra $(INCDIR) 
+
+LIBDIR		 =  
+LIBS		 =  
+LDFLAGS		+= -mmcu=msp430g2553 $(LIBDIR) $(LIBS) 
+
+# where to put generated binaries to 
+BINDIR		?= ../bin
+
+# doxygen executable
+DOXYGEN = doxygen
+
+# doxygen flags
+DOXYGENFLAGS = ../doxygen.conf
+
+# styler to use
+STYLER = astyle
+
+# which c-style to use
+# - see man astyle
+STYLERFLAGS = --style=stroustrup
+
+# cpp checker
+CHECKER = cppcheck
+
+# flags for checker
+# CHECKERFLAGS = --error-exitcode=1 --enable=all
+CHECKERFLAGS = --enable=all --error-exitcode=1
+
+.SUFFIXES: .elf .bin .hex .srec .list .images
+.SECONDEXPANSION:
+.SECONDARY:
+
+all: images
+
+images: $(BINARY).images
+
+%.images: %.bin %.hex %.srec %.list
+	@#echo "*** $* images generated ***"
+
+%.bin: %.elf
+	@#printf "  OBJCOPY $(*).bin\n"
+	$(OBJCOPY) -Obinary $(*).elf $(*).bin && cp $(*).bin $(BINDIR)/.
+
+%.hex: %.elf
+	@#printf "  OBJCOPY $(*).hex\n"
+	$(OBJCOPY) -Oihex $(*).elf $(*).hex && cp $(*).hex $(BINDIR)/.
+
+%.srec: %.elf
+	@#printf "  OBJCOPY $(*).srec\n"
+	$(OBJCOPY) -Osrec $(*).elf $(*).srec && cp $(*).srec $(BINDIR)/.
+
+%.list: %.elf
+	@#printf "  OBJDUMP $(*).list\n"
+	$(OBJDUMP) -S $(*).elf > $(*).list && cp $(*).list $(BINDIR)/.
+
+%.elf: $(OBJS) $(LDSCRIPT)
+	@#printf "  LD      $(subst $(shell pwd)/,,$(@))\n"
+	$(LD) $(OBJS) $(LDFLAGS) -o $(*).elf && cp $(*).elf $(BINDIR)/.
+
+%.o: %.c Makefile
+	@#printf "  CC      $(subst $(shell pwd)/,,$(@))\n"
+	$(CC) $(CFLAGS) -o $@ -c $<
+
+%.o: %.cpp Makefile
+	@#printf "  CC      $(subst $(shell pwd)/,,$(@))\n"
+	$(CC) $(CFLAGS) -o $@ -c $<
+
+SRC = $(wildcard *.c)
+HDR = $(wildcard include/*.h)
+
+style: 
+	$(STYLER) $(STYLERFLAGS) $(SRC) 
+	$(STYLER) $(STYLERFLAGS) $(HDR) 
+	
+clean:
+	rm -f *.o
+	rm -f *.d
+	rm -f *.elf
+	rm -f *.bin
+	rm -f *.hex
+	rm -f *.srec
+	rm -f *.list
+	rm -f *.orig
+
+.PHONY: images clean
+

BIN
rfid_read/src/.main.c.kate-swp


+ 10 - 0
rfid_read/src/Makefile

@@ -0,0 +1,10 @@
+BINARY		 = firmware
+OBJS		+= main.o uart.o 
+
+include ../common.mk
+
+check: $(SRC)
+	$(CHECKER) $(CHECKERFLAGS) $(SRC)
+
+gen-docs: $(HDR) $(SRC) 
+	$(DOXYGEN) $(DOXYGENFLAGS)

BIN
rfid_read/src/firmware.bin


BIN
rfid_read/src/firmware.elf


+ 25 - 0
rfid_read/src/firmware.hex

@@ -0,0 +1,25 @@
+:10C000005542200135D0085A8245020231400004D1
+:10C010003F4000000F9308249242020220012F8328
+:10C020009F4F45C10002F8233F4002000F930724B1
+:10C030009242020220011F83CF430002F923B24043
+:10C04000805A2001D242FF105700D242FE10560003
+:10C05000F24041002200F24041002100B01292C0A3
+:10C060003F4088C0B012C2C032D23F401CC1B012A3
+:10C07000E4C03F402EC1B012E4C0B012C8C032D0FC
+:10C08000F000FD3F30401AC1B012D6C0D2E321000B
+:10C09000304182430002F24006002600F2400600D2
+:10C0A0004100F2D080FF6100F24068006200C243AC
+:10C0B0006300E2436400F2F0FEFF6100D2D30100AE
+:10C0C0003041824F000230415F4203001FF3FC27E2
+:10C0D0005F42660030415E4203002EF3FC27C24FF0
+:10C0E000670030410B120B4F033C1B53B012D6C0FC
+:10C0F0006F4B4F93FA233B4130410F120E120D123A
+:10C100000C121E4200020E9303245F4266008E1240
+:0CC110003C413D413E413F410013001303
+:10C11C004D53503433302068617264756172740A07
+:10C12C000D0057616974696E6720666F722061201B
+:09C13C00746167202E2E2E2000F4
+:10FFE00084C084C084C084C084C084C084C0FAC07B
+:10FFF00084C084C084C084C084C084C084C000C065
+:040000030000C00039
+:00000001FF

+ 218 - 0
rfid_read/src/firmware.list

@@ -0,0 +1,218 @@
+
+firmware.elf:     file format elf32-msp430
+
+
+Disassembly of section .text:
+
+0000c000 <__watchdog_support>:
+    c000:	55 42 20 01 	mov.b	&0x0120,r5	
+    c004:	35 d0 08 5a 	bis	#23048,	r5	;#0x5a08
+    c008:	82 45 02 02 	mov	r5,	&0x0202	
+
+0000c00c <__init_stack>:
+    c00c:	31 40 00 04 	mov	#1024,	r1	;#0x0400
+
+0000c010 <__do_copy_data>:
+    c010:	3f 40 00 00 	mov	#0,	r15	;#0x0000
+    c014:	0f 93       	tst	r15		
+    c016:	08 24       	jz	$+18     	;abs 0xc028
+    c018:	92 42 02 02 	mov	&0x0202,&0x0120	
+    c01c:	20 01 
+    c01e:	2f 83       	decd	r15		
+    c020:	9f 4f 45 c1 	mov	-16059(r15),512(r15);0xc145(r15), 0x0200(r15)
+    c024:	00 02 
+    c026:	f8 23       	jnz	$-14     	;abs 0xc018
+
+0000c028 <__do_clear_bss>:
+    c028:	3f 40 02 00 	mov	#2,	r15	;#0x0002
+    c02c:	0f 93       	tst	r15		
+    c02e:	07 24       	jz	$+16     	;abs 0xc03e
+    c030:	92 42 02 02 	mov	&0x0202,&0x0120	
+    c034:	20 01 
+    c036:	1f 83       	dec	r15		
+    c038:	cf 43 00 02 	mov.b	#0,	512(r15);r3 As==00, 0x0200(r15)
+    c03c:	f9 23       	jnz	$-12     	;abs 0xc030
+
+0000c03e <main>:
+	P1OUT ^= BIT0;		// toggle P1.0 (red led)
+}
+ 
+int main(void)
+{
+	WDTCTL  = WDTPW + WDTHOLD; 	// Stop WDT
+    c03e:	b2 40 80 5a 	mov	#23168,	&0x0120	;#0x5a80
+    c042:	20 01 
+	BCSCTL1 = CALBC1_1MHZ;      // Set DCO
+    c044:	d2 42 ff 10 	mov.b	&0x10ff,&0x0057	
+    c048:	57 00 
+  	DCOCTL  = CALDCO_1MHZ;
+    c04a:	d2 42 fe 10 	mov.b	&0x10fe,&0x0056	
+    c04e:	56 00 
+ 
+	P1DIR  = BIT0 + BIT6; 		// P1.0 and P1.6 are the red+green LEDs	
+    c050:	f2 40 41 00 	mov.b	#65,	&0x0022	;#0x0041
+    c054:	22 00 
+	P1OUT  = BIT0 + BIT6; 		// All LEDs off
+    c056:	f2 40 41 00 	mov.b	#65,	&0x0021	;#0x0041
+    c05a:	21 00 
+
+	uart_init();
+    c05c:	b0 12 92 c0 	call	#0xc092	
+
+	// register ISR called when data was received
+	uart_set_rx_isr_ptr(uart_rx_isr);
+    c060:	3f 40 88 c0 	mov	#-16248,r15	;#0xc088
+    c064:	b0 12 c2 c0 	call	#0xc0c2	
+
+	__bis_SR_register(GIE);
+    c068:	32 d2       	eint			
+
+	uart_puts((char *)"MSP430 harduart\n\r");
+    c06a:	3f 40 1c c1 	mov	#-16100,r15	;#0xc11c
+    c06e:	b0 12 e4 c0 	call	#0xc0e4	
+	uart_puts((char *)"Waiting for a tag ... ");
+    c072:	3f 40 2e c1 	mov	#-16082,r15	;#0xc12e
+    c076:	b0 12 e4 c0 	call	#0xc0e4	
+
+	unsigned char c = uart_getc();
+    c07a:	b0 12 c8 c0 	call	#0xc0c8	
+
+0000c07e <__stop_progExec__>:
+    c07e:	32 d0 f0 00 	bis	#240,	r2	;#0x00f0
+    c082:	fd 3f       	jmp	$-4      	;abs 0xc07e
+
+0000c084 <__ctors_end>:
+    c084:	30 40 1a c1 	br	#0xc11a	
+
+0000c088 <uart_rx_isr>:
+#include <msp430g2553.h>
+#include "uart.h"
+
+void uart_rx_isr(unsigned char c) {
+	uart_putc(c);
+    c088:	b0 12 d6 c0 	call	#0xc0d6	
+	P1OUT ^= BIT0;		// toggle P1.0 (red led)
+    c08c:	d2 e3 21 00 	xor.b	#1,	&0x0021	;r3 As==01
+}
+    c090:	30 41       	ret			
+
+0000c092 <uart_init>:
+  	IE2 |= UCA0RXIE;                          // Enable USCI_A0 RX interrupt
+}
+
+void uart_set_rx_isr_ptr(void (*isr_ptr)(unsigned char c)) 
+{
+	uart_rx_isr_ptr = isr_ptr;	
+    c092:	82 43 00 02 	mov	#0,	&0x0200	;r3 As==00
+
+void uart_init(void)
+{
+	uart_set_rx_isr_ptr(0L);
+
+	P1SEL  = RXD + TXD;                       
+    c096:	f2 40 06 00 	mov.b	#6,	&0x0026	;#0x0006
+    c09a:	26 00 
+  	P1SEL2 = RXD + TXD;                       
+    c09c:	f2 40 06 00 	mov.b	#6,	&0x0041	;#0x0006
+    c0a0:	41 00 
+  	UCA0CTL1 |= UCSSEL_2;                     // SMCLK
+    c0a2:	f2 d0 80 ff 	bis.b	#-128,	&0x0061	;#0xff80
+    c0a6:	61 00 
+  	UCA0BR0 = 104;                            // 1MHz 9600
+    c0a8:	f2 40 68 00 	mov.b	#104,	&0x0062	;#0x0068
+    c0ac:	62 00 
+  	UCA0BR1 = 0;                              // 1MHz 9600
+    c0ae:	c2 43 63 00 	mov.b	#0,	&0x0063	;r3 As==00
+  	UCA0MCTL = UCBRS0;                        // Modulation UCBRSx = 1
+    c0b2:	e2 43 64 00 	mov.b	#2,	&0x0064	;r3 As==10
+  	UCA0CTL1 &= ~UCSWRST;                     // Initialize USCI state machine
+    c0b6:	f2 f0 fe ff 	and.b	#-2,	&0x0061	;#0xfffe
+    c0ba:	61 00 
+  	IE2 |= UCA0RXIE;                          // Enable USCI_A0 RX interrupt
+    c0bc:	d2 d3 01 00 	bis.b	#1,	&0x0001	;r3 As==01
+}
+    c0c0:	30 41       	ret			
+
+0000c0c2 <uart_set_rx_isr_ptr>:
+
+void uart_set_rx_isr_ptr(void (*isr_ptr)(unsigned char c)) 
+{
+	uart_rx_isr_ptr = isr_ptr;	
+    c0c2:	82 4f 00 02 	mov	r15,	&0x0200	
+}
+    c0c6:	30 41       	ret			
+
+0000c0c8 <uart_getc>:
+
+unsigned char uart_getc()
+{
+    while (!(IFG2&UCA0RXIFG));                // USCI_A0 RX buffer ready?
+    c0c8:	5f 42 03 00 	mov.b	&0x0003,r15	
+    c0cc:	1f f3       	and	#1,	r15	;r3 As==01
+    c0ce:	fc 27       	jz	$-6      	;abs 0xc0c8
+	return UCA0RXBUF;
+    c0d0:	5f 42 66 00 	mov.b	&0x0066,r15	
+}
+    c0d4:	30 41       	ret			
+
+0000c0d6 <uart_putc>:
+
+void uart_putc(unsigned char c)
+{
+	while (!(IFG2&UCA0TXIFG));              // USCI_A0 TX buffer ready?
+    c0d6:	5e 42 03 00 	mov.b	&0x0003,r14	
+    c0da:	2e f3       	and	#2,	r14	;r3 As==10
+    c0dc:	fc 27       	jz	$-6      	;abs 0xc0d6
+  	UCA0TXBUF = c;                    		// TX
+    c0de:	c2 4f 67 00 	mov.b	r15,	&0x0067	
+}
+    c0e2:	30 41       	ret			
+
+0000c0e4 <uart_puts>:
+
+void uart_puts(const char *str)
+{
+    c0e4:	0b 12       	push	r11		
+    c0e6:	0b 4f       	mov	r15,	r11	
+     while(*str) uart_putc(*str++);
+    c0e8:	03 3c       	jmp	$+8      	;abs 0xc0f0
+    c0ea:	1b 53       	inc	r11		
+    c0ec:	b0 12 d6 c0 	call	#0xc0d6	
+    c0f0:	6f 4b       	mov.b	@r11,	r15	
+    c0f2:	4f 93       	tst.b	r15		
+    c0f4:	fa 23       	jnz	$-10     	;abs 0xc0ea
+}
+    c0f6:	3b 41       	pop	r11		
+    c0f8:	30 41       	ret			
+
+0000c0fa <USCI0RX_ISR>:
+
+interrupt(USCIAB0RX_VECTOR) USCI0RX_ISR(void)
+{
+    c0fa:	0f 12       	push	r15		
+    c0fc:	0e 12       	push	r14		
+    c0fe:	0d 12       	push	r13		
+    c100:	0c 12       	push	r12		
+	if(uart_rx_isr_ptr != 0L) {
+    c102:	1e 42 00 02 	mov	&0x0200,r14	
+    c106:	0e 93       	tst	r14		
+    c108:	03 24       	jz	$+8      	;abs 0xc110
+		(uart_rx_isr_ptr)(UCA0RXBUF);
+    c10a:	5f 42 66 00 	mov.b	&0x0066,r15	
+    c10e:	8e 12       	call	r14		
+	}
+}
+    c110:	3c 41       	pop	r12		
+    c112:	3d 41       	pop	r13		
+    c114:	3e 41       	pop	r14		
+    c116:	3f 41       	pop	r15		
+    c118:	00 13       	reti			
+
+0000c11a <_unexpected_>:
+    c11a:	00 13       	reti			
+
+Disassembly of section .vectors:
+
+0000ffe0 <__ivtbl_16>:
+    ffe0:	84 c0 84 c0 84 c0 84 c0 84 c0 84 c0 84 c0 fa c0     ................
+    fff0:	84 c0 84 c0 84 c0 84 c0 84 c0 84 c0 84 c0 00 c0     ................

+ 25 - 0
rfid_read/src/firmware.srec

@@ -0,0 +1,25 @@
+S01000006669726D776172652E73726563B7
+S113C0005542200135D0085A8245020231400004CD
+S113C0103F4000000F9308249242020220012F8324
+S113C0209F4F45C10002F8233F4002000F930724AD
+S113C0309242020220011F83CF430002F923B2403F
+S113C040805A2001D242FF105700D242FE105600FF
+S113C050F24041002200F24041002100B01292C09F
+S113C0603F4088C0B012C2C032D23F401CC1B0129F
+S113C070E4C03F402EC1B012E4C0B012C8C032D0F8
+S113C080F000FD3F30401AC1B012D6C0D2E3210007
+S113C090304182430002F24006002600F2400600CE
+S113C0A04100F2D080FF6100F24068006200C243A8
+S113C0B06300E2436400F2F0FEFF6100D2D30100AA
+S113C0C03041824F000230415F4203001FF3FC27DE
+S113C0D05F42660030415E4203002EF3FC27C24FEC
+S113C0E0670030410B120B4F033C1B53B012D6C0F8
+S113C0F06F4B4F93FA233B4130410F120E120D1236
+S113C1000C121E4200020E9303245F4266008E123C
+S10FC1103C413D413E413F4100130013FF
+S113C11C4D53503433302068617264756172740A03
+S113C12C0D0057616974696E6720666F7220612017
+S10CC13C746167202E2E2E2000F0
+S113FFE084C084C084C084C084C084C084C0FAC077
+S113FFF084C084C084C084C084C084C084C000C061
+S903C0003C

+ 66 - 0
rfid_read/src/include/uart.h

@@ -0,0 +1,66 @@
+/*
+ * This file is part of the MSP430 hardware UART example.
+ *
+ * Copyright (C) 2012 Stefan Wendler <sw@kaltpost.de>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/******************************************************************************
+ * Hardware UART example for MSP430.
+ *
+ * Stefan Wendler
+ * sw@kaltpost.de
+ * http://gpio.kaltpost.de
+ *
+ *****************************************************************************/
+
+#ifndef __UART_H
+#define __UART_H
+
+/**
+ * Initialize soft UART
+ */
+void uart_init(void);
+
+/**
+ * Set pointer for ISR to call when data was received.
+ *
+ * @param[in]	*isr_ptr	pointer to ISR
+ */
+void uart_set_rx_isr_ptr(void (*isr_ptr)(unsigned char c));
+
+/**
+ * Read one character from UART blocking.
+ *
+ * @return	character received 
+ */
+unsigned char uart_getc();
+
+/**
+ * Write one chracter to the UART blocking.
+ *
+ * @param[in]	*c	the character to write
+ */
+void uart_putc(unsigned char c);
+
+/**
+ * Write string to the UART blocking.
+ *
+ * @param[in]	*str	the 0 terminated string to write
+ */
+void uart_puts(const char *str);
+
+#endif
+

+ 30 - 0
rfid_read/src/main.c

@@ -0,0 +1,30 @@
+#include <msp430g2553.h>
+#include "uart.h"
+
+void uart_rx_isr(unsigned char c) {
+	uart_putc(c);
+	P1OUT ^= BIT0;		// toggle P1.0 (red led)
+}
+ 
+int main(void)
+{
+	WDTCTL  = WDTPW + WDTHOLD; 	// Stop WDT
+	BCSCTL1 = CALBC1_1MHZ;      // Set DCO
+  	DCOCTL  = CALDCO_1MHZ;
+ 
+	P1DIR  = BIT0 + BIT6; 		// P1.0 and P1.6 are the red+green LEDs	
+	P1OUT  = BIT0 + BIT6; 		// All LEDs off
+
+	uart_init();
+
+	// register ISR called when data was received
+	uart_set_rx_isr_ptr(uart_rx_isr);
+
+	__bis_SR_register(GIE);
+
+	uart_puts((char *)"MSP430 harduart\n\r");
+	uart_puts((char *)"Waiting for a tag ... ");
+
+	unsigned char c = uart_getc();
+}
+

BIN
rfid_read/src/main.o


+ 89 - 0
rfid_read/src/uart.c

@@ -0,0 +1,89 @@
+/*
+ * This file is part of the MSP430 hardware UART example.
+ *
+ * Copyright (C) 2012 Stefan Wendler <sw@kaltpost.de>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/******************************************************************************
+ * Hardware UART example for MSP430.
+ *
+ * Stefan Wendler
+ * sw@kaltpost.de
+ * http://gpio.kaltpost.de
+ ******************************************************************************/
+
+#include <msp430.h>
+#include <legacymsp430.h>
+
+#include "uart.h"
+
+/**
+ * Receive Data (RXD) at P1.1
+ */
+#define RXD		BIT1
+
+/**
+ * Transmit Data (TXD) at P1.2
+ */
+#define TXD		BIT2
+
+/**
+ * Callback handler for receive
+ */
+void (*uart_rx_isr_ptr)(unsigned char c);
+
+void uart_init(void)
+{
+	uart_set_rx_isr_ptr(0L);
+
+	P1SEL  = RXD + TXD;                       
+  	P1SEL2 = RXD + TXD;                       
+  	UCA0CTL1 |= UCSSEL_2;                     // SMCLK
+  	UCA0BR0 = 104;                            // 1MHz 9600
+  	UCA0BR1 = 0;                              // 1MHz 9600
+  	UCA0MCTL = UCBRS0;                        // Modulation UCBRSx = 1
+  	UCA0CTL1 &= ~UCSWRST;                     // Initialize USCI state machine
+  	IE2 |= UCA0RXIE;                          // Enable USCI_A0 RX interrupt
+}
+
+void uart_set_rx_isr_ptr(void (*isr_ptr)(unsigned char c)) 
+{
+	uart_rx_isr_ptr = isr_ptr;	
+}
+
+unsigned char uart_getc()
+{
+    while (!(IFG2&UCA0RXIFG));                // USCI_A0 RX buffer ready?
+	return UCA0RXBUF;
+}
+
+void uart_putc(unsigned char c)
+{
+	while (!(IFG2&UCA0TXIFG));              // USCI_A0 TX buffer ready?
+  	UCA0TXBUF = c;                    		// TX
+}
+
+void uart_puts(const char *str)
+{
+     while(*str) uart_putc(*str++);
+}
+
+interrupt(USCIAB0RX_VECTOR) USCI0RX_ISR(void)
+{
+	if(uart_rx_isr_ptr != 0L) {
+		(uart_rx_isr_ptr)(UCA0RXBUF);
+	}
+}

BIN
rfid_read/src/uart.o


+ 19 - 0
serial_test/Makefile

@@ -0,0 +1,19 @@
+CC=msp430-gcc
+CFLAGS=-Os -Wall -g -mmcu=msp430g2553
+
+OBJS=main.o
+  
+   
+all: $(OBJS)
+	$(CC) $(CFLAGS) -o main.elf $(OBJS)
+	 
+%.o: %.c
+	$(CC) $(CFLAGS) -c $<
+	 
+clean:
+	rm -fr main.elf $(OBJS)
+	 
+upload:
+	mspdebug rf2500 "prog main.elf"
+
+

+ 50 - 0
serial_test/main.c

@@ -0,0 +1,50 @@
+#include <msp430g2553.h>
+                                                       // Hardware-related definitions
+#define UART_TXD 0x02                                  // TXD on P1.1 (Timer0_A.OUT0)
+#define UART_TBIT (1000000 / 9600)                     // 9600 Baud, SMCLK = 1MHz
+                                                       // Globals for transmit UART communication
+unsigned int txData;                                   // UART internal variable for TX
+
+void TimerA_UART_tx(unsigned char byte);               // Function prototypes
+void TimerA_UART_print(char *string);
+
+void main(void){
+
+  WDTCTL = WDTPW + WDTHOLD;                            // Stop watchdog timer
+  DCOCTL = 0x00;                                       // Set DCOCLK to 1MHz
+  BCSCTL1 = CALBC1_1MHZ;
+  DCOCTL = CALDCO_1MHZ;
+
+  P1OUT = UART_TXD;                                    // Initialize P1.1
+  P1SEL = UART_TXD;                                    // Timer function for TXD pin
+  P1DIR = UART_TXD;                                    // Set TXD pin to output
+
+                                                       // Timer_A for transmit UART operation
+  TA0CCTL0 = OUT;                                      // Set TXD Idle as Mark = '1'
+  TA0CCTL1 = SCS + CM1 + CAP;                          // Sync, Neg Edge, Capture
+  TA0CTL = TASSEL_2 + MC_2;                            // SMCLK, start in continuous mode
+
+  _BIS_SR(GIE);                                        // Enable CPU interrupts
+
+  TimerA_UART_print("G2553 TimerA UART\r\n");          // Send test message
+  TimerA_UART_print("READY.\r\n");
+}
+
+void TimerA_UART_tx(unsigned char byte) {              // Outputs one byte using the Timer_A UART
+
+  while (TACCTL0 & CCIE);                              // Ensure last char got TX'd
+
+  TA0CCR0 = TAR;                                       // Current state of TA counter
+  TA0CCR0 += UART_TBIT;                                // One bit time till first bit
+  txData = byte;                                       // Load transmit data, e.g. 'A'=01000001
+  txData |= 0x100;                                     // Add mark stop bit, e.g. 101000001
+  txData <<= 1;                                        // Add space start bit, e.g. 1010000010
+  TA0CCTL0 = OUTMOD0 + CCIE;                           // Set TXD on, enable counter interrupt
+}
+
+void TimerA_UART_print(char *string) {                 // Prints a string using the Timer_A UART
+
+  while (*string)
+    TimerA_UART_tx(*string++);
+}
+

BIN
serial_test/main.elf


BIN
serial_test/main.o


+ 19 - 0
shift_register/Makefile

@@ -0,0 +1,19 @@
+CC=msp430-gcc
+CFLAGS=-Os -Wall -g -mmcu=msp430g2553
+
+OBJS=main.o
+  
+   
+all: $(OBJS)
+	$(CC) $(CFLAGS) -o main.elf $(OBJS)
+	 
+%.o: %.c
+	$(CC) $(CFLAGS) -c $<
+	 
+clean:
+	rm -fr main.elf $(OBJS)
+	 
+upload:
+	mspdebug rf2500 "prog main.elf"
+
+

+ 86 - 0
shift_register/main.c

@@ -0,0 +1,86 @@
+#include <msp430g2553.h>
+
+#define DATA BIT0 //DS 1.0
+#define CLOCK BIT4 // SH_CP 1.4
+#define LATCH BIT5 // ST_CP 1.5
+#define ENABLE BIT6 // OE 1.6
+#define BUTTON BIT3 // BP 1.3
+
+//Declaration des prototypes de fonctions
+void delay(unsigned int ms);
+void enable(void);
+void shiftOut(unsigned char val);
+void pinWrite(unsigned int bit, unsigned char val);
+void pulseClock(void);
+
+
+void main(void) {
+	WDTCTL = WDTPW + WDTHOLD;			//stop watchdog
+	P1DIR |= (DATA + CLOCK + LATCH + ENABLE);	//mise en sortie
+	
+	P1IE |= BUTTON;			//generer les interruption pour 1.3
+	P1SEL &= ~BUTTON;		//selection du BUTTON
+	P1DIR &= ~BUTTON;		//passage en mode input
+	P1REN |= BUTTON;		//activer res pull-up
+
+	_BIS_SR(GIE);			// Enable interrupts
+
+	P1OUT &= ~ENABLE;		//activer le OE sur shift
+	int i;
+	for(;;) {
+
+		for(i=0; i<8; i++) {
+			shiftOut(1 << i);
+			delay(50);
+		}
+	
+		for(i=7; i>0; i--) {
+			shiftOut(1 << i);
+			delay(15);
+		}
+
+	}
+
+
+}
+
+void delay(unsigned int ms) {
+	while(ms--) {
+		__delay_cycles(1000);
+	}
+}
+
+void shiftOut(unsigned char val) {
+
+	P1OUT &= ~LATCH;
+
+	int i;
+
+	for(i=0; i<8; i++) {
+		pinWrite(DATA, (val & (1 << i)));
+		pulseClock();
+	}
+
+	P1OUT |= LATCH;
+	P1OUT &= ~LATCH;
+
+}
+
+void pinWrite(unsigned int bit, unsigned char val) {
+	if(val) P1OUT |= bit;
+	else P1OUT &= ~bit;
+}
+
+void pulseClock(void) {
+	P1OUT |= CLOCK;
+	P1OUT &= ~CLOCK;
+}
+
+
+#pragma vector=PORT1_VECTOR
+      __interrupt void Port_1(void) {
+
+      	P1IFG &= ~BUTTON;			// P1.3 Interrupt Flag cleared
+	P1OUT ^= ENABLE;
+}
+

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است