添加RF、wifi、ble功能开关,以及在连接ble关闭wifi、连接wifi关闭ble的功能

This commit is contained in:
OPTOC
2025-10-20 12:06:29 +08:00
parent ce9fac6b32
commit c026c49fac
5 changed files with 201 additions and 59 deletions

View File

@@ -65,6 +65,18 @@ void sertrf_start(void)
2048,
10);
}
void sertrf_rf_switch(uint8_t on)
{
switch(on)
{
case 1:
rf_start(&sertrf.device);
break;
case 0:
rf_stop(&sertrf.device);
break;
}
}
//因为 串口
void embedded_thread(void* arg)
{
@@ -233,7 +245,14 @@ void pc_link_rgb_color(device_t* device)
break;
}
case CONNECT_BLE:
{
new_color = RGB_COLOR_GREEN;
}
break;
case CONNECT_RF_OFF:
{
new_color = RGB_COLOR_BLUE;
}
break;
}