Added object extensions configuration parameter to HAL

pull/12387/head
George Beckstein 2020-02-07 01:47:36 -05:00 committed by George Beckstein
parent c8ab263388
commit 382a55487f
2 changed files with 21 additions and 15 deletions

9
hal/mbed_lib.json Normal file
View File

@ -0,0 +1,9 @@
{
"name": "hal",
"config": {
"enable-objects-extensions": {
"help": "Enable inclusion of objects_extensions.h",
"value": false
}
}
}

View File

@ -18,21 +18,18 @@
#ifndef MBED_DEVICE_H
#define MBED_DEVICE_H
#include "objects.h"
/**
* This allows applications and external libraries to provide
* structs typically included in objects.h
*
* Useful if a chip doesn't have a certain peripheral (eg: CAN) but
* can be equipped with one by external hardware (eg: CAN via SPI). This allows
* the standard APIs to be used without any extra hacks.
*/
#if MBED_CONF_HAL_ENABLE_OBJECTS_EXTENSIONS
#include "objects_extensions.h"
#endif
#endif