Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
data_logger_shim_function_data Struct Reference

Data structure used for shim. More...

#include <shim.h>

Data Fields

struct { 
   uint32_t   num_calls 
 Number of times the write function has been called. More...
   uint32_t   block 
 Physical block of the last write. More...
   uint16_t   data_len 
 Length of the last write. More...
   enum infuse_type   data_type 
 Data type of the last write. More...
   int   rc 
 Value to return from the write function. More...
} write
 Write function state.
struct { 
   uint32_t   num_calls 
 Number of times the read function has been called. More...
   uint32_t   block 
 Physical block of the last read. More...
   uint16_t   block_offset 
 Block offset of the last read. More...
   uint16_t   data_len 
 Length of the last read. More...
   void(*   read_cb )(uint32_t block, uint16_t
      block_offset, uint16_t
      data_len) 
 Optional callback run on each read. More...
   int   rc 
 Value to return from the read function. More...
} read
 Read function state.
struct { 
   uint32_t   num_calls 
 Number of times the erase function has been called. More...
   uint32_t   phy_block 
 First physical block of the last erase. More...
   uint32_t   num 
 Number of blocks in the last erase. More...
   struct k_sem *   block_until 
 Optional semaphore the erase function waits on before returning. More...
   int   rc 
 Value to return from the erase function. More...
} erase
 Erase function state.
struct { 
   uint32_t   num_calls 
 Number of times the reset function has been called. More...
   uint32_t   block_hint 
 Block hint of the last reset. More...
   struct k_sem *   block_until 
 Optional semaphore the reset function waits on before returning. More...
   int   rc 
 Value to return from the reset function. More...
} reset
 Reset function state.

Detailed Description

Data structure used for shim.

Field Documentation

◆ block

uint32_t data_logger_shim_function_data::block

Physical block of the last write.

Physical block of the last read.

◆ block_hint

uint32_t data_logger_shim_function_data::block_hint

Block hint of the last reset.

◆ block_offset

uint16_t data_logger_shim_function_data::block_offset

Block offset of the last read.

◆ block_until

struct k_sem* data_logger_shim_function_data::block_until

Optional semaphore the erase function waits on before returning.

Optional semaphore the reset function waits on before returning.

◆ data_len

uint16_t data_logger_shim_function_data::data_len

Length of the last write.

Length of the last read.

◆ data_type

enum infuse_type data_logger_shim_function_data::data_type

Data type of the last write.

◆ [struct]

struct { ... } data_logger_shim_function_data::erase

Erase function state.

◆ num

uint32_t data_logger_shim_function_data::num

Number of blocks in the last erase.

◆ num_calls

uint32_t data_logger_shim_function_data::num_calls

Number of times the write function has been called.

Number of times the reset function has been called.

Number of times the erase function has been called.

Number of times the read function has been called.

◆ phy_block

uint32_t data_logger_shim_function_data::phy_block

First physical block of the last erase.

◆ rc

int data_logger_shim_function_data::rc

Value to return from the write function.

Value to return from the reset function.

Value to return from the erase function.

Value to return from the read function.

◆ [struct]

struct { ... } data_logger_shim_function_data::read

Read function state.

◆ read_cb

void(* data_logger_shim_function_data::read_cb) (uint32_t block, uint16_t block_offset, uint16_t data_len)

Optional callback run on each read.

◆ [struct]

struct { ... } data_logger_shim_function_data::reset

Reset function state.

◆ [struct]

struct { ... } data_logger_shim_function_data::write

Write function state.


The documentation for this struct was generated from the following file:
  • infuse/data_logger/backend/shim.h