Closed bogdanm closed 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)
looks good – maybe provide a minimal implementation for non-mbed targets (even if it just while(1);
s )?
I bet @rgrover would want to take care of that :)
I'll port and test mbed-util to POSIX
+1
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.