BT: stop advertising in bt test cli commands (#712)
* bt: stop advertising in bt test cli commands * furi-hal-bt: add switch context in furi_hal_bt_lock_flash * Lib: update STM32CubeWB to latest version. Scripts: update supported copro binaries version * Scripts: proper version extraction from Cube manifest * bt: add debug application and comment it * bt: fix stop advertising command * bt: debug on f7 target * furi-hal-console: add console tx + new line * bt: fix debug trace function Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -41,10 +41,7 @@ void furi_hal_console_init() {
|
||||
FURI_LOG_I("FuriHalConsole", "Init OK");
|
||||
}
|
||||
|
||||
void furi_hal_console_tx(const uint8_t* buffer, size_t buffer_size) {
|
||||
if (!furi_hal_console_alive)
|
||||
return;
|
||||
|
||||
static void furi_hal_console_uart_tx(const uint8_t* buffer, size_t buffer_size) {
|
||||
while(buffer_size > 0) {
|
||||
while (!LL_USART_IsActiveFlag_TXE(USART1));
|
||||
|
||||
@@ -53,8 +50,27 @@ void furi_hal_console_tx(const uint8_t* buffer, size_t buffer_size) {
|
||||
buffer++;
|
||||
buffer_size--;
|
||||
}
|
||||
}
|
||||
|
||||
/* Wait for TC flag to be raised for last char */
|
||||
void furi_hal_console_tx(const uint8_t* buffer, size_t buffer_size) {
|
||||
if (!furi_hal_console_alive)
|
||||
return;
|
||||
|
||||
// Transmit data
|
||||
furi_hal_console_uart_tx(buffer, buffer_size);
|
||||
// Wait for TC flag to be raised for last char
|
||||
while (!LL_USART_IsActiveFlag_TC(USART1));
|
||||
}
|
||||
|
||||
void furi_hal_console_tx_with_new_line(const uint8_t* buffer, size_t buffer_size) {
|
||||
if (!furi_hal_console_alive)
|
||||
return;
|
||||
|
||||
// Transmit data
|
||||
furi_hal_console_uart_tx(buffer, buffer_size);
|
||||
// Transmit new line symbols
|
||||
furi_hal_console_uart_tx((const uint8_t*)"\r\n", 2);
|
||||
// Wait for TC flag to be raised for last char
|
||||
while (!LL_USART_IsActiveFlag_TC(USART1));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user