Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
shim.h
Go to the documentation of this file.
1
8
9#ifndef INFUSE_SDK_INCLUDE_INFUSE_DATA_LOGGER_BACKEND_SHIM_H_
10#define INFUSE_SDK_INCLUDE_INFUSE_DATA_LOGGER_BACKEND_SHIM_H_
11
12#include <stdint.h>
13
14#include <zephyr/kernel.h>
15
16#include <infuse/types.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
27
30 struct {
31 uint32_t num_calls;
32 uint32_t block;
33 uint16_t data_len;
35 int rc;
37 struct {
38 uint32_t num_calls;
39 uint32_t block;
40 uint16_t block_offset;
41 uint16_t data_len;
42 void (*read_cb)(uint32_t block, uint16_t block_offset, uint16_t data_len);
43 int rc;
45 struct {
46 uint32_t num_calls;
47 uint32_t phy_block;
48 uint32_t num;
49 struct k_sem *block_until;
50 int rc;
52 struct {
53 uint32_t num_calls;
54 uint32_t block_hint;
55 struct k_sem *block_until;
56 int rc;
58};
59
68int logger_shim_init(const struct device *dev);
69
76void logger_shim_change_size(const struct device *dev, uint16_t block_size);
77
84void logger_shim_set_current_block(const struct device *dev, uint32_t current_block);
85
94data_logger_backend_shim_data_pointer(const struct device *dev);
95
99
100#ifdef __cplusplus
101}
102#endif
103
104#endif /* INFUSE_SDK_INCLUDE_INFUSE_DATA_LOGGER_BACKEND_SHIM_H_ */
struct data_logger_shim_function_data * data_logger_backend_shim_data_pointer(const struct device *dev)
Get the pointer to the function data struct.
void logger_shim_change_size(const struct device *dev, uint16_t block_size)
Update the current data size of the shim backend.
int logger_shim_init(const struct device *dev)
Re-initialise the logger.
void logger_shim_set_current_block(const struct device *dev, uint32_t current_block)
Set the current block of the shim backend.
infuse_type
Core Infuse Data Types.
Definition types.h:26
Core Infuse-IoT platform types.
Data structure used for shim.
Definition shim.h:29
uint32_t phy_block
Definition shim.h:47
uint16_t block_offset
Definition shim.h:40
struct data_logger_shim_function_data::@257330224275320365353142355322376001177065306033 write
struct data_logger_shim_function_data::@145205330110353006117277112237043143371014161277 erase
enum infuse_type data_type
Definition shim.h:34
uint32_t block_hint
Definition shim.h:54
uint32_t num_calls
Definition shim.h:31
struct data_logger_shim_function_data::@351310302151240024237375136123124047174032325304 read
struct data_logger_shim_function_data::@376163062331150005066152122033325033360351341143 reset
uint32_t block
Definition shim.h:32
uint32_t num
Definition shim.h:48
uint16_t data_len
Definition shim.h:33
struct k_sem * block_until
Definition shim.h:49
void(* read_cb)(uint32_t block, uint16_t block_offset, uint16_t data_len)
Definition shim.h:42
int rc
Definition shim.h:35