1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

12 Commits

Author SHA1 Message Date
Benjamin Valentin
e8bbe1d1c7 mtd: re-add mtd_write_page()
Add a write_page() command that performs a read-modify-write cycle
if necessary.
2021-01-28 11:51:28 +01:00
Benjamin Valentin
60eb75da3c mtd: rename mtd_write_page() -> mtd_write_page_raw()
The function will not abstract away the behavior of the underlying media
(e.g. whether only 1 -> 0 writes are possible without erase), thus rename it.
2021-01-26 11:48:26 +01:00
Leandro Lanzieri
8abd8bc3d4
drivers/mtd: add module to Kconfig 2020-11-18 18:38:49 +01:00
Benjamin Valentin
90751bcec1 mtd: fix return in mtd_erase()
If `.erase` is implemented we must return, not execute the
fallback code path

fixes #14988
2020-09-09 19:38:40 +02:00
Benjamin Valentin
9a4141880c mtd: allow to use non-pagewise functions
If the underlying driver implements 'plain' read/write/erase
fucntions, don't convert them to pagewise functions and back.

Just use the old direct functions.
2020-09-02 22:50:24 +02:00
Benjamin Valentin
4034f96169 mtd: add page addressed operations
Currently read(), write() and erase() all use 32 bit addressing.
This is a problem when writing to media > 4 GiB, e.g. SD cards.

The current implementation would wrap around after 4 GiB and corrupt data.

To avoid this, add functions to the MTD subsystem that allow for page-wise
addressing. This is how most of the underling storage drivers and the
file-systems above work anyway.

In the future we should then deprecate the 32-bit functions if all drivers
are converted.
2020-08-18 17:25:39 +02:00
304bce3724
drivers: configure per driver dependency resolution 2020-07-20 14:32:16 +02:00
fabian18
a3a1c160ee mtd: Change API to return 0 on success
Returning the number of bytes written/read could return a negative integer
because a uint32_t is expected for the length in read()/write() operations.
2020-05-06 20:24:27 +02:00
94c753c07a drivers: doxygen cleanup 2017-09-01 15:12:20 +02:00
8d74212afa drivers/mtd: constify where possible 2017-06-29 22:46:16 +02:00
Joakim Nohlgård
6d3304f52c mtd: Add MTD VFS wrapper for use with DevFS 2017-03-16 16:45:49 +01:00
Aurelien Gonce
49ebf55b0d mtd: add a low level generic driver for flash file system 2017-03-16 11:23:53 +01:00