nina

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: 23 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

This section is empty.

Functions

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) Md5sum

func (flasher *Flasher) Md5sum(data []byte) error

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