Commit Graph

5 Commits (5e5e1568bebdad30fa695a42f45922ddb007dad0)

Author SHA1 Message Date
Russ Butler e161aad0c1 Create mbed-drivers/mbed.h for compatibility
Create a second mbed.h in the mbed-drivers directory to support
projects using 3.0 style includes.
2016-04-10 23:43:34 -05:00
sg- 47ee2ed90f rename error.c to mbed_error.c. add toolchain.h to mbed.h exposing to all. add extern filler to toolchain.h 2016-04-07 10:22:59 -05:00
Christopher Haster 8a5121aaff Reverted merge of FuncPtr (#10)
Replaced FuncPtr with FunctionPointer in NSAPI
2016-04-06 11:23:42 -05:00
Christopher Haster f396e3165f Added improved FuncPtr type
FuncPtr provides a more flexible templated function class as a
replacement for FunctionPointer.

FuncPtr provides an intuitive template interface:

void doit(int, char *);
FuncPtr<void(int, char *)> doit_ptr(doit);
doit_ptr(10, "hi!");

FuncPtr places memory management on the user, only supporting
storing an extra pointer for pointers to externally stored objects
that can be passed to the function. Additional binding can be
supplied by an external class.

FuncPtr<void(int)> hello(&object, &Object::method);

Additionally FuncPtr provides a copy constructor, allowing FuncPtrs
themselves to be passed to existing interfaces.

FuncPtr<void()> hello(doit); ticker.attach(hello, 1000);
2016-04-06 08:01:28 -05:00
Bogdan Marinescu 3feff63592 Preparing new layout - moved hal+mbed-drivers to ./hal 2016-04-05 16:26:29 +01:00