/** * \file * * * \brief KBlock interface * * \author Francesco Sacchi */ #ifndef KBLOCK_RAM_H #define KBLOCK_RAM_H #include "kblock.h" typedef struct KBlockRam { KBlock b; uint8_t *membuf; } KBlockRam; #define KBT_KBLOCKRAM MAKE_ID('K', 'B', 'R', 'M') INLINE KBlockRam *KBLOCKRAM_CAST(KBlock *b) { ASSERT(b->priv.type == KBT_KBLOCKRAM); return (KBlockRam *)b; } void kblockram_init(KBlockRam *ram, void *buf, size_t size, size_t block_size, bool buffered, bool hwbuffered); #endif /* KBLOCK_RAM_H */