flash_register_callback

Register a function as FLASH transfer completion callback.

int32_t flash_register_callback(
    struct flash_descriptor * flash,
    const enum flash_cb_type type,
    flash_cb_t func
)

Parameters

flash

Type: struct flash_descriptor Struct *

Pointer to the HAL FLASH instance.

type

Type: const enum flash_cb_type Enum

Callback type (flash_cb_type Enum).

func

Type: flash_cb_t typedef

Pointer to callback function.

Returns

Type: int32_t

0

Success

-1

Error