spi_flash: Expose an accessor the current SPI flash guard functions

Change places which uses g_flash_guard_default_ops to use this. Probably exact same data, but a bit
cleaner.
This commit is contained in:
Angus Gratton
2017-11-17 15:00:51 +11:00
committed by Angus Gratton
parent e72e5a9706
commit 7a924bd85a
5 changed files with 23 additions and 9 deletions

View File

@@ -324,6 +324,15 @@ typedef struct {
*/
void spi_flash_guard_set(const spi_flash_guard_funcs_t* funcs);
/**
* @brief Get the guard functions used for flash access
*
* @return The guard functions that were set via spi_flash_guard_set(). These functions
* can be called if implementing custom low-level SPI flash operations.
*/
const spi_flash_guard_funcs_t *spi_flash_guard_get();
/**
* @brief Default OS-aware flash access guard functions
*/