Loading...
Searching...
No Matches
vcdiff_mtd.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2022 Juergen Fitschen
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
16
17#include "vcdiff.h"
18#include "mtd.h"
19
20#ifndef CONFIG_TINYVCDIFF_MTD_WRITE_SIZE
24#define CONFIG_TINYVCDIFF_MTD_WRITE_SIZE 4
25#endif
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
34extern const vcdiff_driver_t vcdiff_mtd_driver;
35
60
64#define VCDIFF_MTD_INIT(DEV) { .dev = DEV }
65
66#ifdef __cplusplus
67}
68#endif
69
MTD device descriptor.
Definition mtd.h:108
Context for the underlying MTD device.
Definition vcdiff_mtd.h:39
mtd_dev_t * dev
Instance of the backing MTD device.
Definition vcdiff_mtd.h:43
uint8_t write_buffer[CONFIG_TINYVCDIFF_MTD_WRITE_SIZE]
Buffer for aligned writes.
Definition vcdiff_mtd.h:53
size_t offset
Current offset on the MTD device.
Definition vcdiff_mtd.h:58
size_t next_erase_sector
Number of the next sector that must be erased.
Definition vcdiff_mtd.h:48
const vcdiff_driver_t vcdiff_mtd_driver
Driver for accessing MTD devices.
#define CONFIG_TINYVCDIFF_MTD_WRITE_SIZE
Alignment and minimum size for MTD write access.
Definition vcdiff_mtd.h:24