mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #12624 from OpenNuvoton/nuvoton_ec2x
Cellular: Support EC2x power control pin support no connectpull/12631/head
commit
2a4e48179d
|
|
@ -97,10 +97,12 @@ CellularDevice *CellularDevice::get_default_instance()
|
||||||
|
|
||||||
nsapi_error_t QUECTEL_EC2X::press_power_button(uint32_t timeout)
|
nsapi_error_t QUECTEL_EC2X::press_power_button(uint32_t timeout)
|
||||||
{
|
{
|
||||||
_pwr_key = _active_high;
|
if (_pwr_key.is_connected()) {
|
||||||
ThisThread::sleep_for(timeout);
|
_pwr_key = _active_high;
|
||||||
_pwr_key = !_active_high;
|
ThisThread::sleep_for(timeout);
|
||||||
ThisThread::sleep_for(100);
|
_pwr_key = !_active_high;
|
||||||
|
ThisThread::sleep_for(100);
|
||||||
|
}
|
||||||
|
|
||||||
return NSAPI_ERROR_OK;
|
return NSAPI_ERROR_OK;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue