Documentation ¶
Index ¶
- Constants
- type FOTA
- type Nrf51822
- func (m *Nrf51822) EnableCCCD(periph gatt.Peripheral) error
- func (m *Nrf51822) ExtractFirmware(filePath, bin, dat string) error
- func (m *Nrf51822) OnPeriphDisconnected(periph gatt.Peripheral, err error)
- func (m *Nrf51822) OnPeriphDiscovered(periph gatt.Peripheral, adv *gatt.Advertisement, rssi int)
- func (m *Nrf51822) ProcessRequest(f func(gatt.Peripheral, error)) error
- func (m *Nrf51822) UpdateOnPeriphConnected(periph gatt.Peripheral, err error)
- func (m *Nrf51822) WriteDFUControlPoint(periph gatt.Peripheral, value []byte, noRsp bool) error
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 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 (*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 ¶
Click to show internal directories.
Click to hide internal directories.