mbed Connector Interface simplification API on top of mbed-client
Fork of mbedConnectorInterfaceV3 by
NOTE:
This repo has been replaced with https://github.com/ARMmbed/mbedConnectorInterface. No further updates will occur with this repo. Please use the github repo instead. Thanks!
Diff: mbed-connector-interface/mbedConnectorInterface.h
- Revision:
- 125:4bf229bf14a3
- Parent:
- 121:dfe65a93f26b
- Child:
- 126:f37e34daa100
--- a/mbed-connector-interface/mbedConnectorInterface.h Mon Jun 05 21:28:42 2017 +0000 +++ b/mbed-connector-interface/mbedConnectorInterface.h Thu Jul 13 19:21:28 2017 +0000 @@ -39,10 +39,20 @@ #define MESH_THREAD 4 #define WIFI_ODIN 5 -// we will use ThreadedResourceObserver -#define CONNECTOR_USING_THREADS 1 -#define MCI_LWIP_INTERFACE true -#define HAS_EXECUTE_PARAMS true +// ResourceObserver type selection based on version of mbedOS we are using +#if defined (MBED_CONF_RTOS_PRESENT) + // mbedOS5+ we will use EventQueueResourceObserver + #define CONNECTOR_USING_EVENT_QUEUES 1 +#else + // mbedOS2 we will use ThreadedResourceObserver + #define CONNECTOR_USING_THREADS 1 +#endif + +// mbedOS5 uses LWIP +#define MCI_LWIP_INTERFACE true + +// mbed-client utilizes execute parameters +#define HAS_EXECUTE_PARAMS true // Default node name #define NODE_NAME_LENGTH 128