已裁剪掉逗猫棒的业务程序,原有的蓝牙转USB功能不受影响
This commit is contained in:
+10
-19
@@ -1,7 +1,6 @@
|
||||
#include "asm/power_interface.h"
|
||||
#include "app_config.h"
|
||||
#include "includes.h"
|
||||
#include "app_main.h"
|
||||
static u8 gpiousb = 0x3;
|
||||
static u32 usb_io_con = 0;
|
||||
|
||||
@@ -19,7 +18,6 @@ void sleep_gpio_protect(u32 gpio)
|
||||
}
|
||||
}
|
||||
|
||||
extern void usr_led_w_out(u8 flag);
|
||||
void sleep_enter_callback_common(void *priv)
|
||||
{
|
||||
usb_io_con = JL_USB_IO->CON0;
|
||||
@@ -36,14 +34,11 @@ void sleep_enter_callback_common(void *priv)
|
||||
}
|
||||
|
||||
if (gpiousb & BIT(1)) {
|
||||
if(_usr_module_cfg.power_on_flag)
|
||||
{
|
||||
usr_led_w_out(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
usr_led_w_out(0);
|
||||
}
|
||||
gpio_set_pull_up(IO_PORT_DM, 0);
|
||||
gpio_set_pull_down(IO_PORT_DM, 0);
|
||||
gpio_set_direction(IO_PORT_DM, 1);
|
||||
gpio_set_die(IO_PORT_DM, 0);
|
||||
gpio_set_dieh(IO_PORT_DM, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -197,15 +192,11 @@ void board_set_soft_poweroff_common(void *priv)
|
||||
}
|
||||
|
||||
if (soff_gpio_config.gpiousb & BIT(1)) {
|
||||
|
||||
if(_usr_module_cfg.power_on_flag)
|
||||
{
|
||||
usr_led_w_out(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
usr_led_w_out(0);
|
||||
}
|
||||
gpio_set_pull_up(IO_PORT_DM, 0);
|
||||
gpio_set_pull_down(IO_PORT_DM, 0);
|
||||
gpio_set_direction(IO_PORT_DM, 1);
|
||||
gpio_set_die(IO_PORT_DM, 0);
|
||||
gpio_set_dieh(IO_PORT_DM, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user