From 04c3a60093e2c2378e79498b4505aa8072980a42 Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Sat, 2 Dec 2023 06:32:56 +0000 Subject: [PATCH] Format --- mifare_nested/application.fam | 14 +- nrf24scan/nrf24_packet_decoder.py | 143 +++++++++++------- spi_mem_manager/tools/chiplist_convert.py | 1 + swd_probe/model/convert.py | 35 +++-- .../uart_terminal_scene_console_output.c | 30 ++-- .../scenes/uart_terminal_scene_help.c | 6 +- .../scenes/uart_terminal_scene_setup.c | 10 +- .../scenes/uart_terminal_scene_start.c | 32 ++-- uart_terminal/uart_hex_input.c | 3 +- uart_terminal/uart_terminal_app.c | 6 +- uart_terminal/uart_terminal_uart.c | 2 +- 11 files changed, 166 insertions(+), 116 deletions(-) diff --git a/mifare_nested/application.fam b/mifare_nested/application.fam index 240888c2698..a71eb870ae7 100644 --- a/mifare_nested/application.fam +++ b/mifare_nested/application.fam @@ -3,23 +3,15 @@ App( name="Mifare Nested", apptype=FlipperAppType.EXTERNAL, entry_point="mifare_nested_app", - requires=[ - "storage", - "gui", - "nfc" - ], + requires=["storage", "gui", "nfc"], stack_size=4 * 1024, order=30, fap_icon="assets/icon.png", fap_category="NFC", - fap_private_libs=[ - Lib(name="nested"), - Lib(name="parity"), - Lib(name="crypto1") - ], + fap_private_libs=[Lib(name="nested"), Lib(name="parity"), Lib(name="crypto1")], fap_icon_assets="assets", fap_author="AloneLiberty", fap_description="Recover Mifare Classic keys", fap_weburl="https://github.com/AloneLiberty/FlipperNested", - fap_version="1.5.2" + fap_version="1.5.2", ) diff --git a/nrf24scan/nrf24_packet_decoder.py b/nrf24scan/nrf24_packet_decoder.py index d0ebc9c2484..6345b7f4731 100644 --- a/nrf24scan/nrf24_packet_decoder.py +++ b/nrf24scan/nrf24_packet_decoder.py @@ -2,35 +2,37 @@ # NRF24L01+ Enhanced ShockBurst packets decoder # payload_len_default = 4 -packets = \ -( - '10101010 11101110 00000011 00001000 00001011 01000111 000100 10 0 10101010 10101010 10101010 10101010 00011101', - '10101010 11001000 11001000 11000011 110011 10 0 00001011 00000011 00000101 00000000 0010001100100000', - '10101010 11001000 11001000 11000100 000100 11 1 00001011 00000011 00000101 00000000 0010010011100010', - '10101010 11001000 11001000 11000100 00001011 00000011 00000101 00000010 1000010101000010', - '10101010 11001000 11001000 11000000 110011 10 0 11110101 00000010 00000011 00000000 0000111001000000', - '01010101 01000000 01101000 00010101 000000 00 0 0100100000100000', -# '01010101 01000010 11100100 10100110 01010101 01000100 110011 00 0 10010101 10110011 01100100 10101100 10101011 01010010 01111100 01001010 1100110100110001', - +packets = ( + "10101010 11101110 00000011 00001000 00001011 01000111 000100 10 0 10101010 10101010 10101010 10101010 00011101", + "10101010 11001000 11001000 11000011 110011 10 0 00001011 00000011 00000101 00000000 0010001100100000", + "10101010 11001000 11001000 11000100 000100 11 1 00001011 00000011 00000101 00000000 0010010011100010", + "10101010 11001000 11001000 11000100 00001011 00000011 00000101 00000010 1000010101000010", + "10101010 11001000 11001000 11000000 110011 10 0 11110101 00000010 00000011 00000000 0000111001000000", + "01010101 01000000 01101000 00010101 000000 00 0 0100100000100000", + # '01010101 01000010 11100100 10100110 01010101 01000100 110011 00 0 10010101 10110011 01100100 10101100 10101011 01010010 01111100 01001010 1100110100110001', ) + def bin2hex(x): def bin2hex_helper(r): while r: yield r[0:2].upper() r = r[2:] - if len(x) == 0: return + + if len(x) == 0: + return fmt = "{0:0" + str(int(len(x) / 8 * 2)) + "X}" hex_data = fmt.format(int(x, 2)) return list(bin2hex_helper(hex_data)) + def bin2hexlong(b): b = b.replace(" ", "") - out = ""; + out = "" n = 8 - for i in range(0, len(b), n): - b2 = b[i:i+n] - out = out + "{0:02X}".format(int(b2.ljust(8, '0'),2)) + for i in range(0, len(b), n): + b2 = b[i : i + n] + out = out + "{0:02X}".format(int(b2.ljust(8, "0"), 2)) return out @@ -42,7 +44,7 @@ def split_packet(packet, parts): :return: list of substrings """ out = [] - packet = packet.replace(' ', '') + packet = packet.replace(" ", "") for part_length in parts: out.append(packet[0:part_length]) packet = packet[part_length:] @@ -53,15 +55,29 @@ def split_packet(packet, parts): def parse_packet(packet, address_length, ESB): """Split a packet into its fields and return them as tuple.""" if ESB: - preamble, address, payload_length, pid, no_ack, rest = split_packet(packet=packet, parts=(8, 8 * address_length, 6, 2, 1)) - payload, crc = split_packet(packet=rest, parts=((payload_len_default if int(payload_length, 2) > 32 else int(payload_length, 2)) * 8,)) + preamble, address, payload_length, pid, no_ack, rest = split_packet( + packet=packet, parts=(8, 8 * address_length, 6, 2, 1) + ) + payload, crc = split_packet( + packet=rest, + parts=( + ( + payload_len_default + if int(payload_length, 2) > 32 + else int(payload_length, 2) + ) + * 8, + ), + ) else: - preamble, address, rest = split_packet(packet=packet, parts=(8, 8 * address_length)) - crc = packet.rsplit(' ', 1)[1] - payload = rest[0:len(rest) - len(crc)] - payload_length = pid = no_ack = '' + preamble, address, rest = split_packet( + packet=packet, parts=(8, 8 * address_length) + ) + crc = packet.rsplit(" ", 1)[1] + payload = rest[0 : len(rest) - len(crc)] + payload_length = pid = no_ack = "" - assert preamble in ('10101010', '01010101') + assert preamble in ("10101010", "01010101") assert len(crc) in (8, 16) return preamble, address, payload_length, pid, no_ack, payload, crc @@ -76,11 +92,11 @@ def crc(bits, size=8): :polynomial: 2 byte CRC - standard is 0x11021 = X^16+X^12+X^5+1, result the same for 0x1021 """ if size == 8: - polynomial = 0x107 - crc = 0xFF + polynomial = 0x107 + crc = 0xFF else: - polynomial = 0x11021 - crc = 0xFFFF + polynomial = 0x11021 + crc = 0xFFFF max_crc_value = (1 << size) - 1 # e.g. 0xFF for mode 8bit-crc for bit in bits: bit = int(bit, 2) @@ -88,44 +104,65 @@ def crc(bits, size=8): if (crc >> size) ^ bit: # top most lfsr bit xor current data bit crc ^= polynomial crc &= max_crc_value # trim the crc to reject carry over bits -# print('{:X}'.format(crc)) + # print('{:X}'.format(crc)) return crc -if __name__ == '__main__': +if __name__ == "__main__": for packet in packets: - fld = packet.split(' '); + fld = packet.split(" ") address_length = -1 ESB = True for f in fld: - if len(f) == 6 : break - if len(f) == 0 : - ESB = False + if len(f) == 6: + break + if len(f) == 0: + ESB = False break address_length += 1 - preamble, address, payload_length, pid, no_ack, payload, crc_received = \ - parse_packet(packet=packet, address_length=address_length, ESB=ESB) + ( + preamble, + address, + payload_length, + pid, + no_ack, + payload, + crc_received, + ) = parse_packet(packet=packet, address_length=address_length, ESB=ESB) crc_size = len(crc_received) - crc_received = '0x' + '{:X}'.format(int(crc_received, 2)) + crc_received = "0x" + "{:X}".format(int(crc_received, 2)) print(f"Packet: {packet}") - print('\n'.join(( - f'Hex: {bin2hexlong(packet)}', - 'Preamble: 0x%X' % int(preamble,2), - f'Address: {address_length} bytes - {bin2hex(address)}'))) + print( + "\n".join( + ( + f"Hex: {bin2hexlong(packet)}", + "Preamble: 0x%X" % int(preamble, 2), + f"Address: {address_length} bytes - {bin2hex(address)}", + ) + ) + ) if ESB: - print('\n'.join(( - f'Payload length in packet: {int(payload_length, 2)}, used: {(payload_len_default if int(payload_length, 2) > 32 else int(payload_length, 2))}', - f'Payload: {bin2hex(payload)}', - f'Pid: {int(pid, 2)}', - f'No_ack: {int(no_ack, 2) == 1}'))) + print( + "\n".join( + ( + f"Payload length in packet: {int(payload_length, 2)}, used: {(payload_len_default if int(payload_length, 2) > 32 else int(payload_length, 2))}", + f"Payload: {bin2hex(payload)}", + f"Pid: {int(pid, 2)}", + f"No_ack: {int(no_ack, 2) == 1}", + ) + ) + ) else: - print(f'Not Enhanced ShockBurst packet, payload length: {int(len(payload) / 8)}') - print(f'Payload: {bin2hex(payload)}') - print(f'CRC{crc_size}: {crc_received}') - crc_calculated = '0x' + '{:X}'.format(crc(address + payload_length + pid + no_ack + payload, size=crc_size)) + print( + f"Not Enhanced ShockBurst packet, payload length: {int(len(payload) / 8)}" + ) + print(f"Payload: {bin2hex(payload)}") + print(f"CRC{crc_size}: {crc_received}") + crc_calculated = "0x" + "{:X}".format( + crc(address + payload_length + pid + no_ack + payload, size=crc_size) + ) if crc_received == crc_calculated: - print('CRC is valid!') + print("CRC is valid!") else: - print(f'CRC mismatch! Calculated CRC is {crc_calculated}.') - print('-------------') - + print(f"CRC mismatch! Calculated CRC is {crc_calculated}.") + print("-------------") diff --git a/spi_mem_manager/tools/chiplist_convert.py b/spi_mem_manager/tools/chiplist_convert.py index 8b623eb3e97..fd0ecf705d3 100755 --- a/spi_mem_manager/tools/chiplist_convert.py +++ b/spi_mem_manager/tools/chiplist_convert.py @@ -93,6 +93,7 @@ def generateCArr(arr, filename): else: print(" " + cur["writeMode"] + "},", file=out) + def main(): filename = "spi_mem_chip_arr.c" args = getArgs() diff --git a/swd_probe/model/convert.py b/swd_probe/model/convert.py index 7c99ca215e2..0ea5cd62af9 100644 --- a/swd_probe/model/convert.py +++ b/swd_probe/model/convert.py @@ -3,37 +3,42 @@ import plyfile import argparse -parser = argparse.ArgumentParser(description='Convert a PLY file to C arrays.') -parser.add_argument('input_file', help='the input PLY file') -parser.add_argument('output_file', help='the output C file') +parser = argparse.ArgumentParser(description="Convert a PLY file to C arrays.") +parser.add_argument("input_file", help="the input PLY file") +parser.add_argument("output_file", help="the output C file") args = parser.parse_args() # Open the PLY file plydata = plyfile.PlyData.read(args.input_file) # Extract the vertices -vertices = plydata['vertex'].data +vertices = plydata["vertex"].data num_vertices = len(vertices) -with open(args.output_file, 'w') as f: - f.write('#define NUM_VERTICES %d\n' % num_vertices) - f.write('float vertexCoords[NUM_VERTICES][3] = {\n') +with open(args.output_file, "w") as f: + f.write("#define NUM_VERTICES %d\n" % num_vertices) + f.write("float vertexCoords[NUM_VERTICES][3] = {\n") for i in range(num_vertices): x, y, z = vertices[i][0], vertices[i][1], vertices[i][2] - f.write(' {%f, %f, %f},\n' % (x, y, z)) - f.write('};') + f.write(" {%f, %f, %f},\n" % (x, y, z)) + f.write("};") # Extract the faces - faces = plydata['face'].data + faces = plydata["face"].data num_faces = len(faces) - f.write('int edgeIndices[][3] = {\n') + f.write("int edgeIndices[][3] = {\n") for i in range(num_faces): face = faces[i][0] if len(face) == 3: - f.write(' {%d, %d, %d},\n' % (face[0], face[1], face[2])) + f.write(" {%d, %d, %d},\n" % (face[0], face[1], face[2])) elif len(face) == 4: # Convert 4-index face to 2-index edges - edges = [(face[0], face[1]), (face[1], face[2]), (face[2], face[3]), (face[3], face[0])] + edges = [ + (face[0], face[1]), + (face[1], face[2]), + (face[2], face[3]), + (face[3], face[0]), + ] for edge in edges: - f.write(' {%d, %d},\n' % (edge[0], edge[1])) - f.write('};\n') + f.write(" {%d, %d},\n" % (edge[0], edge[1])) + f.write("};\n") diff --git a/uart_terminal/scenes/uart_terminal_scene_console_output.c b/uart_terminal/scenes/uart_terminal_scene_console_output.c index 703e7e32be3..8cbc59a0dbf 100644 --- a/uart_terminal/scenes/uart_terminal_scene_console_output.c +++ b/uart_terminal/scenes/uart_terminal_scene_console_output.c @@ -6,19 +6,19 @@ void uart_terminal_console_output_handle_rx_data_cb(uint8_t* buf, size_t len, vo FuriString* new_str = furi_string_alloc(); if(app->hex_mode) { - while (len--) { + while(len--) { uint8_t byte = *(buf++); if(byte == '\0') break; furi_string_cat_printf(new_str, "%02X ", byte); } - } - else { + } else { buf[len] = '\0'; furi_string_cat_printf(new_str, "%s", buf); } // If text box store gets too big, then truncate it - app->text_box_store_strlen += furi_string_size(new_str);; + app->text_box_store_strlen += furi_string_size(new_str); + ; while(app->text_box_store_strlen >= UART_TERMINAL_TEXT_BOX_STORE_SIZE - 1) { furi_string_right(app->text_box_store, app->text_box_store_strlen / 2); app->text_box_store_strlen = furi_string_size(app->text_box_store) + len; @@ -33,13 +33,13 @@ void uart_terminal_console_output_handle_rx_data_cb(uint8_t* buf, size_t len, vo static uint8_t hex_char_to_byte(const char c) { if(c >= '0' && c <= '9') { - return c-'0'; + return c - '0'; } if(c >= 'A' && c <= 'F') { - return c-'A'+10; + return c - 'A' + 10; } - if (c >= 'a' && c <= 'f') { - return c-'a'+10; + if(c >= 'a' && c <= 'f') { + return c - 'a' + 10; } return 0; } @@ -91,10 +91,10 @@ void uart_terminal_scene_console_output_on_enter(void* context) { if(app->hex_mode) { // Send binary packet if(app->selected_tx_string) { - const char *str = app->selected_tx_string; + const char* str = app->selected_tx_string; uint8_t digit_num = 0; uint8_t byte = 0; - while (*str) { + while(*str) { byte |= (hex_char_to_byte(*str) << ((1 - digit_num) * 4)); if(++digit_num == 2) { @@ -112,13 +112,13 @@ void uart_terminal_scene_console_output_on_enter(void* context) { } else { // Send command with CR+LF or newline '\n' if(app->is_command && app->selected_tx_string) { - if(app->TERMINAL_MODE == 1){ - uart_terminal_uart_tx(uart_ch, - (uint8_t*)(app->selected_tx_string), strlen(app->selected_tx_string)); + if(app->TERMINAL_MODE == 1) { + uart_terminal_uart_tx( + uart_ch, (uint8_t*)(app->selected_tx_string), strlen(app->selected_tx_string)); uart_terminal_uart_tx(uart_ch, (uint8_t*)("\r\n"), 2); } else { - uart_terminal_uart_tx(uart_ch, - (uint8_t*)(app->selected_tx_string), strlen(app->selected_tx_string)); + uart_terminal_uart_tx( + uart_ch, (uint8_t*)(app->selected_tx_string), strlen(app->selected_tx_string)); uart_terminal_uart_tx(uart_ch, (uint8_t*)("\n"), 1); } } diff --git a/uart_terminal/scenes/uart_terminal_scene_help.c b/uart_terminal/scenes/uart_terminal_scene_help.c index dda6129fcdf..90619bc7b95 100644 --- a/uart_terminal/scenes/uart_terminal_scene_help.c +++ b/uart_terminal/scenes/uart_terminal_scene_help.c @@ -12,8 +12,10 @@ void uart_terminal_scene_help_on_enter(void* context) { FuriString* temp_str; temp_str = furi_string_alloc(); - furi_string_printf(temp_str, "\nUART terminal for Flipper\n\nI'm in github: cool4uma\n\nThis app is a modified\nWiFi Marauder companion,\nThanks 0xchocolate(github)\nfor great code and app.\n\n"); - furi_string_cat_printf( temp_str, "Press BACK to return\n"); + furi_string_printf( + temp_str, + "\nUART terminal for Flipper\n\nI'm in github: cool4uma\n\nThis app is a modified\nWiFi Marauder companion,\nThanks 0xchocolate(github)\nfor great code and app.\n\n"); + furi_string_cat_printf(temp_str, "Press BACK to return\n"); widget_add_text_box_element( app->widget, diff --git a/uart_terminal/scenes/uart_terminal_scene_setup.c b/uart_terminal/scenes/uart_terminal_scene_setup.c index 5fdd6f03cca..0ce17aae2c6 100644 --- a/uart_terminal/scenes/uart_terminal_scene_setup.c +++ b/uart_terminal/scenes/uart_terminal_scene_setup.c @@ -1,6 +1,6 @@ #include "../uart_terminal_app_i.h" -#define MAX_OPTIONS 25 +#define MAX_OPTIONS 25 typedef struct { const char* item_string; @@ -11,7 +11,10 @@ typedef struct { // SETUP_MENU_ITEMS defined in uart_terminal_app_i.h - if you add an entry here, increment it! static const UART_Terminal_Setup_Item items[SETUP_MENU_ITEMS] = { {"UART Pins", 2, {"13,14", "15,16"}}, - {"Baudrate", 25, {"75", "110", "150", "300", "600", "1200", "1800", "2400", "4800", "7200", "9600", "14400", "19200", "31250", "38400", "56000", "57600", "76800", "115200", "128000", "230400", "250000", "256000", "460800", "921600"}}, + {"Baudrate", 25, {"75", "110", "150", "300", "600", "1200", "1800", + "2400", "4800", "7200", "9600", "14400", "19200", "31250", + "38400", "56000", "57600", "76800", "115200", "128000", "230400", + "250000", "256000", "460800", "921600"}}, {"HEX mode", 2, {"OFF", "ON"}}, }; @@ -97,7 +100,8 @@ bool uart_terminal_scene_setup_on_event(void* context, SceneManagerEvent event) if(event.type == SceneManagerEventTypeCustom) { consumed = true; } else if(event.type == SceneManagerEventTypeTick) { - app->setup_selected_menu_index = variable_item_list_get_selected_item_index(app->var_item_list); + app->setup_selected_menu_index = + variable_item_list_get_selected_item_index(app->var_item_list); consumed = true; } diff --git a/uart_terminal/scenes/uart_terminal_scene_start.c b/uart_terminal/scenes/uart_terminal_scene_start.c index 8098771e04c..1aefe3733f4 100644 --- a/uart_terminal/scenes/uart_terminal_scene_start.c +++ b/uart_terminal/scenes/uart_terminal_scene_start.c @@ -1,7 +1,15 @@ #include "../uart_terminal_app_i.h" // Command action type -typedef enum { NO_ACTION = 0, OPEN_SETUP, OPEN_PORT, SEND_CMD, SEND_AT_CMD, SEND_FAST_CMD, OPEN_HELP } ActionType; +typedef enum { + NO_ACTION = 0, + OPEN_SETUP, + OPEN_PORT, + SEND_CMD, + SEND_AT_CMD, + SEND_FAST_CMD, + OPEN_HELP +} ActionType; // Command availability in different modes typedef enum { OFF = 0, TEXT_MODE = 1, HEX_MODE = 2, BOTH_MODES = 3 } ModeMask; @@ -24,14 +32,16 @@ static const UART_TerminalItem items[START_MENU_ITEMS] = { {"Send packet", {""}, 1, SEND_CMD, HEX_MODE}, {"Send command", {""}, 1, SEND_CMD, TEXT_MODE}, {"Send AT command", {""}, 1, SEND_AT_CMD, TEXT_MODE}, - {"Fast cmd", + {"Fast cmd", {"help", "uptime", "date", "df -h", "ps", "dmesg", "reboot", "poweroff"}, - 8, SEND_FAST_CMD, TEXT_MODE}, + 8, + SEND_FAST_CMD, + TEXT_MODE}, {"Help", {""}, 1, OPEN_HELP, BOTH_MODES}, }; static uint8_t menu_items_num = 0; -static uint8_t item_indexes[START_MENU_ITEMS] = { 0 }; +static uint8_t item_indexes[START_MENU_ITEMS] = {0}; static void uart_terminal_scene_start_var_list_enter_callback(void* context, uint32_t index) { furi_assert(context); @@ -49,8 +59,7 @@ static void uart_terminal_scene_start_var_list_enter_callback(void* context, uin app->is_custom_tx_string = false; app->selected_menu_index = index; - switch (item->action) - { + switch(item->action) { case OPEN_SETUP: view_dispatcher_send_custom_event(app->view_dispatcher, UART_TerminalEventSetup); return; @@ -64,10 +73,11 @@ static void uart_terminal_scene_start_var_list_enter_callback(void* context, uin } if(app->hex_mode) { - view_dispatcher_send_custom_event(app->view_dispatcher, UART_TerminalEventStartKeyboardHex); - } - else { - view_dispatcher_send_custom_event(app->view_dispatcher, UART_TerminalEventStartKeyboardText); + view_dispatcher_send_custom_event( + app->view_dispatcher, UART_TerminalEventStartKeyboardHex); + } else { + view_dispatcher_send_custom_event( + app->view_dispatcher, UART_TerminalEventStartKeyboardText); } return; case OPEN_PORT: @@ -136,7 +146,7 @@ void uart_terminal_scene_start_on_enter(void* context) { variable_item_list_set_selected_item( var_item_list, scene_manager_get_scene_state(app->scene_manager, UART_TerminalSceneStart)); - view_dispatcher_switch_to_view(app->view_dispatcher, UART_TerminalAppViewVarItemList); + view_dispatcher_switch_to_view(app->view_dispatcher, UART_TerminalAppViewVarItemList); } bool uart_terminal_scene_start_on_event(void* context, SceneManagerEvent event) { diff --git a/uart_terminal/uart_hex_input.c b/uart_terminal/uart_hex_input.c index e8dbeeacffc..6b95a4a9f21 100644 --- a/uart_terminal/uart_hex_input.c +++ b/uart_terminal/uart_hex_input.c @@ -212,8 +212,7 @@ static void uart_hex_input_view_draw_callback(Canvas* canvas, void* _model) { } } -static void - uart_hex_input_handle_up(UART_TextInput* uart_text_input, UART_TextInputModel* model) { +static void uart_hex_input_handle_up(UART_TextInput* uart_text_input, UART_TextInputModel* model) { UNUSED(uart_text_input); if(model->selected_row > 0) { model->selected_row--; diff --git a/uart_terminal/uart_terminal_app.c b/uart_terminal/uart_terminal_app.c index ca859cc4b3a..c2e507f9b1d 100644 --- a/uart_terminal/uart_terminal_app.c +++ b/uart_terminal/uart_terminal_app.c @@ -55,7 +55,8 @@ UART_TerminalApp* uart_terminal_app_alloc() { } app->widget = widget_alloc(); - view_dispatcher_add_view(app->view_dispatcher, UART_TerminalAppViewHelp, widget_get_view(app->widget)); + view_dispatcher_add_view( + app->view_dispatcher, UART_TerminalAppViewHelp, widget_get_view(app->widget)); app->text_box = text_box_alloc(); view_dispatcher_add_view( @@ -71,8 +72,7 @@ UART_TerminalApp* uart_terminal_app_alloc() { view_dispatcher_add_view( app->view_dispatcher, UART_TerminalAppViewHexInput, - uart_hex_input_get_view(app->hex_input) - ); + uart_hex_input_get_view(app->hex_input)); app->setup_selected_option_index[BAUDRATE_ITEM_IDX] = DEFAULT_BAUDRATE_OPT_IDX; diff --git a/uart_terminal/uart_terminal_uart.c b/uart_terminal/uart_terminal_uart.c index 677ac04ecbc..36e169de7d5 100644 --- a/uart_terminal/uart_terminal_uart.c +++ b/uart_terminal/uart_terminal_uart.c @@ -76,7 +76,7 @@ UART_TerminalUart* uart_terminal_uart_init(UART_TerminalApp* app) { if(app->uart_ch == FuriHalUartIdUSART1) { furi_hal_console_disable(); - furi_hal_uart_set_br(app->uart_ch, app->BAUDRATE); + furi_hal_uart_set_br(app->uart_ch, app->BAUDRATE); } else if(app->uart_ch == FuriHalUartIdLPUART1) { furi_hal_uart_init(app->uart_ch, app->BAUDRATE); }