Мелкие фиксы

This commit is contained in:
2026-02-17 18:50:11 +03:00
parent 643391038e
commit 81dc223d98
3 changed files with 16 additions and 7 deletions

View File

@@ -218,6 +218,7 @@ HAL_StatusTypeDef MEMSPI_CMD_FLASH_Page_Program(MEMSPI_HandleTypeDef *hmemspi, u
*/
HAL_StatusTypeDef MEMSPI_CMD_FLASH_Byte_Program(MEMSPI_HandleTypeDef *hmemspi, uint32_t FLASH_Address, uint8_t Byte, uint32_t Timeout)
{
#ifdef MEMSPI_BYTE_PROGRAM
HAL_StatusTypeDef SPI_RES;
// 1 command byte + 3 address bytes + 256 data bytes
uint8_t command[1+3+MEMSPI_PAGE_SIZE];
@@ -238,6 +239,9 @@ HAL_StatusTypeDef MEMSPI_CMD_FLASH_Byte_Program(MEMSPI_HandleTypeDef *hmemspi, u
printf_memspi_err("Error Program Byte: 0x%08lX", (unsigned long)FLASH_Address);
}
return SPI_RES;
#else
return HAL_ERROR;
#endif
}
/**