forked from xuos/xiuos
optimize connection_adapter 4g and bluetooth kconfig
This commit is contained in:
parent
76017d0d0d
commit
22de65aa20
|
@ -3,6 +3,11 @@ config ADAPTER_4G_EC200T
|
|||
default "ec200t"
|
||||
|
||||
if ADD_XIZI_FETURES
|
||||
config ADAPTER_EC200T_USING_PWRKEY
|
||||
bool "EC200T using PWRKEY pin number"
|
||||
default n
|
||||
|
||||
if ADAPTER_EC200T_USING_PWRKEY
|
||||
config ADAPTER_EC200T_PWRKEY
|
||||
int "EC200T PWRKEY pin number"
|
||||
default "97"
|
||||
|
@ -10,6 +15,7 @@ if ADD_XIZI_FETURES
|
|||
config ADAPTER_EC200T_PIN_DRIVER
|
||||
string "EC200T device pin driver path"
|
||||
default "/dev/pin_dev"
|
||||
endif
|
||||
|
||||
config ADAPTER_EC200T_DRIVER_EXTUART
|
||||
bool "Using extra uart to support 4G"
|
||||
|
@ -35,7 +41,6 @@ if ADD_NUTTX_FETURES
|
|||
config ADAPTER_EC200T_DRIVER
|
||||
string "EC200T device uart driver path"
|
||||
default "/dev/ttyS8"
|
||||
|
||||
endif
|
||||
|
||||
if ADD_RTTHREAD_FETURES
|
||||
|
|
|
@ -38,14 +38,9 @@
|
|||
|
||||
#define TRY_TIMES 10
|
||||
|
||||
#ifdef ADD_NUTTX_FETURES
|
||||
static void Ec200tPowerSet(void){ return; }
|
||||
#else
|
||||
#ifdef ADD_RTTHREAD_FETURES
|
||||
static void Ec200tPowerSet(void){ return; }
|
||||
#else
|
||||
static void Ec200tPowerSet(void)
|
||||
{
|
||||
#ifdef ADAPTER_EC200T_USING_PWRKEY
|
||||
int pin_fd;
|
||||
pin_fd = PrivOpen(ADAPTER_EC200T_PIN_DRIVER, O_RDWR);
|
||||
if (pin_fd < 0) {
|
||||
|
@ -76,9 +71,8 @@ static void Ec200tPowerSet(void){ return; }
|
|||
PrivClose(pin_fd);
|
||||
|
||||
PrivTaskDelay(10000);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static int Ec200tOpen(struct Adapter *adapter)
|
||||
{
|
||||
|
@ -148,7 +142,6 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
#ifdef ADD_NUTTX_FETURES
|
||||
static int Ec200tIoctl(struct Adapter *adapter, int cmd, void *args){ return 0;}
|
||||
#else
|
||||
|
@ -183,7 +176,6 @@ static int Ec200tIoctl(struct Adapter *adapter, int cmd, void *args)
|
|||
ioctl_cfg.args = &serial_cfg;
|
||||
PrivIoctl(adapter->fd, OPE_INT, &ioctl_cfg);
|
||||
|
||||
|
||||
Ec200tPowerSet();
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue