Skip to content

Commit 3148dda

Browse files
Add files via upload
1 parent 5e2b469 commit 3148dda

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bsp/stm32/libraries/HAL_Drivers/drivers/drv_qspi.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,9 @@ rt_err_t rt_hw_qspi_device_attach(const char *bus_name, const char *device_name,
326326
goto __exit;
327327
}
328328

329+
/* Safe type conversion to resolve interface contract mismatch.
330+
* Caller ensures the function pointer is compatible via adapter pattern.
331+
*/
329332
if (enter_qspi_mode != RT_NULL)
330333
{
331334
qspi_device->enter_qspi_mode = (void (*)(struct rt_qspi_device *))enter_qspi_mode;
@@ -335,9 +338,6 @@ rt_err_t rt_hw_qspi_device_attach(const char *bus_name, const char *device_name,
335338
qspi_device->enter_qspi_mode = RT_NULL;
336339
}
337340

338-
/* Safe type conversion to resolve interface contract mismatch.
339-
* Caller ensures the function pointer is compatible via adapter pattern.
340-
*/
341341
if (exit_qspi_mode != RT_NULL)
342342
{
343343
qspi_device->exit_qspi_mode = (void (*)(struct rt_qspi_device *))exit_qspi_mode;

0 commit comments

Comments
 (0)