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.
pull/10363/head
Hasnain Virk 2019-04-10 11:54:35 +03:00
parent bb0baee381
commit 34fc828601
1 changed files with 2 additions and 0 deletions

View File

@ -73,6 +73,7 @@ QUECTEL_EC2X::QUECTEL_EC2X(FileHandle *fh, PinName pwr, bool active_high, PinNam
AT_CellularBase::set_cellular_properties(cellular_properties); AT_CellularBase::set_cellular_properties(cellular_properties);
} }
#if MBED_CONF_QUECTEL_EC2X_PROVIDE_DEFAULT
CellularDevice *CellularDevice::get_default_instance() CellularDevice *CellularDevice::get_default_instance()
{ {
static UARTSerial serial(MBED_CONF_QUECTEL_EC2X_TX, static UARTSerial serial(MBED_CONF_QUECTEL_EC2X_TX,
@ -87,6 +88,7 @@ CellularDevice *CellularDevice::get_default_instance()
MBED_CONF_QUECTEL_EC2X_RST); MBED_CONF_QUECTEL_EC2X_RST);
return &device; return &device;
} }
#endif
nsapi_error_t QUECTEL_EC2X::press_power_button(uint32_t timeout) nsapi_error_t QUECTEL_EC2X::press_power_button(uint32_t timeout)
{ {