|
|
@@ -835,7 +835,7 @@ void send_serial_command(ESerialCommand command) {
|
|
|
return;
|
|
|
};
|
|
|
|
|
|
- furi_hal_uart_tx(FuriHalUartIdUSART1, data, 1);
|
|
|
+ furi_hal_uart_tx(UART_CH, data, 1);
|
|
|
}
|
|
|
|
|
|
int32_t wifi_scanner_app(void* p) {
|
|
|
@@ -905,11 +905,14 @@ int32_t wifi_scanner_app(void* p) {
|
|
|
WIFI_APP_LOG_I("UART thread allocated");
|
|
|
|
|
|
// Enable uart listener
|
|
|
-#if DISABLE_CONSOLE
|
|
|
- furi_hal_console_disable();
|
|
|
-#endif
|
|
|
- furi_hal_uart_set_br(FuriHalUartIdUSART1, FLIPPERZERO_SERIAL_BAUD);
|
|
|
- furi_hal_uart_set_irq_cb(FuriHalUartIdUSART1, uart_on_irq_cb, app);
|
|
|
+ if(UART_CH == FuriHalUartIdUSART1) {
|
|
|
+ furi_hal_console_disable();
|
|
|
+ } else if(UART_CH == FuriHalUartIdLPUART1) {
|
|
|
+ furi_hal_uart_init(UART_CH, FLIPPERZERO_SERIAL_BAUD);
|
|
|
+ }
|
|
|
+
|
|
|
+ furi_hal_uart_set_br(UART_CH, FLIPPERZERO_SERIAL_BAUD);
|
|
|
+ furi_hal_uart_set_irq_cb(UART_CH, uart_on_irq_cb, app);
|
|
|
WIFI_APP_LOG_I("UART Listener created");
|
|
|
|
|
|
// Because we assume that module was on before we launched the app. We need to ensure that module will be in initial state on app start
|
|
|
@@ -1034,9 +1037,11 @@ int32_t wifi_scanner_app(void* p) {
|
|
|
// Reset GPIO pins to default state
|
|
|
furi_hal_gpio_init(&gpio_ext_pc0, GpioModeAnalog, GpioPullNo, GpioSpeedLow);
|
|
|
|
|
|
-#if DISABLE_CONSOLE
|
|
|
- furi_hal_console_enable();
|
|
|
-#endif
|
|
|
+ if(UART_CH == FuriHalUartIdLPUART1) {
|
|
|
+ furi_hal_uart_deinit(UART_CH);
|
|
|
+ } else {
|
|
|
+ furi_hal_console_enable();
|
|
|
+ }
|
|
|
|
|
|
view_port_enabled_set(view_port, false);
|
|
|
|