Skip to content

Commit

Permalink
Merge pull request #3 from saleae/alpha
Browse files Browse the repository at this point in the history
Merge alpha branch (Logic2) to master
  • Loading branch information
schmicro authored Sep 14, 2022
2 parents b1a3ad0 + 643f2cf commit a603400
Show file tree
Hide file tree
Showing 13 changed files with 1,683 additions and 1,466 deletions.
32 changes: 32 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Logic style
Language: Cpp
# manually added flags
FixNamespaceComments: 'false'
SortIncludes: 'false'


# flags copied from web editor, https://zed0.co.uk/clang-format-configurator/
AllowShortBlocksOnASingleLine: 'false'
AllowShortCaseLabelsOnASingleLine: 'false'
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: 'false'
AllowShortLoopsOnASingleLine: 'false'
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: 'true'
BreakBeforeBraces: Allman
ColumnLimit: '140'
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
ContinuationIndentWidth: '4'
Cpp11BracedListStyle: 'false'
IndentWidth: '4'
KeepEmptyLinesAtTheStartOfBlocks: 'false'
MaxEmptyLinesToKeep: '2'
NamespaceIndentation: All
PointerAlignment: Left
SpaceBeforeParens: Never
SpaceInEmptyParentheses: 'false'
SpacesInCStyleCastParentheses: 'true'
SpacesInParentheses: 'true'
SpacesInSquareBrackets: 'true'
TabWidth: '4'
UseTab: Never
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
cmake_minimum_required (VERSION 3.11)
project(one_wire_analyzer)

add_definitions( -DLOGIC2 )

# enable generation of compile_commands.json, helpful for IDEs to locate include files.
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# custom CMake Modules are located in the cmake directory.
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)

Expand Down
85 changes: 81 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Saleae 1-Wire Analyzer

Dependencies:
- XCode with command line tools
- CMake 3.11+
- CMake 3.13+

Installing command line tools after XCode is installed:
```
Expand Down Expand Up @@ -38,7 +38,7 @@ cmake --build .
### Ubuntu 16.04

Dependencies:
- CMake 3.11+
- CMake 3.13+
- gcc 4.8+

Misc dependencies:
Expand All @@ -59,7 +59,7 @@ cmake --build .

Dependencies:
- Visual Studio 2015 Update 3
- CMake 3.11+
- CMake 3.13+

**Visual Studio 2015**

Expand All @@ -78,8 +78,85 @@ https://cmake.org/download/
Building the analyzer:
```
mkdir build
cd build
cd build -A x64
cmake ..
```

Then, open the newly created solution file located here: `build\one_wire_analyzer.sln`


## Output Frame Format

### Frame Type: `"reset"`

| Property | Type | Description |
| :--- | :--- | :--- |


Reset pulse

### Frame Type: `"presence"`

| Property | Type | Description |
| :--- | :--- | :--- |


Presence Pulse

### Frame Type: `"rom_command"`

| Property | Type | Description |
| :--- | :--- | :--- |
| `description` | str | read, skip, search, or match |
| `rom_command` | bytes | The command byte |

ROM command. This is the first command issued by the master after a presence pulse

### Frame Type: `"crc"`

| Property | Type | Description |
| :--- | :--- | :--- |
| `crc` | bytes | The CRC byte |

8 bit CRC, last part of the 64 bit identifier

### Frame Type: `"family_code"`

| Property | Type | Description |
| :--- | :--- | :--- |
| `family` | bytes | The family code, which is the first part of the 64 bit identifier |

The family code of the device ID

### Frame Type: `"id"`

| Property | Type | Description |
| :--- | :--- | :--- |
| `id` | int | 48 bit integer, taken from the center of the 64 bit identifier |

The 48 bit device identifier

### Frame Type: `"data"`

| Property | Type | Description |
| :--- | :--- | :--- |
| `data` | bytes | A single data byte |

Data byte after the ROM command and identifier

### Frame Type: `"invalid_rom_command"`

| Property | Type | Description |
| :--- | :--- | :--- |
| `rom_command` | bytes | The ROM command byte |

Unknown ROM command

### Frame Type: `"alarm"`

| Property | Type | Description |
| :--- | :--- | :--- |
| `rom_command` | bytes | The command byte |

Alarm search command

8 changes: 5 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
CMAKE_ARGS: '-G "Visual Studio 15 Win64"'
BUILD_ARGS: '--config RelWithDebInfo'
linux:
imageName: 'ubuntu-16.04'
imageName: 'ubuntu-18.04'
CMAKE_ARGS: '-DCMAKE_BUILD_TYPE=RelWithDebInfo'
BUILD_ARGS: ''
mac:
Expand Down Expand Up @@ -76,13 +76,15 @@ jobs:
- build
displayName: 'deploy'
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-18.04'
steps:
- download: current
artifact: AnalyzerLibLinux
- download: current
artifact: AnalyzerLibWin
patterns: '*.dll'
patterns: |
*.dll
*.pdb
- download: current
artifact: AnalyzerLibMac
- script: |
Expand Down
2 changes: 1 addition & 1 deletion cmake/ExternalAnalyzerSDK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if(NOT TARGET Saleae::AnalyzerSDK)
FetchContent_Declare(
analyzersdk
GIT_REPOSITORY https://github.com/saleae/AnalyzerSDK.git
GIT_TAG master
GIT_TAG alpha
GIT_SHALLOW True
GIT_PROGRESS True
)
Expand Down
Loading

0 comments on commit a603400

Please sign in to comment.