From 34fc828601b69bcf4713962578906acdb9f468c8 Mon Sep 17 00:00:00 2001 From: Hasnain Virk Date: Wed, 10 Apr 2019 11:54:35 +0300 Subject: [PATCH] Flagging WEAK method implementation for default construction CellularDevice::get_default_instance() is a weak method and is overriden by either a default construction provided in the code or by application at some stage. This method needs to be flagged otherwise using another driver will be hindered by the default overriding of this driver. --- .../cellular/framework/targets/QUECTEL/EC2X/QUECTEL_EC2X.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/features/cellular/framework/targets/QUECTEL/EC2X/QUECTEL_EC2X.cpp b/features/cellular/framework/targets/QUECTEL/EC2X/QUECTEL_EC2X.cpp index 001932eeba..73a2e15828 100644 --- a/features/cellular/framework/targets/QUECTEL/EC2X/QUECTEL_EC2X.cpp +++ b/features/cellular/framework/targets/QUECTEL/EC2X/QUECTEL_EC2X.cpp @@ -73,6 +73,7 @@ QUECTEL_EC2X::QUECTEL_EC2X(FileHandle *fh, PinName pwr, bool active_high, PinNam AT_CellularBase::set_cellular_properties(cellular_properties); } +#if MBED_CONF_QUECTEL_EC2X_PROVIDE_DEFAULT CellularDevice *CellularDevice::get_default_instance() { static UARTSerial serial(MBED_CONF_QUECTEL_EC2X_TX, @@ -87,6 +88,7 @@ CellularDevice *CellularDevice::get_default_instance() MBED_CONF_QUECTEL_EC2X_RST); return &device; } +#endif nsapi_error_t QUECTEL_EC2X::press_power_button(uint32_t timeout) {