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

21 Commits

Author SHA1 Message Date
Marian Buschsieweke
2b6f65a08a
build_system/xfa: change API to fix alignment
This changes the API of xfa from

    XFA(array_name, prio) type element_name = INITIALIZER;

to

    XFA(type, array_name, prio) element_name = INITIALIZER;

this allows forcing natural alignment of the type, fixing failing tests
on `native64`.
2024-11-07 16:30:01 +01:00
MrKevinWeiss
e0fdc3c16c
*Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
Benjamin Valentin
ba17c14aef drivers/mtd_sdcard: drop .write()
The old .write() function is only used as a fall-back if .write_page()
is not implemented.
We can drop it.
2023-12-13 16:50:41 +01:00
Gunar Schorcht
e5c541b77c drivers/mtd_sdcard: use XFA with MTD pointers 2023-10-02 12:28:07 +02:00
Benjamin Valentin
6f9dd8cf86 drivers/mtd_sdcard: add mtd_sdcard_default module 2023-02-05 19:03:09 +01:00
Marian Buschsieweke
86fdbd7054
core/lib: Add macros/utils.h header
The macros CONCAT(), MIN(), and MAX() are defined over and over again in
RIOT's code base. This de-duplicates the code by moving the macros to a
common place.
2023-01-07 09:47:44 +01:00
chrysn
47148642f9 drivers/mtd_{mci,sdcard}: Pages need to be written at once
See-Also: https://github.com/RIOT-OS/RIOT/pull/17683#issuecomment-1084245744
2022-03-31 10:58:52 +02:00
Benjamin Valentin
c3543b7a69 drivers/mtd_sdcard: drop printf()
Only print errors when debug is enabled.
2022-03-25 17:21:15 +01:00
Benjamin Valentin
91ca757b9a drivers/mtd_sdcard: implement erase_sector() 2022-02-07 11:40:27 +01:00
Benjamin Valentin
ac9de922c5 drivers/mtd_sdcard: support unaligned reads & writes 2022-02-07 11:36:07 +01:00
Francisco Molina
14ef09b8b4 drivers/mtd: fix Kconfig dependencies
Currently implementations of the MTD api are selecting the module,
this makes it easy for default backends to be selected. But the
correct modeling is simply selecting the MTD api and then selecting
a backend. BOARDs providing one of the backends can expose this and
then that backend can be selected by default.

There is also currently nothing preventing from using the MTD api
with no backend since a mock backend can easily be provided as is
done in all mtd tests.
2021-09-22 09:22:51 +02:00
Benjamin Valentin
c569d9a1d9 drivers: add MTD_DRIVER_FLAG_DIRECT_WRITE to mtd drivers
- EEPROMs don't need read-modify-write cylce
 - SD cards will handle read-modify-write internally
2021-01-28 11:51:28 +01:00
Leandro Lanzieri
b3df3cf931
drivers/mtd_sdcard: add module to Kconfig 2021-01-18 10:42:34 +01:00
Bas Stottelaar
92b1dfc703 drivers/*: realign ENABLE_DEBUG 2020-10-23 01:26:09 +02:00
Leandro Lanzieri
d25fc243c4
treewide: change prefix for generated Kconfig symbols.
This changes the prefixes of the symbols generated from USEMODULE and
USEPKG variables. The changes are as follow:

   KCONFIG_MODULE_ => KCONFIG_USEMODULE_
   KCONFIG_PKG_ => KCONFIG_USEPKG_
   MODULE_ => USEMODULE_
   PKG_ => USEPKG_
2020-08-31 09:37:09 +02:00
Benjamin Valentin
7d291b5707 drivers/mtd_sdard: implement page-wise read() and write()
SD cards are usually larger than 4 GiB, so using 32 bit addressing will
break once they are filled to a certain extend.

Implement read_page() and write_page() which at a page size of 512
should work for SD cards of up to 2 TiB.

The read() and write() functions will ignore any offset that is not aligned
with the page boundary, so do the same for the new functions, but at least
report an error.
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
Akshai M
9737db935d drivers/mtd_sdcard : Expose to kconfig
Expose Configurations to Kconfig
2020-05-04 22:12:13 +05:30
Akshai M
854145c884 drivers/mtd_sdard : Add MACRO and CONFIG_
Replace MTD_SDCARD_SKIP_ERASE with MTD_SDCARD_ERASE
Add CONFIG_ Prefix to MTD_SDCARD_ERASE
Model CONFIG_MTD_SDCARD_ERASE as bool
2020-05-04 22:12:13 +05:30
Martine Lenders
81bad0d6e8 mtd_sdcard: fix printf format strings 2018-08-06 12:19:44 +02:00
MichelRottleuthner
e5baef3810 Merge pull request #7324 from MichelRottleuthner/sdcard_mtd
sdcard_spi: integrate to mtd interface
2017-08-09 11:30:41 +02:00