mirror of https://github.com/ARMmbed/mbed-os.git
Support EC2x PWRKEY set as no connect
parent
0699ac4e7e
commit
73b96c1cbc
|
@ -97,10 +97,12 @@ CellularDevice *CellularDevice::get_default_instance()
|
|||
|
||||
nsapi_error_t QUECTEL_EC2X::press_power_button(uint32_t timeout)
|
||||
{
|
||||
_pwr_key = _active_high;
|
||||
ThisThread::sleep_for(timeout);
|
||||
_pwr_key = !_active_high;
|
||||
ThisThread::sleep_for(100);
|
||||
if (_pwr_key.is_connected()) {
|
||||
_pwr_key = _active_high;
|
||||
ThisThread::sleep_for(timeout);
|
||||
_pwr_key = !_active_high;
|
||||
ThisThread::sleep_for(100);
|
||||
}
|
||||
|
||||
return NSAPI_ERROR_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue