diff --git a/drivers/USBCDC_ECM.h b/drivers/USBCDC_ECM.h index 7b2971e7b47..db83a57474e 100644 --- a/drivers/USBCDC_ECM.h +++ b/drivers/USBCDC_ECM.h @@ -18,6 +18,7 @@ #ifndef USBCDC_ECM_H #define USBCDC_ECM_H +#if defined(MBED_CONF_RTOS_PRESENT) #include "USBDescriptor.h" #include "USBDevice.h" #include "ByteBuffer.h" @@ -275,5 +276,5 @@ class USBCDC_ECM: public USBDevice { }; /** @}*/ - +#endif // defined(MBED_CONF_RTOS_PRESENT) #endif diff --git a/drivers/source/usb/USBCDC_ECM.cpp b/drivers/source/usb/USBCDC_ECM.cpp index 976328e2917..45e97ad1948 100644 --- a/drivers/source/usb/USBCDC_ECM.cpp +++ b/drivers/source/usb/USBCDC_ECM.cpp @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +#if defined(MBED_CONF_RTOS_PRESENT) #include #include "USBCDC_ECM.h" #include "EndpointResolver.h" @@ -556,3 +556,4 @@ void USBCDC_ECM::_bulk_out_callback() read_start(_bulk_out, _bulk_buf, MAX_PACKET_SIZE_BULK); } +#endif // defined(MBED_CONF_RTOS_PRESENT)