Solaris Software
Toggle main menu visibility
Loading...
Searching...
No Matches
storage.h
Go to the documentation of this file.
1
/**
2
* @file storage.h
3
* @brief SPP storage HAL API — dispatches through the registered HAL port.
4
*
5
*/
6
7
#ifndef SPP_HAL_STORAGE_H
8
#define SPP_HAL_STORAGE_H
9
10
#include "
spp/core/returnTypes.h
"
11
12
/* ----------------------------------------------------------------
13
* Public API
14
* ---------------------------------------------------------------- */
15
16
/**
17
* @brief Initializes the storage device through the registered HAL port.
18
* @return K_SPP_OK on success, K_SPP_ERROR on initialization failure,
19
* or K_SPP_ERROR_NULL_POINTER if the HAL is not initialized.
20
*/
21
SPP_RetVal_t
SPP_HAL_STORAGE_init
(
void
);
22
23
/**
24
* @brief Writes consecutive storage blocks through the HAL.
25
*
26
* @param p_buffer Pointer to the data buffer (512 bytes per block on ESP32).
27
* @param first_block Index of the first block to write.
28
* @param count Number of consecutive blocks to write.
29
* @return K_SPP_OK on success, K_SPP_ERROR on write failure,
30
* or K_SPP_ERROR_NULL_POINTER for an invalid pointer.
31
*/
32
SPP_RetVal_t
SPP_HAL_STORAGE_write
(
const
void
*p_buffer,
spp_uint32_t
first_block,
spp_uint16_t
count);
33
34
#endif
/* SPP_HAL_STORAGE_H */
returnTypes.h
Standard return-value type used across all SPP modules.
SPP_RetVal_t
SPP_RetVal_t
Unified return type for all SPP API functions.
Definition
returnTypes.h:24
SPP_HAL_STORAGE_init
SPP_RetVal_t SPP_HAL_STORAGE_init(void)
Initializes the storage device through the registered HAL port.
Definition
storage.c:18
SPP_HAL_STORAGE_write
SPP_RetVal_t SPP_HAL_STORAGE_write(const void *p_buffer, spp_uint32_t first_block, spp_uint16_t count)
Writes consecutive storage blocks through the HAL.
Definition
storage.c:38
spp_uint16_t
uint16_t spp_uint16_t
Definition
types.h:29
spp_uint32_t
uint32_t spp_uint32_t
Definition
types.h:31
solaris-v2
spp
hal
storage
storage.h
Generated by
1.18.0