SimpleOTA client v1.2.0
Shared core of the SimpleOTA Arduino and ESP-IDF clients
Loading...
Searching...
No Matches
sota_image.h
Go to the documentation of this file.
1
10#ifndef SOTA_IMAGE_H
11#define SOTA_IMAGE_H
12
13#include <stdbool.h>
14#include <stddef.h>
15#include <stdint.h>
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
26bool sota_image_begin(size_t expected, uint32_t *slot, uint32_t *running);
27
35bool sota_image_accepts(const uint8_t *head, size_t len);
36
38bool sota_image_write(const uint8_t *buf, size_t len);
39
42
46
47#ifdef __cplusplus
48}
49#endif
50
51#endif /* SOTA_IMAGE_H */
bool sota_image_write(const uint8_t *buf, size_t len)
Write the next bytes, in order.
bool sota_image_finish(void)
End the write and check the image is one the bootloader can start.
void sota_image_abort(void)
Give up the write.
bool sota_image_accepts(const uint8_t *head, size_t len)
Whether a download that starts with these len bytes can be an image for this device,...
bool sota_image_begin(size_t expected, uint32_t *slot, uint32_t *running)
Start writing the slot after the running one.