ソースを参照

fix: Remove unecessary memset() from stm32 port

This memeset was probably used to distinguish received data in the buffer, but:
1. It's an imperfect way of detecting received data as it could contain the pattern within
2. It's not present in any other port
Djordje Nedic 2 年 前
コミット
d51aa035e9
1 ファイル変更0 行追加2 行削除
  1. 0 2
      port/stm32_port.c

+ 0 - 2
port/stm32_port.c

@@ -82,8 +82,6 @@ esp_loader_error_t loader_port_write(const uint8_t *data, uint16_t size, uint32_
 
 esp_loader_error_t loader_port_read(uint8_t *data, uint16_t size, uint32_t timeout)
 {
-    memset(data, 0x22, size);
-
     HAL_StatusTypeDef err = HAL_UART_Receive(uart, data, size, timeout);
 
     serial_debug_print(data, size, false);