Commit Graph

12 Commits (04580b73d8a92ada8f2afc58c6ada92e2d259d66)

Author SHA1 Message Date
Michal Paszta a3ba7d964d FlashSimBlockDevice: initialize blanks buffer 2020-02-13 15:19:11 +02:00
Michal Paszta 10481f2f7e BlockDevice: multiple fixes to BlockDevice classes
Incorrect addresses only cause error return values instead of assertion.
ExhaustibleBlockDevice has working get/set_erase_cycle functions and an
array preventing programming without erase.
Fixed MBRBlockDevice partitioning function.
2020-02-10 09:53:49 +02:00
Seppo Takalo bcaf37dcfa SlicingBlockDevice should assert, if size does not look valid 2019-12-03 14:38:40 +02:00
Kevin Bracey 87396e0bf6 Assembler atomics
Reimplement atomic code in inline assembly. This can improve
optimisation, and avoids potential architectural problems with using
LDREX/STREX intrinsics.

API further extended:
* Bitwise operations (fetch_and/fetch_or/fetch_xor)
* fetch_add and fetch_sub (like incr/decr, but returning old value -
  aligning with C++11)
* compare_exchange_weak
* Explicit memory order specification
* Basic freestanding template overloads for C++

This gives our existing C implementation essentially all the functionality
needed by C++11.

An actual Atomic<T> template based upon these C functions could follow.
2019-04-26 13:12:35 +03:00
Yossi Levy b17d13e75e Documnent changes and adding const to get_type method 2018-12-23 14:27:14 +02:00
Yossi Levy b8b7292d8e astyle fix 2018-12-23 11:03:45 +02:00
Yossi Levy 1d71fb1c9f Add get_type method to block devices. 2018-12-23 11:03:45 +02:00
deepikabhavnani da69da972f Add BlockDevice and Filesystem classes inside mbed namespace.
Adding new modules inside the namespace could be breaking change for existing code base
hence add `using namespace::class` for classes newly added to mbed namespace to maintian
backwards compatibility.

MBED_NO_GLOBAL_USING_DIRECTIVE is added to remove auto-addition of namespace
Macro guard `MBED_NO_GLOBAL_USING_DIRECTIVE` is added around namespace, to avoid
polluting users namespace.
2018-11-26 13:35:40 -06:00
Anna Bridge 8dcc949c63
Merge pull request #8002 from deepikabhavnani/storage_remove_mbed_h
Storage: Add required header file and namespace element instead add all
2018-10-12 11:06:35 +01:00
Deepika 8642ece022 Storage: Add required header file and namespace element instead add all 2018-10-08 07:32:04 -05:00
Yossi Levy dd065e3be1 Fix warnings in block devices 2018-09-26 14:35:48 +03:00
Yossi Levy ed8e170d15 Moving SD, SPIF and FLASHIAP into mbedos and refactoring features storage directory structure. 2018-08-29 12:01:11 +03:00