mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-11-04 12:59:07 +01:00
Add bootloader extension
This commit is contained in:
committed by
Kyle Schwarz
parent
4db27aa187
commit
6ac041cadc
@@ -0,0 +1,42 @@
|
||||
#ifndef __BOOTLOADER_API_H_
|
||||
#define __BOOTLOADER_API_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include "icsneo/device/extensions/bootloader/chip.h"
|
||||
#include "icsneo/device/extensions/bootloader/parser/fwrepo.h"
|
||||
#include "icsneo/device/extensions/bootloader/parser/ief.h"
|
||||
#include "icsneo/device/device.h"
|
||||
|
||||
#include <string>
|
||||
#include <optional>
|
||||
|
||||
namespace icsneo {
|
||||
|
||||
namespace Bootloader {
|
||||
|
||||
using Logger = icsneo::Device::OpenStatusHandler;
|
||||
|
||||
bool requiresUpdate(icsneo::Device& device, const FWRepo& fw);
|
||||
bool update(
|
||||
icsneo::Device& device,
|
||||
const FWRepo& fw,
|
||||
Logger logger = [](icsneo::Device::OpenStatusType, const std::string&, std::optional<double>) { return icsneo::Device::OpenDirective::Continue; },
|
||||
bool alreadyInBootloader = false,
|
||||
bool forceFlash = false
|
||||
);
|
||||
|
||||
bool enterBootloader(icsneo::Device& device);
|
||||
bool exitBootloader(icsneo::Device& device, Logger logger, bool updatedChips);
|
||||
bool verifyConnection(icsneo::Device& device, Logger logger);
|
||||
|
||||
bool isSFPChip(const icsneo::Bootloader::Chip& chip);
|
||||
bool isSFPIEF(const icsneo::Bootloader::IEF& ief);
|
||||
|
||||
} // namespace Bootloader
|
||||
|
||||
} // namespace icsneo
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // __BOOTLOADER_API_H_
|
||||
Reference in New Issue
Block a user