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

22 Commits

Author SHA1 Message Date
Gunar Schorcht
9410ec705e drivers/mtd: replace checks by assert in mtd_dev_get
Assertions are used instead of returning a NULL pointer to detect errors in the MTD definition and access in the case that the return value is not evaluated.
2023-12-07 15:32:49 +01:00
Gunar Schorcht
ff79f39fd5 drivers/mtd: fix the order in the MTD pointer XFA
The commit fixes the order of entries in the MTD pointer XFA `mtd_dev_xfa` according to their index by using the index as the priority in the XFA.
2023-11-27 17:14:23 +01:00
Benjamin Valentin
396d3bbe2b drivers/mtd: introduce mtd_dev_get() 2023-11-10 19:53:48 +01:00
Karl Fessel
a36802f9c7 driver/mtd: mtd_init add documentation for return value 2023-11-01 10:56:13 +01:00
Gunar Schorcht
bd67236788 drivers/mtd: store MTD pointers as XFA 2023-10-02 12:27:35 +02:00
Gunar Schorcht
756197316d drivers/mtd: small fixes in doc 2023-04-11 17:42:10 +02:00
Benjamin Valentin
bede0615ad drivers/mtd: fix doc of mtd_read_page(), mtd_write_page_raw()
The function allows for offsets greater than the page size.
2022-06-20 14:59:41 +02:00
chrysn
9ec42492da mtd: Introduce write_size, setting no-rewrite policy
... with flags defining more clearly which kinds of overwrites are OK

Co-authored-by: benpicco <benpicco@googlemail.com>
2022-03-31 10:50:30 +02:00
chrysn
df9226fb80 mtd doc: Editorial fix 2022-03-31 10:50:30 +02:00
chrysn
b832bb1224 mtd doc: Add overview defining terms; link modules
Contributes-To: https://github.com/RIOT-OS/RIOT/issues/17663
2022-02-16 16:25:01 +01:00
Benjamin Valentin
70d9f2fb1a sys/vfs: move mtd_vfs_ops to vfs.h
This avoids a cyclic include of mtd.h
2022-01-24 13:53:21 +01:00
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
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
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
eeca0e3752 drivers/include: fix typos 2019-11-23 22:39:40 +01:00
Francois Berder
4a31f94cfc many typo fixes
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2019-11-23 22:39:07 +01:00
Vincent Dupont
7c8a3eae71 drivers/mtd: improve mtd API doc 2019-09-10 13:26:05 +02:00
94c753c07a drivers: doxygen cleanup 2017-09-01 15:12:20 +02:00
Martine Lenders
aeccb853a5 doc: fix doc hierarchy 2017-03-20 11:59:10 +01: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