Skip to content

Commit 34fc828

Browse files
author
Hasnain Virk
committed
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.
1 parent bb0baee commit 34fc828

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

features/cellular/framework/targets/QUECTEL/EC2X/QUECTEL_EC2X.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ QUECTEL_EC2X::QUECTEL_EC2X(FileHandle *fh, PinName pwr, bool active_high, PinNam
7373
AT_CellularBase::set_cellular_properties(cellular_properties);
7474
}
7575

76+
#if MBED_CONF_QUECTEL_EC2X_PROVIDE_DEFAULT
7677
CellularDevice *CellularDevice::get_default_instance()
7778
{
7879
static UARTSerial serial(MBED_CONF_QUECTEL_EC2X_TX,
@@ -87,6 +88,7 @@ CellularDevice *CellularDevice::get_default_instance()
8788
MBED_CONF_QUECTEL_EC2X_RST);
8889
return &device;
8990
}
91+
#endif
9092

9193
nsapi_error_t QUECTEL_EC2X::press_power_button(uint32_t timeout)
9294
{

0 commit comments

Comments
 (0)