ARMmbed / core-util

DEPRECATED: Mbed 3 utilities library
Other
12 stars 17 forks source link

Platform support for mbed-util #5

Closed bogdanm closed 9 years ago

bogdanm commented 9 years ago

The initial aim for this library was to be independent from mbed-core and mbed in general, but that has a number of issues:

To address this, there's now a 'mbed-util.h' header that contains the necessary functions and an implementation that gets included only for mbed targets (in mbed-util_mbed.c). Other implementations (for example POSIX) can be added on top of this. Eventually I expect 'mbed-util_mbed.c' (and other similar files that'll likely be added) to be spawned into a separate repository.

With this pattern, it's still possible to use this library in a POSIX environment (for example) with relative ease (implement mbed-util for POSIX and add a target POSIX dependency).

If this gets in, the corresponding functions in mbed-core should be expressed in terms of functions in mbed-util, to avoid code duplication.

bogdanm commented 9 years ago

@0xc0170 , @autopulated , this is needed for the proper implementation of the Array class (and for further improvements to the code, especially adding various ASSERTs)

autopulated commented 9 years ago

looks good – maybe provide a minimal implementation for non-mbed targets (even if it just while(1);s )?

bogdanm commented 9 years ago

I bet @rgrover would want to take care of that :)

rgrover commented 9 years ago

I'll port and test mbed-util to POSIX

0xc0170 commented 9 years ago

+1