mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-20 09:43:23 +00:00
acc39a4bc0
* Api Symbols: replace asserts with checks * Api Symbols: replace asserts with checks part 2 * Update no args function signatures with void, to help compiler to track incorrect usage * More unavoidable void * Update PVS config and code to make it happy * Format sources * nfc: fix checks * dead code cleanup & include fixes Co-authored-by: gornekich <n.gorbadey@gmail.com> Co-authored-by: hedger <hedger@users.noreply.github.com> Co-authored-by: hedger <hedger@nanode.su>
36 lines
749 B
C
36 lines
749 B
C
#pragma once
|
|
#include <stdint.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* @brief Init sector cache system
|
|
*/
|
|
void sector_cache_init(void);
|
|
|
|
/**
|
|
* @brief Get sector data from cache
|
|
* @param n_sector Sector number
|
|
* @return Pointer to sector data or NULL if not found
|
|
*/
|
|
uint8_t* sector_cache_get(uint32_t n_sector);
|
|
|
|
/**
|
|
* @brief Put sector data to cache
|
|
* @param n_sector Sector number
|
|
* @param data Pointer to sector data
|
|
*/
|
|
void sector_cache_put(uint32_t n_sector, uint8_t* data);
|
|
|
|
/**
|
|
* @brief Invalidate sector cache for given range
|
|
* @param start_sector Start sector number
|
|
* @param end_sector End sector number
|
|
*/
|
|
void sector_cache_invalidate_range(uint32_t start_sector, uint32_t end_sector);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|