#include <DeviceBootloader.hpp>
Classes | |
struct | ApplicationInfo |
struct | Config |
struct | MemoryInfo |
Public Types | |
using | Memory = dai::bootloader::Memory |
using | NetworkConfig = dai::bootloader::NetworkConfig |
using | Section = dai::bootloader::Section |
using | Type = dai::bootloader::Type |
using | UsbConfig = dai::bootloader::UsbConfig |
using | Version = dai::Version |
Public Member Functions | |
void | bootMemory (const std::vector< uint8_t > &fw) |
void | bootUsbRomBootloader () |
void | close () |
DeviceBootloader ()=delete | |
DeviceBootloader (const DeviceInfo &devInfo) | |
template<> | |
DeviceBootloader (const DeviceInfo &devInfo, bool allowFlashingBootloader) | |
DeviceBootloader (const DeviceInfo &devInfo, const dai::Path &pathToBootloader, bool allowFlashingBootloader=false) | |
template<typename T , std::enable_if_t< std::is_same< T, bool >::value, bool > = true> | |
DeviceBootloader (const DeviceInfo &devInfo, T allowFlashingBootloader) | |
DeviceBootloader (const DeviceInfo &devInfo, Type type, bool allowFlashingBootloader=false) | |
DeviceBootloader (std::string nameOrDeviceId, bool allowFlashingBootloader=false) | |
std::tuple< bool, std::string > | flash (const Pipeline &pipeline, bool compress=false, std::string applicationName="", Memory memory=Memory::AUTO, bool checkChecksum=false) |
std::tuple< bool, std::string > | flash (std::function< void(float)> progressCallback, const Pipeline &pipeline, bool compress=false, std::string applicationName="", Memory memory=Memory::AUTO, bool checkChecksum=false) |
std::tuple< bool, std::string > | flashBootHeader (Memory memory, int32_t frequency=-1, int64_t location=-1, int32_t dummyCycles=-1, int64_t offset=-1) |
std::tuple< bool, std::string > | flashBootloader (Memory memory, Type type, std::function< void(float)> progressCallback, const dai::Path &path={}) |
std::tuple< bool, std::string > | flashBootloader (std::function< void(float)> progressCallback, const dai::Path &path={}) |
std::tuple< bool, std::string > | flashClear (Memory memory=Memory::AUTO) |
std::tuple< bool, std::string > | flashConfig (const Config &config, Memory memory=Memory::AUTO, Type type=Type::AUTO) |
std::tuple< bool, std::string > | flashConfigClear (Memory memory=Memory::AUTO, Type type=Type::AUTO) |
std::tuple< bool, std::string > | flashConfigData (nlohmann::json configData, Memory memory=Memory::AUTO, Type type=Type::AUTO) |
std::tuple< bool, std::string > | flashConfigFile (const dai::Path &configPath, Memory memory=Memory::AUTO, Type type=Type::AUTO) |
std::tuple< bool, std::string > | flashCustom (Memory memory, size_t offset, const std::vector< uint8_t > &data, std::function< void(float)> progressCb=nullptr) |
std::tuple< bool, std::string > | flashCustom (Memory memory, size_t offset, const uint8_t *data, size_t size, std::function< void(float)> progressCb=nullptr) |
std::tuple< bool, std::string > | flashCustom (Memory memory, size_t offset, std::string filename, std::function< void(float)> progressCb=nullptr) |
std::tuple< bool, std::string > | flashDepthaiApplicationPackage (std::function< void(float)> progressCallback, std::vector< uint8_t > package, Memory memory=Memory::AUTO) |
std::tuple< bool, std::string > | flashDepthaiApplicationPackage (std::vector< uint8_t > package, Memory memory=Memory::AUTO) |
std::tuple< bool, std::string > | flashFastBootHeader (Memory memory, int32_t frequency=-1, int64_t location=-1, int32_t dummyCycles=-1, int64_t offset=-1) |
std::tuple< bool, std::string > | flashGpioModeBootHeader (Memory memory, int gpioMode) |
std::tuple< bool, std::string > | flashUsbRecoveryBootHeader (Memory memory) |
std::tuple< bool, std::string > | flashUserBootloader (std::function< void(float)> progressCallback, const dai::Path &path={}) |
tl::optional< Version > | getFlashedVersion () const |
MemoryInfo | getMemoryInfo (Memory memory) |
Type | getType () const |
Version | getVersion () const |
bool | isAllowedFlashingBootloader () const |
bool | isClosed () const |
bool | isEmbeddedVersion () const |
bool | isUserBootloader () |
bool | isUserBootloaderSupported () |
ApplicationInfo | readApplicationInfo (Memory memory) |
Config | readConfig (Memory memory=Memory::AUTO, Type type=Type::AUTO) |
nlohmann::json | readConfigData (Memory memory=Memory::AUTO, Type type=Type::AUTO) |
std::tuple< bool, std::string, std::vector< uint8_t > > | readCustom (Memory memory, size_t offset, size_t size, std::function< void(float)> progressCb=nullptr) |
std::tuple< bool, std::string > | readCustom (Memory memory, size_t offset, size_t size, std::string filename, std::function< void(float)> progressCb=nullptr) |
std::tuple< bool, std::string > | readCustom (Memory memory, size_t offset, size_t size, std::vector< uint8_t > &data, std::function< void(float)> progressCb=nullptr) |
std::tuple< bool, std::string > | readCustom (Memory memory, size_t offset, size_t size, uint8_t *data, std::function< void(float)> progressCb=nullptr) |
~DeviceBootloader () | |
Destroy the Device Bootloader object. More... | |
Static Public Member Functions | |
static std::vector< uint8_t > | createDepthaiApplicationPackage (const Pipeline &pipeline, bool compress, std::string applicationName="", bool checkChecksum=false) |
static std::vector< uint8_t > | createDepthaiApplicationPackage (const Pipeline &pipeline, const dai::Path &pathToCmd={}, bool compress=false, std::string applicationName="", bool checkChecksum=false) |
static std::vector< DeviceInfo > | getAllAvailableDevices () |
static std::vector< std::uint8_t > | getEmbeddedBootloaderBinary (Type type=DEFAULT_TYPE) |
static Version | getEmbeddedBootloaderVersion () |
static std::tuple< bool, DeviceInfo > | getFirstAvailableDevice () |
static void | saveDepthaiApplicationPackage (const dai::Path &path, const Pipeline &pipeline, bool compress, std::string applicationName="", bool checkChecksum=false) |
static void | saveDepthaiApplicationPackage (const dai::Path &path, const Pipeline &pipeline, const dai::Path &pathToCmd={}, bool compress=false, std::string applicationName="", bool checkChecksum=false) |
Static Public Attributes | |
static constexpr const Type | DEFAULT_TYPE {Type::USB} |
Default Bootloader type. More... | |
Private Member Functions | |
void | createWatchdog () |
void | destroyWatchdog () |
std::tuple< bool, std::string > | flashCustom (Memory memory, size_t offset, const uint8_t *data, size_t size, std::string filename, std::function< void(float)> progressCb) |
void | init (bool embeddedMvcmd, const dai::Path &pathToMvcmd, tl::optional< bootloader::Type > type, bool allowBlFlash) |
template<typename T > | |
bool | parseResponse (const std::vector< uint8_t > &data, T &response) |
std::tuple< bool, std::string > | readCustom (Memory memory, size_t offset, size_t size, uint8_t *data, std::string filename, std::function< void(float)> progressCb) |
template<typename T > | |
bool | receiveResponse (T &response) |
bool | receiveResponseData (std::vector< uint8_t > &data) |
template<typename T > | |
void | receiveResponseThrow (T &response) |
Version | requestVersion () |
template<typename T > | |
bool | sendRequest (const T &request) |
template<typename T > | |
void | sendRequestThrow (const T &request) |
Private Attributes | |
bool | allowFlashingBootloader = false |
Type | bootloaderType |
std::atomic< bool > | closed {false} |
std::shared_ptr< XLinkConnection > | connection |
DeviceInfo | deviceInfo = {} |
tl::optional< Version > | flashedVersion |
bool | isEmbedded = false |
std::chrono::steady_clock::time_point | lastWatchdogPingTime |
std::mutex | lastWatchdogPingTimeMtx |
std::thread | monitorThread |
std::unique_ptr< XLinkStream > | stream |
Version | version {0, 0, 2} |
std::atomic< bool > | watchdogRunning {true} |
std::thread | watchdogThread |
Represents the DepthAI bootloader with the methods to interact with it.
Definition at line 29 of file DeviceBootloader.hpp.
Definition at line 33 of file DeviceBootloader.hpp.
Definition at line 36 of file DeviceBootloader.hpp.
Definition at line 34 of file DeviceBootloader.hpp.
Definition at line 32 of file DeviceBootloader.hpp.
Definition at line 35 of file DeviceBootloader.hpp.
Definition at line 90 of file DeviceBootloader.hpp.
|
delete |
|
explicit |
Connects to or boots device in bootloader mode depending on devInfo state; flashing not allowed
devInfo | DeviceInfo of which to boot or connect to |
Definition at line 255 of file DeviceBootloader.cpp.
dai::DeviceBootloader::DeviceBootloader | ( | const DeviceInfo & | devInfo, |
T | allowFlashingBootloader | ||
) |
Connects to or boots device in bootloader mode depending on devInfo state.
devInfo | DeviceInfo of which to boot or connect to |
allowFlashingBootloader | (bool) Set to true to allow flashing the devices bootloader |
dai::DeviceBootloader::DeviceBootloader | ( | const DeviceInfo & | devInfo, |
Type | type, | ||
bool | allowFlashingBootloader = false |
||
) |
Connects to device in bootloader of specified type. Throws if it wasn't possible. This constructor will automatically boot into specified bootloader type if not already running
devInfo | DeviceInfo of which to boot or connect to |
type | Type of bootloader to boot/connect to. |
allowFlashingBootloader | Set to true to allow flashing the devices bootloader. Defaults to false |
Definition at line 264 of file DeviceBootloader.cpp.
dai::DeviceBootloader::DeviceBootloader | ( | const DeviceInfo & | devInfo, |
const dai::Path & | pathToBootloader, | ||
bool | allowFlashingBootloader = false |
||
) |
Connects to or boots device in bootloader mode depending on devInfo state with a custom bootloader firmware.
devInfo | DeviceInfo of which to boot or connect to |
pathToBootloader | Custom bootloader firmware to boot |
allowFlashingBootloader | Set to true to allow flashing the devices bootloader. Defaults to false |
Definition at line 268 of file DeviceBootloader.cpp.
dai::DeviceBootloader::DeviceBootloader | ( | std::string | nameOrDeviceId, |
bool | allowFlashingBootloader = false |
||
) |
Connects to device with specified name/device id
nameOrDeviceId | Creates DeviceInfo with nameOrDeviceId to connect to |
allowFlashingBootloader | Set to true to allow flashing the devices bootloader. Defaults to false |
Definition at line 272 of file DeviceBootloader.cpp.
dai::DeviceBootloader::~DeviceBootloader | ( | ) |
Destroy the Device Bootloader object.
Definition at line 591 of file DeviceBootloader.cpp.
dai::DeviceBootloader::DeviceBootloader | ( | const DeviceInfo & | devInfo, |
bool | allowFlashingBootloader | ||
) |
Definition at line 260 of file DeviceBootloader.cpp.
void dai::DeviceBootloader::bootMemory | ( | const std::vector< uint8_t > & | fw | ) |
Boots a custom FW in memory
fw |
A | runtime exception if there are any communication issues |
Definition at line 1364 of file DeviceBootloader.cpp.
void dai::DeviceBootloader::bootUsbRomBootloader | ( | ) |
Boots into integrated ROM bootloader in USB mode
A | runtime exception if there are any communication issues |
Definition at line 1384 of file DeviceBootloader.cpp.
void dai::DeviceBootloader::close | ( | ) |
Explicitly closes connection to device.
Definition at line 558 of file DeviceBootloader.cpp.
|
static |
Creates application package which can be flashed to depthai device.
pipeline | Pipeline from which to create the application package |
compress | Specifies if contents should be compressed |
applicationName | Name the application that is flashed |
Definition at line 234 of file DeviceBootloader.cpp.
|
static |
Creates application package which can be flashed to depthai device.
pipeline | Pipeline from which to create the application package |
pathToCmd | Optional path to custom device firmware |
compress | Optional boolean which specifies if contents should be compressed |
applicationName | Optional name the application that is flashed |
Definition at line 72 of file DeviceBootloader.cpp.
|
private |
Definition at line 276 of file DeviceBootloader.cpp.
|
private |
Definition at line 349 of file DeviceBootloader.cpp.
std::tuple< bool, std::string > dai::DeviceBootloader::flash | ( | const Pipeline & | pipeline, |
bool | compress = false , |
||
std::string | applicationName = "" , |
||
Memory | memory = Memory::AUTO , |
||
bool | checkChecksum = false |
||
) |
Flashes a given pipeline to the device.
pipeline | Pipeline to flash to the board |
compress | Compresses application to reduce needed memory size |
applicationName | Optional name the application that is flashed |
Definition at line 651 of file DeviceBootloader.cpp.
std::tuple< bool, std::string > dai::DeviceBootloader::flash | ( | std::function< void(float)> | progressCallback, |
const Pipeline & | pipeline, | ||
bool | compress = false , |
||
std::string | applicationName = "" , |
||
Memory | memory = Memory::AUTO , |
||
bool | checkChecksum = false |
||
) |
Flashes a given pipeline to the device.
progressCallback | Callback that sends back a value between 0..1 which signifies current flashing progress |
pipeline | Pipeline to flash to the board |
compress | Compresses application to reduce needed memory size |
applicationName | Name the application that is flashed |
Definition at line 646 of file DeviceBootloader.cpp.
std::tuple< bool, std::string > dai::DeviceBootloader::flashBootHeader | ( | Memory | memory, |
int32_t | frequency = -1 , |
||
int64_t | location = -1 , |
||
int32_t | dummyCycles = -1 , |
||
int64_t | offset = -1 |
||
) |
Flash optimized boot header
memory | Which memory to flasht the header to |
frequency | SPI specific parameter, frequency in MHz |
location | Target location the header should boot to. Default to location of bootloader |
dummyCycles | SPI specific parameter |
offset | Offset in memory to flash the header to. Defaults to offset of boot header |
Definition at line 1072 of file DeviceBootloader.cpp.
std::tuple< bool, std::string > dai::DeviceBootloader::flashBootloader | ( | Memory | memory, |
Type | type, | ||
std::function< void(float)> | progressCallback, | ||
const dai::Path & | path = {} |
||
) |
Flash selected bootloader to the current board
memory | Memory to flash |
type | Bootloader type to flash |
progressCallback | Callback that sends back a value between 0..1 which signifies current flashing progress |
path | Optional parameter to custom bootloader to flash |
Definition at line 858 of file DeviceBootloader.cpp.
std::tuple< bool, std::string > dai::DeviceBootloader::flashBootloader | ( | std::function< void(float)> | progressCallback, |
const dai::Path & | path = {} |
||
) |
Flashes bootloader to the current board
progressCallback | Callback that sends back a value between 0..1 which signifies current flashing progress |
path | Optional parameter to custom bootloader to flash |
Definition at line 854 of file DeviceBootloader.cpp.
std::tuple< bool, std::string > dai::DeviceBootloader::flashClear | ( | Memory | memory = Memory::AUTO | ) |
Clears flashed application on the device, by removing SBR boot structure Doesn't remove fast boot header capability to still boot the application
Definition at line 846 of file DeviceBootloader.cpp.
std::tuple< bool, std::string > dai::DeviceBootloader::flashConfig | ( | const Config & | config, |
Memory | memory = Memory::AUTO , |
||
Type | type = Type::AUTO |
||
) |
Flashes configuration to bootloader
configData | Configuration structure |
memory | Optional - to which memory flash configuration |
type | Optional - for which type of bootloader to flash configuration |
Definition at line 1359 of file DeviceBootloader.cpp.
std::tuple< bool, std::string > dai::DeviceBootloader::flashConfigClear | ( | Memory | memory = Memory::AUTO , |
Type | type = Type::AUTO |
||
) |
Clears configuration data
memory | Optional - on which memory to clear configuration data |
type | Optional - for which type of bootloader to clear configuration data |
Definition at line 1290 of file DeviceBootloader.cpp.
std::tuple< bool, std::string > dai::DeviceBootloader::flashConfigData | ( | nlohmann::json | configData, |
Memory | memory = Memory::AUTO , |
||
Type | type = Type::AUTO |
||
) |
Flashes configuration data to bootloader
configData | Unstructured configuration data |
memory | Optional - to which memory flash configuration |
type | Optional - for which type of bootloader to flash configuration |
Definition at line 1315 of file DeviceBootloader.cpp.
std::tuple< bool, std::string > dai::DeviceBootloader::flashConfigFile | ( | const dai::Path & | configPath, |
Memory | memory = Memory::AUTO , |
||
Type | type = Type::AUTO |
||
) |
Flashes configuration data to bootloader
configPath | Unstructured configuration data |
memory | Optional - to which memory flash configuration |
type | Optional - for which type of bootloader to flash configuration |
Definition at line 1345 of file DeviceBootloader.cpp.
std::tuple< bool, std::string > dai::DeviceBootloader::flashCustom | ( | Memory | memory, |
size_t | offset, | ||
const std::vector< uint8_t > & | data, | ||
std::function< void(float)> | progressCb = nullptr |
||
) |
Flash arbitrary data at custom offset in specified memory
memory | Memory to flash |
offset | Offset at which to flash the given data in bytes |
progressCallback | Callback that sends back a value between 0..1 which signifies current flashing progress |
data | Data to flash |
Definition at line 1112 of file DeviceBootloader.cpp.
std::tuple< bool, std::string > dai::DeviceBootloader::flashCustom | ( | Memory | memory, |
size_t | offset, | ||
const uint8_t * | data, | ||
size_t | size, | ||
std::function< void(float)> | progressCb = nullptr |
||
) |
Definition at line 1121 of file DeviceBootloader.cpp.
|
private |
Definition at line 1131 of file DeviceBootloader.cpp.
std::tuple< bool, std::string > dai::DeviceBootloader::flashCustom | ( | Memory | memory, |
size_t | offset, | ||
std::string | filename, | ||
std::function< void(float)> | progressCb = nullptr |
||
) |
Definition at line 1128 of file DeviceBootloader.cpp.
std::tuple< bool, std::string > dai::DeviceBootloader::flashDepthaiApplicationPackage | ( | std::function< void(float)> | progressCallback, |
std::vector< uint8_t > | package, | ||
Memory | memory = Memory::AUTO |
||
) |
Flashes a specific depthai application package that was generated using createDepthaiApplicationPackage or saveDepthaiApplicationPackage
progressCallback | Callback that sends back a value between 0..1 which signifies current flashing progress |
package | Depthai application package to flash to the board |
Definition at line 746 of file DeviceBootloader.cpp.
std::tuple< bool, std::string > dai::DeviceBootloader::flashDepthaiApplicationPackage | ( | std::vector< uint8_t > | package, |
Memory | memory = Memory::AUTO |
||
) |
Flashes a specific depthai application package that was generated using createDepthaiApplicationPackage or saveDepthaiApplicationPackage
package | Depthai application package to flash to the board |
Definition at line 842 of file DeviceBootloader.cpp.
std::tuple< bool, std::string > dai::DeviceBootloader::flashFastBootHeader | ( | Memory | memory, |
int32_t | frequency = -1 , |
||
int64_t | location = -1 , |
||
int32_t | dummyCycles = -1 , |
||
int64_t | offset = -1 |
||
) |
Flash fast boot header. Application must already be present in flash, or location must be specified manually. Note - Can soft brick your device if firmware location changes.
memory | Which memory to flash the header to |
frequency | SPI specific parameter, frequency in MHz |
location | Target location the header should boot to. Default to location of bootloader |
dummyCycles | SPI specific parameter |
offset | Offset in memory to flash the header to. Defaults to offset of boot header |
Definition at line 1092 of file DeviceBootloader.cpp.
std::tuple< bool, std::string > dai::DeviceBootloader::flashGpioModeBootHeader | ( | Memory | memory, |
int | gpioMode | ||
) |
Flash boot header which boots same as equivalent GPIO mode would
gpioMode | GPIO mode equivalent |
Definition at line 1043 of file DeviceBootloader.cpp.
std::tuple< bool, std::string > dai::DeviceBootloader::flashUsbRecoveryBootHeader | ( | Memory | memory | ) |
Flash USB recovery boot header. Switches to USB ROM Bootloader
memory | Which memory to flash the header to |
Definition at line 1058 of file DeviceBootloader.cpp.
std::tuple< bool, std::string > dai::DeviceBootloader::flashUserBootloader | ( | std::function< void(float)> | progressCallback, |
const dai::Path & | path = {} |
||
) |
Flashes user bootloader to the current board. Available for NETWORK bootloader type
progressCallback | Callback that sends back a value between 0..1 which signifies current flashing progress |
path | Optional parameter to custom bootloader to flash |
Definition at line 940 of file DeviceBootloader.cpp.
|
static |
Searches for connected devices in either UNBOOTED or BOOTLOADER states.
Definition at line 63 of file DeviceBootloader.cpp.
|
static |
Definition at line 1402 of file DeviceBootloader.cpp.
|
static |
Definition at line 595 of file DeviceBootloader.cpp.
|
static |
Searches for connected devices in either UNBOOTED or BOOTLOADER states and returns first available.
Definition at line 48 of file DeviceBootloader.cpp.
tl::optional< DeviceBootloader::Version > dai::DeviceBootloader::getFlashedVersion | ( | ) | const |
Definition at line 603 of file DeviceBootloader.cpp.
DeviceBootloader::MemoryInfo dai::DeviceBootloader::getMemoryInfo | ( | Memory | memory | ) |
Retrieves information about specified memory
memory | Specifies which memory to query |
Definition at line 688 of file DeviceBootloader.cpp.
DeviceBootloader::Type dai::DeviceBootloader::getType | ( | ) | const |
Definition at line 638 of file DeviceBootloader.cpp.
DeviceBootloader::Version dai::DeviceBootloader::getVersion | ( | ) | const |
Definition at line 599 of file DeviceBootloader.cpp.
|
private |
Definition at line 357 of file DeviceBootloader.cpp.
bool dai::DeviceBootloader::isAllowedFlashingBootloader | ( | ) | const |
Definition at line 642 of file DeviceBootloader.cpp.
bool dai::DeviceBootloader::isClosed | ( | ) | const |
Is the device already closed (or disconnected)
Definition at line 587 of file DeviceBootloader.cpp.
bool dai::DeviceBootloader::isEmbeddedVersion | ( | ) | const |
Definition at line 1398 of file DeviceBootloader.cpp.
bool dai::DeviceBootloader::isUserBootloader | ( | ) |
Retrieves whether current bootloader is User Bootloader (B out of A/B configuration)
Definition at line 729 of file DeviceBootloader.cpp.
bool dai::DeviceBootloader::isUserBootloaderSupported | ( | ) |
Checks whether User Bootloader is supported with current bootloader
Definition at line 711 of file DeviceBootloader.cpp.
|
private |
Definition at line 1450 of file DeviceBootloader.cpp.
DeviceBootloader::ApplicationInfo dai::DeviceBootloader::readApplicationInfo | ( | Memory | memory | ) |
Reads information about flashed application in specified memory from device
memory | Specifies which memory to query |
Definition at line 655 of file DeviceBootloader.cpp.
DeviceBootloader::Config dai::DeviceBootloader::readConfig | ( | Memory | memory = Memory::AUTO , |
Type | type = Type::AUTO |
||
) |
Reads configuration from bootloader
memory | Optional - from which memory to read configuration |
type | Optional - from which type of bootloader to read configuration |
Definition at line 1354 of file DeviceBootloader.cpp.
nlohmann::json dai::DeviceBootloader::readConfigData | ( | Memory | memory = Memory::AUTO , |
Type | type = Type::AUTO |
||
) |
Reads configuration data from bootloader
memory | Optional - from which memory to read configuration data |
type | Optional - from which type of bootloader to read configuration data |
Definition at line 1260 of file DeviceBootloader.cpp.
std::tuple< bool, std::string, std::vector< uint8_t > > dai::DeviceBootloader::readCustom | ( | Memory | memory, |
size_t | offset, | ||
size_t | size, | ||
std::function< void(float)> | progressCb = nullptr |
||
) |
Definition at line 1205 of file DeviceBootloader.cpp.
std::tuple< bool, std::string > dai::DeviceBootloader::readCustom | ( | Memory | memory, |
size_t | offset, | ||
size_t | size, | ||
std::string | filename, | ||
std::function< void(float)> | progressCb = nullptr |
||
) |
Definition at line 1201 of file DeviceBootloader.cpp.
std::tuple< bool, std::string > dai::DeviceBootloader::readCustom | ( | Memory | memory, |
size_t | offset, | ||
size_t | size, | ||
std::vector< uint8_t > & | data, | ||
std::function< void(float)> | progressCb = nullptr |
||
) |
Reads arbitrary data at custom offset in specified memory
memory | Memory to read |
offset | Offset at which to read the specified bytes |
size | Number of bytes to read |
data | Data to read to. Must be at least 'size' number of bytes big |
progressCallback | Callback that sends back a value between 0..1 which signifies current reading progress |
Definition at line 1190 of file DeviceBootloader.cpp.
std::tuple< bool, std::string > dai::DeviceBootloader::readCustom | ( | Memory | memory, |
size_t | offset, | ||
size_t | size, | ||
uint8_t * | data, | ||
std::function< void(float)> | progressCb = nullptr |
||
) |
Definition at line 1198 of file DeviceBootloader.cpp.
|
private |
Definition at line 1214 of file DeviceBootloader.cpp.
|
private |
Definition at line 1464 of file DeviceBootloader.cpp.
|
private |
Definition at line 1442 of file DeviceBootloader.cpp.
|
private |
Definition at line 1477 of file DeviceBootloader.cpp.
|
private |
Definition at line 607 of file DeviceBootloader.cpp.
|
static |
Saves application package to a file which can be flashed to depthai device.
path | Path where to save the application package |
pipeline | Pipeline from which to create the application package |
compress | Specifies if contents should be compressed |
applicationName | Optional name the application that is flashed |
Definition at line 248 of file DeviceBootloader.cpp.
|
static |
Saves application package to a file which can be flashed to depthai device.
path | Path where to save the application package |
pipeline | Pipeline from which to create the application package |
pathToCmd | Optional path to custom device firmware |
compress | Optional boolean which specifies if contents should be compressed |
applicationName | Optional name the application that is flashed |
Definition at line 241 of file DeviceBootloader.cpp.
|
private |
Definition at line 1407 of file DeviceBootloader.cpp.
|
private |
Definition at line 1426 of file DeviceBootloader.cpp.
|
private |
Definition at line 531 of file DeviceBootloader.hpp.
|
private |
Definition at line 512 of file DeviceBootloader.hpp.
|
private |
Definition at line 516 of file DeviceBootloader.hpp.
|
private |
Definition at line 508 of file DeviceBootloader.hpp.
|
staticconstexpr |
Default Bootloader type.
Definition at line 108 of file DeviceBootloader.hpp.
|
private |
Definition at line 509 of file DeviceBootloader.hpp.
|
private |
Definition at line 513 of file DeviceBootloader.hpp.
|
private |
Definition at line 511 of file DeviceBootloader.hpp.
|
private |
Definition at line 525 of file DeviceBootloader.hpp.
|
private |
Definition at line 524 of file DeviceBootloader.hpp.
|
private |
Definition at line 523 of file DeviceBootloader.hpp.
|
private |
Definition at line 528 of file DeviceBootloader.hpp.
|
private |
Definition at line 534 of file DeviceBootloader.hpp.
|
private |
Definition at line 520 of file DeviceBootloader.hpp.
|
private |
Definition at line 519 of file DeviceBootloader.hpp.