Skip to content

Commit

Permalink
Merge pull request #13 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 9e6e160 + d1149e9 commit d322354
Show file tree
Hide file tree
Showing 13 changed files with 927 additions and 763 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(spi_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
45 changes: 41 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Saleae Serial Peripheral Interface (SPI) 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,45 @@ 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\spi_analyzer.sln`


## Output Frame Format

### Frame Type: `"enable"`

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


Indicates the enable (chip select) signal has transitioned from inactive to active, present when the enable channel is used

### Frame Type: `"disable"`

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


Indicates the enable signal has transitioned back to inactive, present when the enable channel is used

### Frame Type: `"result"`

| Property | Type | Description |
| :--- | :--- | :--- |
| `miso` | bytes | Master in slave out, width in bits is determined by settings |
| `mosi` | bytes | Master out slave in, width in bits is determined by settings |

A single word transaction, containing both MISO and MOSI

### Frame Type: `"error"`

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


Indicates that the clock was in the wrong state when the enable signal transitioned to active

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 d322354

Please sign in to comment.