saleae

package module
v0.0.0-...-d649105 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2020 License: MIT Imports: 4 Imported by: 3

README

go-saleae : Go Library to interface with Saleae Protocol Analyzer

Overview GoDoc

Install

go get github.com/Georges760/go-saleae

Example

package main

import (
	"flag"
	"fmt"
	"github.com/Georges760/go-saleae"
	"log"
	"os"
)

func main() {
	// Check args
	pfile := flag.String("f", "", "CSV file from Saleae Decoded Protocol export")
	flag.Parse()
	if *pfile == "" {
		log.Fatal("-f arg is mandatory")
	}
	// Open CSV file
	recordFile, err := os.Open(*pfile)
	if err != nil {
		log.Fatal("Error opening CSV file:", err)
	}
	// Parse it
	spi, err := saleae.ParseCSV(recordFile)
	if err != nil {
		log.Fatal("Error parsing CSV file:", err)
	}
	// Print result
	fmt.Println(spi)
	// Exit
	os.Exit(0)
}

License

MIT.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SPIExchange

type SPIExchange struct {
	Second float64
	Mosi   uint8
	Miso   uint8
}

func ParseCSV

func ParseCSV(file io.Reader) (spi []SPIExchange, err error)

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL