Documentation
¶
Overview ¶
Copyright (c) 2014-2019 Cesanta Software Limited All rights reserved
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) 2014-2019 Cesanta Software Limited All rights reserved
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) 2014-2019 Cesanta Software Limited All rights reserved
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) 2014-2019 Cesanta Software Limited All rights reserved
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) 2014-2019 Cesanta Software Limited All rights reserved
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func ConnectToFlasherClient(ct esp.ChipType, opts *esp.FlashOpts) (*cfResult, error)
- func Flash(ct esp.ChipType, fw *fwbundle.FirmwareBundle, opts *esp.FlashOpts) error
- func ReadFlash(ct esp.ChipType, addr uint32, length int, opts *esp.FlashOpts) ([]byte, error)
- func WriteFlash(ct esp.ChipType, addr uint32, data []byte, opts *esp.FlashOpts) error
- type FlasherClient
- func (fc *FlasherClient) BootFirmware() error
- func (fc *FlasherClient) Digest(addr, length, blockSize uint32) ([][]byte, error)
- func (fc *FlasherClient) Disconnect()
- func (fc *FlasherClient) EraseChip() error
- func (fc *FlasherClient) GetFlashChipID() (uint32, error)
- func (fc *FlasherClient) Read(addr uint32, data []byte) error
- func (fc *FlasherClient) ReadReg(addr uint32) (uint32, error)
- func (fc *FlasherClient) Sync() error
- func (fc *FlasherClient) Write(addr uint32, data []byte, erase bool, compress bool) (int, error)
- func (fc *FlasherClient) WriteReg(addr uint32, value uint32) error
Constants ¶
const ( FLASH_BLOCK_SIZE = 65536 FLASH_SECTOR_SIZE = 4096 // These consts should be in sync with stub_flasher.c BUF_SIZE = 4096 UART_BUF_SIZE = 4 * BUF_SIZE FLAG_EMPTY = uint8(1 << 0) FLAG_COMPRESSED = uint8(1 << 1) )
Variables ¶
This section is empty.
Functions ¶
func ConnectToFlasherClient ¶
Types ¶
type FlasherClient ¶
type FlasherClient struct {
// contains filtered or unexported fields
}
func NewFlasherClient ¶
func NewFlasherClient(ct esp.ChipType, rc *rom_client.ROMClient, romBaudRate uint, baudRate uint) (*FlasherClient, error)
func (*FlasherClient) BootFirmware ¶
func (fc *FlasherClient) BootFirmware() error
func (*FlasherClient) Digest ¶
func (fc *FlasherClient) Digest(addr, length, blockSize uint32) ([][]byte, error)
func (*FlasherClient) Disconnect ¶
func (fc *FlasherClient) Disconnect()
func (*FlasherClient) EraseChip ¶
func (fc *FlasherClient) EraseChip() error
func (*FlasherClient) GetFlashChipID ¶
func (fc *FlasherClient) GetFlashChipID() (uint32, error)
func (*FlasherClient) Sync ¶
func (fc *FlasherClient) Sync() error