From a7ae407b6cf583113d5092026f42da59139b6815 Mon Sep 17 00:00:00 2001 From: Youen Toupin Date: Sat, 11 Apr 2015 20:28:53 +0200 Subject: [PATCH] - removed the OWSlave library (that just doesn't work, at least on Arduino Uno when talking to a DS9490 master) - added debugging tools (oscilloscope and debug messages through serial port ; work in progress) - empty C# application for displaying debug data (work in progress) --- .gitattributes | 63 +++ .gitignore | 189 +++++++++ OWSlave.cpp | 382 ------------------ OWSlave.h | 64 --- OneWireIO.ino | 100 +++-- SerialChannel.cpp | 29 ++ SerialChannel.h | 21 + SerialMonitor/SerialMonitor.sln | 22 + SerialMonitor/SerialMonitor/App.config | 6 + SerialMonitor/SerialMonitor/App.xaml | 8 + SerialMonitor/SerialMonitor/App.xaml.cs | 17 + SerialMonitor/SerialMonitor/MainWindow.xaml | 8 + .../SerialMonitor/MainWindow.xaml.cs | 28 ++ .../SerialMonitor/Properties/AssemblyInfo.cs | 55 +++ .../Properties/Resources.Designer.cs | 71 ++++ .../SerialMonitor/Properties/Resources.resx | 117 ++++++ .../Properties/Settings.Designer.cs | 30 ++ .../Properties/Settings.settings | 7 + .../SerialMonitor/SerialMonitor.csproj | 104 +++++ 19 files changed, 841 insertions(+), 480 deletions(-) create mode 100644 .gitattributes create mode 100644 .gitignore delete mode 100644 OWSlave.cpp delete mode 100644 OWSlave.h create mode 100644 SerialChannel.cpp create mode 100644 SerialChannel.h create mode 100644 SerialMonitor/SerialMonitor.sln create mode 100644 SerialMonitor/SerialMonitor/App.config create mode 100644 SerialMonitor/SerialMonitor/App.xaml create mode 100644 SerialMonitor/SerialMonitor/App.xaml.cs create mode 100644 SerialMonitor/SerialMonitor/MainWindow.xaml create mode 100644 SerialMonitor/SerialMonitor/MainWindow.xaml.cs create mode 100644 SerialMonitor/SerialMonitor/Properties/AssemblyInfo.cs create mode 100644 SerialMonitor/SerialMonitor/Properties/Resources.Designer.cs create mode 100644 SerialMonitor/SerialMonitor/Properties/Resources.resx create mode 100644 SerialMonitor/SerialMonitor/Properties/Settings.Designer.cs create mode 100644 SerialMonitor/SerialMonitor/Properties/Settings.settings create mode 100644 SerialMonitor/SerialMonitor/SerialMonitor.csproj diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7964536 --- /dev/null +++ b/.gitignore @@ -0,0 +1,189 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +x64/ +build/ +bld/ +[Bb]in/ +[Oo]bj/ + +# Roslyn cache directories +*.ide/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +#NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding addin-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +## TODO: Comment the next line if you want to checkin your +## web deploy settings but do note that will include unencrypted +## passwords +#*.pubxml + +# NuGet Packages Directory +packages/* +## TODO: If the tool you use requires repositories.config +## uncomment the next line +#!packages/repositories.config + +# Enable "build/" folder in the NuGet Packages folder since +# NuGet packages use it for MSBuild targets. +# This line needs to be after the ignore of the build folder +# (and the packages folder if the line above has been uncommented) +!packages/build/ + +# Windows Azure Build Output +csx/ +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# LightSwitch generated files +GeneratedArtifacts/ +_Pvt_Extensions/ +ModelManifest.xml \ No newline at end of file diff --git a/OWSlave.cpp b/OWSlave.cpp deleted file mode 100644 index c498aa5..0000000 --- a/OWSlave.cpp +++ /dev/null @@ -1,382 +0,0 @@ -/* -OWSlave v1.0 by Alexander Gordeyev - -It is based on Jim's Studt OneWire library v2.0 - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Much of the code was inspired by Derek Yerger's code, though I don't -think much of that remains. In any event that was.. - (copyleft) 2006 by Derek Yerger - Free to distribute freely. - -The CRC code was excerpted and inspired by the Dallas Semiconductor -sample code bearing this copyright. -//--------------------------------------------------------------------------- -// Copyright (C) 2000 Dallas Semiconductor Corporation, All Rights Reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES -// OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -// OTHER DEALINGS IN THE SOFTWARE. -// -// Except as contained in this notice, the name of Dallas Semiconductor -// shall not be used except as stated in the Dallas Semiconductor -// Branding Policy. -//-------------------------------------------------------------------------- -*/ - -#include "OWSlave.h" -#include "pins_arduino.h" - -extern "C" { -// #include "WConstants.h" -#include -#include -#include -} - -#define DIRECT_READ(base, mask) (((*(base)) & (mask)) ? 1 : 0) -#define DIRECT_MODE_INPUT(base, mask) ((*(base+1)) &= ~(mask)) -#define DIRECT_MODE_OUTPUT(base, mask) ((*(base+1)) |= (mask)) -#define DIRECT_WRITE_LOW(base, mask) ((*(base+2)) &= ~(mask)) -#define DIRECT_WRITE_HIGH(base, mask) ((*(base+2)) |= (mask)) - -#define TIMESLOT_WAIT_RETRY_COUNT microsecondsToClockCycles(120) / 10L - -OWSlave::OWSlave(uint8_t pin) { - pin_bitmask = digitalPinToBitMask(pin); - baseReg = portInputRegister(digitalPinToPort(pin)); -} - -void OWSlave::setRom(unsigned char rom[8]) { - for (int i=0; i<7; i++) - this->rom[i] = rom[i]; - this->rom[7] = crc8(this->rom, 7); -} - -void OWSlave::setRomnc(unsigned char rom[8]) { - for (int i=0; i<8; i++) - this->rom[i] = rom[i]; -} - -bool OWSlave::waitForRequest(bool ignore_errors) { - errno = ONEWIRE_NO_ERROR; - for (;;) { - if (!waitReset(0) ) - continue; - if (!presence() ) - continue; - if (recvAndProcessCmd() ) - return TRUE; - else if ((errno == ONEWIRE_NO_ERROR) || ignore_errors) - continue; - else - return FALSE; - } -} - -bool OWSlave::recvAndProcessCmd() { - char addr[8]; - - for (;;) { - switch (recv() ) { - case 0xF0: // SEARCH ROM - search(); - return FALSE; - case 0x33: // READ ROM - sendData(rom, 8); - if (errno != ONEWIRE_NO_ERROR) - return FALSE; - break; - case 0x55: // MATCH ROM - recvData(addr, 8); - if (errno != ONEWIRE_NO_ERROR) - return FALSE; - for (int i=0; i<8; i++) - if (rom[i] != addr[i]) - return FALSE; - return TRUE; - case 0xCC: // SKIP ROM - return TRUE; - default: // Unknown command - if (errno == ONEWIRE_NO_ERROR) - return FALSE; - else - return FALSE; - } - } -} - -bool OWSlave::search() { - uint8_t bitmask; - uint8_t bit_send, bit_recv; - - for (int i=0; i<8; i++) { - for (bitmask = 0x01; bitmask; bitmask <<= 1) { - bit_send = (bitmask & rom[i])?1:0; - sendBit(bit_send); - sendBit(!bit_send); - bit_recv = recvBit(); - if (errno != ONEWIRE_NO_ERROR) - return FALSE; - if (bit_recv != bit_send) - return FALSE; - } - } - return TRUE; -} - -bool OWSlave::waitReset(uint16_t timeout_ms) { - uint8_t mask = pin_bitmask; - volatile uint8_t *reg asm("r30") = baseReg; - unsigned long time_stamp; - - errno = ONEWIRE_NO_ERROR; - cli(); - DIRECT_MODE_INPUT(reg, mask); - sei(); - if (timeout_ms != 0) { - time_stamp = micros() + timeout_ms*1000; - while (DIRECT_READ(reg, mask)) { - if (micros() > time_stamp) { - errno = ONEWIRE_WAIT_RESET_TIMEOUT; - return FALSE; - } - } - } else - while (DIRECT_READ(reg, mask)) {}; - time_stamp = micros() + 540; - while (DIRECT_READ(reg, mask) == 0) { - if (micros() > time_stamp) { - errno = ONEWIRE_VERY_LONG_RESET; - return FALSE; - } - } - if ((time_stamp - micros()) > 70) { - errno = ONEWIRE_VERY_SHORT_RESET; - return FALSE; - } - delayMicroseconds(30); - return TRUE; -} -bool OWSlave::waitReset() { - return waitReset(1000); -} - -bool OWSlave::presence(uint8_t delta) { - uint8_t mask = pin_bitmask; - volatile uint8_t *reg asm("r30") = baseReg; - - errno = ONEWIRE_NO_ERROR; - cli(); - DIRECT_WRITE_LOW(reg, mask); - DIRECT_MODE_OUTPUT(reg, mask); // drive output low - sei(); - delayMicroseconds(120); - cli(); - DIRECT_MODE_INPUT(reg, mask); // allow it to float - sei(); - delayMicroseconds(300 - delta); - if ( !DIRECT_READ(reg, mask)) { - errno = ONEWIRE_PRESENCE_LOW_ON_LINE; - return FALSE; - } else - return TRUE; -} -bool OWSlave::presence() { - return presence(25); -} - -uint8_t OWSlave::sendData(char buf[], uint8_t len) { - uint8_t bytes_sended = 0; - - for (int i=0; i>= 1; - if (mix) crc ^= 0x8C; - inbyte >>= 1; - } - } - return crc; -} -#endif - -#endif diff --git a/OWSlave.h b/OWSlave.h deleted file mode 100644 index f054858..0000000 --- a/OWSlave.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef iButton_h -#define iButton_h - -#if defined(ARDUINO) && ARDUINO >= 100 - #include "Arduino.h" -#else - #include "WProgram.h" -#endif - -#include - -// You can exclude CRC checks altogether by defining this to 0 -#ifndef OWSlave_CRC -#define OWSlave_CRC 1 -#endif - -// Select the table-lookup method of computing the 8-bit CRC -// by setting this to 1. The lookup table no longer consumes -// limited RAM, but enlarges total code size by about 250 bytes -#ifndef OWSlave_CRC8_TABLE -#define OWSlave_CRC8_TABLE 0 -#endif - -#define FALSE 0 -#define TRUE 1 - -#define ONEWIRE_NO_ERROR 0 -#define ONEWIRE_READ_TIMESLOT_TIMEOUT 1 -#define ONEWIRE_WRITE_TIMESLOT_TIMEOUT 2 -#define ONEWIRE_WAIT_RESET_TIMEOUT 3 -#define ONEWIRE_VERY_LONG_RESET 4 -#define ONEWIRE_VERY_SHORT_RESET 5 -#define ONEWIRE_PRESENCE_LOW_ON_LINE 6 - -class OWSlave { - private: - bool waitTimeSlot(); - uint8_t pin_bitmask; - volatile uint8_t *baseReg; - char rom[8]; - public: - bool recvAndProcessCmd(); - OWSlave(uint8_t pin); - void setRom(unsigned char rom[8]); - void setRomnc(unsigned char rom[8]); - bool waitForRequest(bool ignore_errors); - bool waitReset(uint16_t timeout_ms); - bool waitReset(); - bool presence(uint8_t delta); - bool presence(); - bool search(); - uint8_t sendData(char buf[], uint8_t data_len); - uint8_t recvData(char buf[], uint8_t data_len); - void send(uint8_t v); - uint8_t recv(void); - void sendBit(uint8_t v); - uint8_t recvBit(void); -#if OWSlave_CRC - static uint8_t crc8(char addr[], uint8_t len); -#endif - uint8_t errno; -}; - -#endif diff --git a/OneWireIO.ino b/OneWireIO.ino index 5f04bc0..fa2253e 100644 --- a/OneWireIO.ino +++ b/OneWireIO.ino @@ -1,15 +1,21 @@ -#include "OWSlave.h" +#include "Arduino.h" +#include "SerialChannel.h" #define LEDPin 13 #define OWPin 2 #define InterruptNumber 0 // Must correspond to the OWPin to correctly detect state changes. On Arduino Uno, interrupt 0 is for digital pin 2 -unsigned char rom[8] = {0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00}; +const int SkipSamples = 8; // how many samples we want to skip between two samples we keep (can be used to lower the sampling frequency) +const int BufferSize = 128; +byte buffer1[BufferSize]; +byte buffer2[BufferSize]; +byte* backBuffer = buffer1; +byte backBufferPos = 0; +byte samplesSkipped = SkipSamples; +unsigned long backBufferStartTime = micros(); -volatile long prevInt = 0; // Previous Interrupt micros -volatile boolean owReset = false; - -OWSlave oneWire(OWPin); +SerialChannel oscilloscope; +SerialChannel debug; void setup() { @@ -20,43 +26,69 @@ void setup() attachInterrupt(InterruptNumber,onewireInterrupt,CHANGE); - oneWire.setRom(rom); + cli();//disable interrupts + + //set up continuous sampling of analog pin 0 + //clear ADCSRA and ADCSRB registers + ADCSRA = 0; + ADCSRB = 0; + + ADMUX |= (1 << REFS0); //set reference voltage + ADMUX |= (1 << ADLAR); //left align the ADC value- so we can read highest 8 bits from ADCH register only + + ADCSRA |= (1 << ADPS2) | (1 << ADPS1) | (1 << ADPS0); //set ADC clock with 128 prescaler- 16mHz/128=125kHz ; 13 cycles for a conversion which means 9600 samples per second + ADCSRA |= (1 << ADATE); //enabble auto trigger + ADCSRA |= (1 << ADIE); //enable interrupts when measurement complete + ADCSRA |= (1 << ADEN); //enable ADC + ADCSRA |= (1 << ADSC); //start ADC measurements + + sei();//enable interrupts + + Serial.begin(9600); + oscilloscope.init("oscilloscope"); + debug.init("debug"); } void loop() { - if (owReset) owHandler(); + cli();//disable interrupts + byte* currentBuffer = backBuffer; + unsigned long currentBufferStartTime = backBufferStartTime; + byte currentBufferSize = backBufferPos; + backBuffer = (backBuffer == buffer1 ? buffer2 : buffer1); + backBufferPos = 0; + backBufferStartTime = micros(); + sei();//enable interrupts + + unsigned long now = micros(); + debug.write((byte*)&now, 4); + debug.write("Starting buffer transmission"); + + oscilloscope.write((byte*)¤tBufferStartTime, 4); + oscilloscope.write(currentBuffer, currentBufferSize); + + now = micros(); + debug.write((byte*)&now, 4); + debug.write("Buffer transmitted"); } -void owHandler(void) -{ - detachInterrupt(InterruptNumber); - owReset=false; - - if (oneWire.presence()) { - if (oneWire.recvAndProcessCmd()) { - uint8_t cmd = oneWire.recv(); - if (cmd == 0x44) { - digitalWrite(LEDPin, HIGH); - } - if (cmd == 0xBE) { - for( int i = 0; i < 9; i++) { - oneWire.send((byte)0); - } - } - } +ISR(ADC_vect) {//when new ADC value ready + byte sample = ADCH; //store 8 bit value from analog pin 0 + + if(samplesSkipped++ < SkipSamples) + return; + samplesSkipped = 0; + + backBuffer[backBufferPos++] = sample; + if(backBufferPos >= BufferSize) + { + // overflow of back buffer, we loose the current sample + backBufferPos = BufferSize - 1; } - attachInterrupt(InterruptNumber,onewireInterrupt,CHANGE); } void onewireInterrupt(void) { - volatile long lastMicros = micros() - prevInt; - prevInt = micros(); - if (lastMicros >= 410 && lastMicros <= 550) - { - // OneWire Reset Detected - owReset=true; - } + //digitalWrite(LEDPin, digitalRead(OWPin)); } - + diff --git a/SerialChannel.cpp b/SerialChannel.cpp new file mode 100644 index 0000000..64b57f5 --- /dev/null +++ b/SerialChannel.cpp @@ -0,0 +1,29 @@ +#include "Arduino.h" +#include "SerialChannel.h" + +short SerialChannel::nextId = 0; + +SerialChannel::SerialChannel() +{ +} + +void SerialChannel::init(const char* name) +{ + id = nextId++; + Serial.write((short)0); + Serial.write(id); + Serial.write(strlen(name)); + Serial.write(name); +} + +void SerialChannel::write(byte* data, short byteCount) +{ + Serial.write(byteCount); + Serial.write(id); + Serial.write(data, byteCount); +} + +void SerialChannel::write(const char* text) +{ + Serial.write((byte*)text, strlen(text)); +} diff --git a/SerialChannel.h b/SerialChannel.h new file mode 100644 index 0000000..3c66d7d --- /dev/null +++ b/SerialChannel.h @@ -0,0 +1,21 @@ +#ifndef _SerialChannel_h_ +#define _SerialChannel_h_ + +class SerialChannel +{ +private: + static short nextId; + short id; + +public: + SerialChannel(); + + void init(const char* name); + + void write(byte* data, short byteCount); + + void write(const char* text); +}; + +#endif + diff --git a/SerialMonitor/SerialMonitor.sln b/SerialMonitor/SerialMonitor.sln new file mode 100644 index 0000000..f11d68b --- /dev/null +++ b/SerialMonitor/SerialMonitor.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.31101.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SerialMonitor", "SerialMonitor\SerialMonitor.csproj", "{97704F53-6CA1-4155-9E8F-AEBFEEC20A8B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {97704F53-6CA1-4155-9E8F-AEBFEEC20A8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {97704F53-6CA1-4155-9E8F-AEBFEEC20A8B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {97704F53-6CA1-4155-9E8F-AEBFEEC20A8B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {97704F53-6CA1-4155-9E8F-AEBFEEC20A8B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/SerialMonitor/SerialMonitor/App.config b/SerialMonitor/SerialMonitor/App.config new file mode 100644 index 0000000..8e15646 --- /dev/null +++ b/SerialMonitor/SerialMonitor/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/SerialMonitor/SerialMonitor/App.xaml b/SerialMonitor/SerialMonitor/App.xaml new file mode 100644 index 0000000..cc3b030 --- /dev/null +++ b/SerialMonitor/SerialMonitor/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/SerialMonitor/SerialMonitor/App.xaml.cs b/SerialMonitor/SerialMonitor/App.xaml.cs new file mode 100644 index 0000000..0ea20d1 --- /dev/null +++ b/SerialMonitor/SerialMonitor/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace SerialMonitor +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/SerialMonitor/SerialMonitor/MainWindow.xaml b/SerialMonitor/SerialMonitor/MainWindow.xaml new file mode 100644 index 0000000..51b1a8f --- /dev/null +++ b/SerialMonitor/SerialMonitor/MainWindow.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/SerialMonitor/SerialMonitor/MainWindow.xaml.cs b/SerialMonitor/SerialMonitor/MainWindow.xaml.cs new file mode 100644 index 0000000..11f2c90 --- /dev/null +++ b/SerialMonitor/SerialMonitor/MainWindow.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace SerialMonitor +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + } +} diff --git a/SerialMonitor/SerialMonitor/Properties/AssemblyInfo.cs b/SerialMonitor/SerialMonitor/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..e61c9f3 --- /dev/null +++ b/SerialMonitor/SerialMonitor/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("SerialMonitor")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("SerialMonitor")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +//In order to begin building localizable applications, set +//CultureYouAreCodingWith in your .csproj file +//inside a . For example, if you are using US english +//in your source files, set the to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SerialMonitor/SerialMonitor/Properties/Resources.Designer.cs b/SerialMonitor/SerialMonitor/Properties/Resources.Designer.cs new file mode 100644 index 0000000..b6091de --- /dev/null +++ b/SerialMonitor/SerialMonitor/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace SerialMonitor.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SerialMonitor.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/SerialMonitor/SerialMonitor/Properties/Resources.resx b/SerialMonitor/SerialMonitor/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/SerialMonitor/SerialMonitor/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SerialMonitor/SerialMonitor/Properties/Settings.Designer.cs b/SerialMonitor/SerialMonitor/Properties/Settings.Designer.cs new file mode 100644 index 0000000..098d3a4 --- /dev/null +++ b/SerialMonitor/SerialMonitor/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace SerialMonitor.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/SerialMonitor/SerialMonitor/Properties/Settings.settings b/SerialMonitor/SerialMonitor/Properties/Settings.settings new file mode 100644 index 0000000..033d7a5 --- /dev/null +++ b/SerialMonitor/SerialMonitor/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/SerialMonitor/SerialMonitor/SerialMonitor.csproj b/SerialMonitor/SerialMonitor/SerialMonitor.csproj new file mode 100644 index 0000000..6cb916e --- /dev/null +++ b/SerialMonitor/SerialMonitor/SerialMonitor.csproj @@ -0,0 +1,104 @@ + + + + + Debug + AnyCPU + {97704F53-6CA1-4155-9E8F-AEBFEEC20A8B} + WinExe + Properties + SerialMonitor + SerialMonitor + v4.5 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + MainWindow.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + + \ No newline at end of file