winc

package
v0.0.0-...-515bbe0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: LGPL-2.1 Imports: 22 Imported by: 0

Documentation

Overview

certificates.go - A firmware uploader for the WiFi101 module. Copyright (c) 2015 Arduino LLC. All right reserved.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library 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 Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Index

Constants

This section is empty.

Variables

View Source
var START_PATTERN = []byte{0x01, 0xF1, 0x02, 0xF2, 0x03, 0xF3, 0x04, 0xF4, 0x05, 0xF5, 0x06, 0xF6, 0x07, 0xF7, 0x08, 0xF8}

Functions

func ConvertCertEntries

func ConvertCertEntries(entries []CertEntry) []byte

func ConvertCertificates

func ConvertCertificates(directory string, addresses []string) ([]byte, error)

func Run

func Run(ctx *context.Context) error

Types

type CertEntry

type CertEntry []byte

func EntryForAddress

func EntryForAddress(address string) (b CertEntry, err error)

func EntryForFile

func EntryForFile(file string) (b CertEntry, err error)

type Flasher

type Flasher struct {
	// contains filtered or unexported fields
}

func OpenFlasher

func OpenFlasher(portName string) (*Flasher, error)

func (*Flasher) Close

func (flasher *Flasher) Close() error

func (*Flasher) Erase

func (flasher *Flasher) Erase(address uint32, length uint32) error

Erase a block of flash memory

func (*Flasher) GetMaximumPayloadSize

func (flasher *Flasher) GetMaximumPayloadSize() (uint16, error)

Get maximum payload size for upload.

func (*Flasher) Hello

func (flasher *Flasher) Hello() error

Ping the programmer to see if it is alive. Also check if the version of the programmer protocol match the uploader

func (*Flasher) Read

func (flasher *Flasher) Read(address uint32, length uint32) ([]byte, error)

Read a block of flash memory

func (*Flasher) Write

func (flasher *Flasher) Write(address uint32, buffer []byte) error

Write a block of flash memory

type FlasherError

type FlasherError struct {
	// contains filtered or unexported fields
}

func (FlasherError) Error

func (e FlasherError) Error() string

Jump to

Keyboard shortcuts

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