radio_tool 0.2.1
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
radio_tool::dfu::DFU Class Reference
Inheritance diagram for radio_tool::dfu::DFU:
Inheritance graph
Collaboration diagram for radio_tool::dfu::DFU:
Collaboration graph

Public Member Functions

 DFU (libusb_device_handle *device)
 
auto SetAddress (const uint32_t &) const -> void
 
auto Erase (const uint32_t &) const -> void
 
auto Download (const std::vector< uint8_t > &, const uint16_t &wValue=0) const -> void
 
auto Upload (const uint16_t &, const uint8_t &wValue=0) const -> std::vector< uint8_t >
 
auto Get () const -> std::vector< uint8_t >
 
auto ReadUnprotected () const -> void
 
auto GetState () const -> DFUState
 
auto GetStatus () const -> const DFUStatusReport
 
auto Abort () const -> void
 
auto Detach () const -> void
 

Protected Member Functions

auto CheckDevice () const -> void
 
auto InitDownload () const -> void
 
auto InitUpload () const -> void
 

Protected Attributes

const uint16_t timeout
 
libusb_device_handle * device
 

Detailed Description

Definition at line 231 of file dfu.hpp.

Constructor & Destructor Documentation

◆ DFU()

radio_tool::dfu::DFU::DFU ( libusb_device_handle *  device)
inline

Definition at line 234 of file dfu.hpp.

Member Function Documentation

◆ Abort()

auto DFU::Abort ( ) const -> void

Definition at line 131 of file dfu.cpp.

◆ CheckDevice()

auto DFU::CheckDevice ( ) const -> void
protected

Definition at line 151 of file dfu.cpp.

◆ Detach()

auto DFU::Detach ( ) const -> void

Definition at line 141 of file dfu.cpp.

◆ Download()

auto DFU::Download ( const std::vector< uint8_t > &  data,
const uint16_t &  wValue = 0 
) const -> void

Definition at line 51 of file dfu.cpp.

◆ Erase()

auto DFU::Erase ( const uint32_t &  addr) const -> void

Definition at line 39 of file dfu.cpp.

◆ GetState()

auto DFU::GetState ( ) const -> DFUState

Definition at line 96 of file dfu.cpp.

◆ GetStatus()

auto DFU::GetStatus ( ) const -> const DFUStatusReport

Definition at line 113 of file dfu.cpp.

◆ InitDownload()

auto DFU::InitDownload ( ) const -> void
protected

Ensures the state is DFU_IDLE or DFU_DNLOAD_IDLE

Definition at line 157 of file dfu.cpp.

◆ InitUpload()

auto DFU::InitUpload ( ) const -> void
protected

Ensures the state is DFU_IDLE or DFU_DPLOAD_IDLE

Definition at line 177 of file dfu.cpp.

Here is the caller graph for this function:

◆ SetAddress()

auto DFU::SetAddress ( const uint32_t &  addr) const -> void

Definition at line 27 of file dfu.cpp.

◆ Upload()

auto DFU::Upload ( const uint16_t &  size,
const uint8_t &  wValue = 0 
) const -> std::vector<uint8_t>

Definition at line 80 of file dfu.cpp.

Member Data Documentation

◆ device

libusb_device_handle* radio_tool::dfu::DFU::device
protected

Definition at line 256 of file dfu.hpp.

◆ timeout

const uint16_t radio_tool::dfu::DFU::timeout
protected

Definition at line 255 of file dfu.hpp.


The documentation for this class was generated from the following files: