Commit Graph

23 Commits (ca0846b1e93e2cdb60e02216fd1284b0d00896d9)

Author SHA1 Message Date
Hugues Kamba 20f81e19be Change Doxygen groups structure, splitting first by Public/Internal (#11105)
* Change Doxygen groups structure, splitting first by Public/Internal

This commit also does the following:
* groups the documentation of related API
* moves `events/internal/equeue.h` to `events/equeue.h`
* merges `events/source/README.md` to `events/README.md`
2019-08-02 12:23:47 +01:00
Hugues Kamba 83354e46a7 Platform: Separate internal APIs from public APIs
Also includes:
* rename `mbed_sleep_manager.c` to `mbed_power_mgmt.c` to match its
  header file
* create Doxygen groups for public and internal APIs
* use relative path to include header files where inconsistent
* update references to internal APIs throughout libraries
* update the copyright year for all modified files
2019-08-02 12:23:47 +01:00
Martin Kojtal e4b4539d27
Merge pull request #10837 from kjbracey-arm/toolchain11
Toolchain attributes - use C++11/C11
2019-07-04 15:35:29 +01:00
Kevin Bracey c5b9779858 Remote "static" from MBED_FORCEINLINE
Static keyword causes problems when trying to use force-inlined
functions from normal inlined functions. This is not legal:

    static inline void forced() { }

    inline void normal() { forced(); }

You cannot reference internal-linkage things from external-linkage
inline functions.

Removal of the static implies that in C there would need to be a
non-inline definition in case anyone calls it non-inlined, but if the
force attribute is doing its job, that should not happen.

Only significant in-tree user of the MBED_FORCEINLINE macro is
the atomic operations - making this change permits atomic operations
from non-static inline functions.
2019-06-27 16:12:30 +03:00
Kevin Bracey 703af8df06 mbed_toolchain: Use C++11/C11 attributes
Newer language standards have standard forms for `MBED_NORETURN` and
`MBED_ALIGN` attributes. Use them when available.

C++14 also adds `[[deprecated]]`, but as it needs to go in the middle of
structure definitions as `class [[deprecated]] MyClass`, it's not a
total drop-in-replacemend for `MBED_DEPRECATED`, so that is not
attempted here.

Using standard forms increases the chances that code analysis tools such
Coverity will recognise them - particularly important for "no return".
2019-06-14 14:56:28 +03:00
Kevin Bracey 703e44031c Add atomic loads and stores and barriers
Add atomic load and store functions, and add barriers to the existing atomic
functions.

File currently has no explicit barriers - we don't support SMP, so don't
need CPU barriers.

But we do need to worry about compiler barriers - particularly if link time
optimisation is activated so that the compiler can see inside these
functions. The assembler or intrinsics that access PRIMASK for
enter/exit critical act as barriers, but LDREX, STREX and simple
volatile pointer loads and stores do not.
2019-01-18 09:32:04 +02:00
Martin Kojtal ad759b7749 platform: add spdx license 2018-11-28 10:39:52 +00:00
Martin Kojtal 2ae9981bea Merge branch 'platform-doxy-typo-fix' of https://github.com/kegilbert/mbed-os into dev_rollup 2018-11-06 12:10:26 +00:00
kegilbert 766359c7c5 Typo fixes in Doxygen for Platform 2018-11-01 12:10:08 -05:00
Kevin Bracey 814d631c55 Add format checking to Stream methods 2018-10-31 14:26:35 +02:00
Michal Paszta 0b3593f576 Fix for unit test build on Windows machines
In case MINGW is detected - define MBED_WEAK to be empty, as Windows
executables cannot handle the weak attribute.
2018-10-25 08:27:52 +03:00
Martin Kojtal ffcb6ecfb5 platform: astyle update 2018-06-29 10:38:44 +01:00
ccli8 1b7b94e0ad Add MBED_NONSECURE_ENTRY for all-toolchain secure gateway functions 2018-04-16 09:38:39 +08:00
Steven Cartmell ab2abcb29d Fix issues with __FILENAME__ macro
- Move macro definition to mbed_toolchain.h
- Remove double underscores from macro which are reserved.
- Fix macro for IAR until compiler flags to disable path are added again.
2018-03-20 14:29:34 +00:00
Vincent Coubard 5310451c8f Platform: Add MBED_PRETTY_FUNCTION macro.
This macro yields a string literal of the enclosing function name.
2017-11-14 10:07:30 +00:00
Vincent Coubard 3aa4bf4346 Platform: fix end of line whitespace 2017-11-14 10:06:38 +00:00
Senthil Ramakrishnan 3ad298488c Doxygen comment updates and fixes 2017-10-26 15:36:26 -05:00
Chris Snow fb27e71894 Implement MBED_USED 2017-09-30 19:26:11 +01:00
Jimmy Brisson 9cb9b9b5b5 Merge pull request #4718 from ARMmbed/g-weak-note
Toolchain: Add a note about weak functions and header files
2017-07-17 11:08:22 -05:00
Christopher Haster eb4c223dd7 Toolchain: Added a note about weak functions and header files
The subtlety of where to mark functions as weak created an issue for
at least one user, so added a warning in the documentation.
2017-07-07 14:33:26 -05:00
Chris 3df42bcfb4 Toolchain independent noinline 2017-06-30 20:32:17 +01:00
Hasnain Virk 4a04c9ce5d Extending ATParser to use FileHandle
Existing ATParser is extended to use FileHandle. This essentially detaches
ATParser from previous tight binding with various implementations of serial
interfaces with buffering.
Now the ATParser uses only abstract FileHandle and doesn't really care about
the underlying implementation. Underneath, it could be a USB device type FileHandle
or a Serial device type FileHandle etc.
Some simplification steps were taken as the code provided opportunities to simplify
and optimize.
2017-05-31 15:02:11 +03:00
Christopher Haster aff49d8d1e Renamed files in platform to match source names
critical.h     -> mbed_critical.h
sleep.h        -> mbed_sleep.h
toolchain.h    -> mbed_toolchain.h
rtc_time.h     -> mbed_rtc_time.h
semihost_api.h -> mbed_semihost_api.h
wait_api.h     -> mbed_wait_api.h
2017-02-22 18:17:54 -06:00