nrf51822

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Success            byte = 0x01
	Start                   = 0x01
	Initialise              = 0x02
	Receive                 = 0x03
	Validate                = 0x04
	Activate                = 0x05
	Restart                 = 0x06
	ReceivedSize            = 0x07
	RequestBlockRecipt      = 0x08
	Response                = 0x10
	BlockRecipt             = 0x11
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FOTA

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

type Nrf51822

type Nrf51822 struct {
	Log              *logrus.Logger
	LocalUUID        string
	Fota             FOTA
	ConnectedChannel chan bool
	RestartChannel   chan bool
	ErrChannel       chan error
}

Nrf51822 is a BLE SoC from Nordic https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF51822

func (*Nrf51822) EnableCCCD

func (m *Nrf51822) EnableCCCD(periph gatt.Peripheral) error

func (*Nrf51822) ExtractFirmware

func (m *Nrf51822) ExtractFirmware(filePath, bin, dat string) error

func (*Nrf51822) OnPeriphDisconnected

func (m *Nrf51822) OnPeriphDisconnected(periph gatt.Peripheral, err error)

func (*Nrf51822) OnPeriphDiscovered

func (m *Nrf51822) OnPeriphDiscovered(periph gatt.Peripheral, adv *gatt.Advertisement, rssi int)

func (*Nrf51822) ProcessRequest

func (m *Nrf51822) ProcessRequest(f func(gatt.Peripheral, error)) error

func (*Nrf51822) UpdateOnPeriphConnected

func (m *Nrf51822) UpdateOnPeriphConnected(periph gatt.Peripheral, err error)

func (*Nrf51822) WriteDFUControlPoint

func (m *Nrf51822) WriteDFUControlPoint(periph gatt.Peripheral, value []byte, noRsp bool) error

Jump to

Keyboard shortcuts

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